DM Pattern Generator¶
Write patterns to the tweeter or woofer DM. This code can be run intependent of the rtc and the wavefront sensor cameras:
bash$ python
>>> import pattern
-
pattern.
flat
(DM='tweeter')¶ flatten the DM by applying its default_actuator.fits data
-
pattern.
poke
(kind, pos=None, val=1, DM='tweeter', units='range')¶ creates a pattern of pokes on the deformable mirror.
kind = “-”, “|”, “+”, “x”, “#”, “||”, “=”, “F”, ”.”, or “*”
- val = value of poke. This is normalized to the range of the DM.
val can take on settings between 0 (less voltage than midrange) to +1 (more voltage than midrange). * pos = position of the poke(s), this can be a 1, 2 or 4 element list, depending on the kind of poke:
- : a horizontal line at pos=[row] | : a vertical line at pos=[column] + : a cross at pos=[row,column] x : a 45 cross, pos not used # : two vertical and two horizontal lines at pos=[row1,row2,col1,col2] || : two vertical lines at pos = [col1,col2] = : two horizontal lines at pos = [row1,row2] F : a unique orientation pattern, pos not used . : a single actuator at pos = [row,col] * : all actuators, pos not used
- units = ‘range’ or ‘DN’. If ‘range’ use the fancy 0 to +1
of full range, as described above. If ‘DN” assume that val is given in digital numbers sent to the DN (ranging from 0 to 65535).
The pokes are cumulative. To reset, use the zero() or flat() command.
-
pattern.
send
(file, DM='tweeter', units='range')¶ send a pattern from a fits file to the DM
If units = ‘range’ (the default) then the values in the fits between 0 and 1 represent the full range of the DM. If units = ‘DN’ then the values are assumed absolute (0 to 65535 for the tweeter).
-
pattern.
sphere
(DM='tweeter')¶ flatten the DM by applying its default_actuator.fits data
-
pattern.
zern
(n, m, val=1, ap=True, units='range')¶ Put a zernike pattern on the DM val is the peak-to-valley, as a fraction of range. negative val is allowed. This pattern is added cumulatively, so to start at mid range use flat() or poke(‘all’,*mid*)
-
pattern.
zero
(DM='tweeter')¶ send all zeros (no voltage) to the DM. For the tweeter this is the relaxed, or highest possible surface position. For the woofer, this is the middle of it’s [-1,+1] command range.