You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/ti_plm/__init__.py
+14-2Lines changed: 14 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
"""
2
2
This is the main module defining the PLM class. The PLM class leverages the 'param' library to parameterize a PLM device, such as its resolution, pixel pitch, phase state levels, etc. Each parameter is defined at the class level and includes default values and detailed documentation about what that parameter is. The `param` library enforces type checking and makes it easy to define a dependency graph through function decorators.
3
3
"""
4
+
4
5
fromimportlib.metadataimportversion
5
6
importparam
6
7
importnumpyasnp
@@ -34,6 +35,13 @@ class PLM(param.Parameterized):
34
35
default=np.array([])
35
36
)
36
37
38
+
max_displacement_ratio=param.Number(
39
+
label='Max Displacement Ratio',
40
+
doc='Optional max displacement ratio override. If set, this value will be used to scale the `displacement_ratios` array. Otherwise, the values will be scaled to the number of states minus one, e.g. 15/16 for 4-bit devices.',
41
+
allow_None=True,
42
+
default=None
43
+
)
44
+
37
45
memory_lut=param.Array(
38
46
label='Memory LUT',
39
47
doc='Lookup table for values that are written to the PLM electrodes under each mirror corresponding to each displacement level. These values are typically not in monotonically increasing order.',
0 commit comments