MMT
- class mmtwfs.telescope.MMT(secondary='f5', config={}, **kwargs)[source]
Bases:
TelescopeDefines configuration and methods that pertain to the MMT’s telescope and primary mirror systems
Methods Summary
bend_mirror([filename])Take a force file and send it to the cell to apply bending forces.
bending_forces([zv, gain])Given a ZernikeVector (or similar object describing a 2D polynomial surface), calculate the actuator forces required to correct for the surface displacement it describes.
calculate_primary_corrections(zv[, mask, gain])Take ZernikeVector as input and determine corrections to apply to primary/secondary
Clear applied forces from primary mirror and clear any m1spherical offsets from secondary hexapod
connect()Set state to connected so that calculated corrections will be sent to the relevant systems
correct_primary(t, m1focus_corr[, filename])Take force table and focus offset calculated by self.calculate_primary_corrections() and apply them, if connected.
Set state to disconnected so that corrections will be calculated, but not sent
Load and cache the actuator-to-surface influence matrix.
The actuator IDs and X/Y positions in mm are stored in a simple ASCII table.
The BCV finite element nodes IDs and X/Y/Z positions in mm are stored in a simple ASCII table.
The influence of each actuator on the mirror surface has been modeled via finite element analysis.
plot_force_influence(t[, inf_matrix])Plot the M1 surface displacement produced by a set of actuator forces.
plot_forces(t[, m1focus, limit])Plot actuator forces given force table as output from self.bending_forces()
to_rcell(t[, filename, overwrite])Take table generated by bending_forces() and write it to a file of a format that matches the old SHWFS system
undo_last([zfilename])Undo the last set of corrections.
Methods Documentation
- bend_mirror(filename='zfile')[source]
Take a force file and send it to the cell to apply bending forces. Return fraction of requested forces that the cell reports were applied.
- bending_forces(zv=Fringe Coefficients, gain=0.5)[source]
Given a ZernikeVector (or similar object describing a 2D polynomial surface), calculate the actuator forces required to correct for the surface displacement it describes.
- calculate_primary_corrections(zv, mask=[], gain=0.5)[source]
Take ZernikeVector as input and determine corrections to apply to primary/secondary
- clear_forces()[source]
Clear applied forces from primary mirror and clear any m1spherical offsets from secondary hexapod
- connect()[source]
Set state to connected so that calculated corrections will be sent to the relevant systems
- correct_primary(t, m1focus_corr, filename='zfile')[source]
Take force table and focus offset calculated by self.calculate_primary_corrections() and apply them, if connected.
- disconnect()[source]
Set state to disconnected so that corrections will be calculated, but not sent
- load_act2surf()[source]
Load and cache the actuator-to-surface influence matrix. This matrix maps a vector of actuator forces (in Newtons) to the resulting surface displacement (in nm) at each of the BCV finite element nodes. It is the counterpart to self.surf2act and is stored as an ASCII table, so it is loaded lazily the first time it is needed.
- load_actuator_coordinates()[source]
The actuator IDs and X/Y positions in mm are stored in a simple ASCII table. Load it using astropy.io.ascii, convert to units of mirror radius, and add polar coordinates.
- load_bcv_coordinates()[source]
The BCV finite element nodes IDs and X/Y/Z positions in mm are stored in a simple ASCII table. Load it using astropy.io.ascii, convert to units of mirror radius, and add polar coordinates.
- load_influence_matrix()[source]
The influence of each actuator on the mirror surface has been modeled via finite element analysis. This method loads the influence matrix that resulted from this analysis and maps for each actuator the influence of 1 lb of force on the mirror surface at each finite element node. This matrix is stored in a binary file for compactness and speed of loading.
- plot_force_influence(t, inf_matrix=None)[source]
Plot the M1 surface displacement produced by a set of actuator forces.
- Parameters:
- t
astropy.table.Table Force table as output by self.bending_forces() with “actuator” and “force” columns.
- inf_matrix
numpy.ndarray, optional Actuator-to-surface influence matrix mapping a force vector (N) to surface displacement (nm) at each BCV node. If not provided, it is loaded (and cached) via self.load_act2surf().
- t
- plot_forces(t, m1focus=None, limit=100.0)[source]
Plot actuator forces given force table as output from self.bending_forces()