OFC¶
- class lsst.ts.ofc.OFC(ofc_data: OFCData, log: Logger | None = None)¶
Bases:
objectOptical Feedback Control.
This class provides functionality to convert optical wave front errors (WFE) into physical corrections for the optical components; M1M3 (force figure), M2 (force figure), and Camera and M2 Hexapods (position).
Parameters¶
- ofc_data
OFCData Data container.
- log
logging.LoggerorNone, optional Optional logging class to be used for logging operations. If
None(default), creates a new logger.
Attributes¶
- default_gain
float Default gain, used when setting gain in
set_pssn_gain()when fwhm is abovefwhm_threshold.- dof_order
tuple Order of the degrees of freedom.
- fwhm_threshold
float Full width half maximum threshold when estimating gain with
set_pssn_gain().- log
logging.Logger Logger class used for logging operations.
- lv_dof
np.ndarray[float] Last visit degrees of freedom.
- controller
PIDControllerorOICController Controller class.
- ofc_data
OFCData OFC data container.
- pssn_data
dict Normalized point source sensitivity data.
- state_estimator
StateEstimator Instance of
StateEstimator.
Notes¶
FWHM: Full width at half maximum. PSSN: Normalized point source sensitivity.
Methods Summary
calculate_corrections(wfe, sensor_ids, ...)Calculate the Hexapod, M1M3, and M2 corrections from the FWHM and wavefront error.
Return corrections for all components in the appropriate order.
get_correction(dof_comp)Get the aggregated correction for specified component.
Initialize last visit degree of freedom.
reset()Reset the OFC calculation state, which is the aggregated DOF now.
set_controller(controller_name)Set the controller to be used.
set_controller_filename(controller_filename)Set the controller filename.
set_fwhm_data(fwhm, sensor_ids)Set the list of FWHMSensorData of each CCD of camera. Parameters ---------- fwhm :
np.ndarray[float]Array of arrays (e.g. 2-d array) which contains the FWHM data. Each element contains an array of fwhm (in arcsec) measurements for a particular sensor. sensor_ids :np.ndarray[int]List of sensor ids.set_last_visit_dof(dof)Set the state (or degree of freedom, DOF) correction from the last visit.
set_truncation_index(truncation_index)Set the truncation index for the controller.
Methods Documentation
- calculate_corrections(wfe: ndarray[float], sensor_ids: ndarray[int], filter_name: str, rotation_angle: float) list[lsst.ts.ofc.correction.Correction]¶
Calculate the Hexapod, M1M3, and M2 corrections from the FWHM and wavefront error.
Parameters¶
- wfe
np.ndarray[float] An array of arrays (e.g. 2-d array) with wavefront erros. Each element contains an array of wavefront errors (in um) for a particular detector/field.
- sensor_ids: np.ndarray[int]
List of sensor ids.
- filter_name
string Name of the filter used in the observations.
- rotation_angle
float Camera rotator angle (in degrees) during the observations.
Returns¶
- corrections
listofCorrection Corrections for the individual componets. Order is: M2 Hexapod, Camera Hexapod, M1M3 and M2.
Raises¶
- RuntimeError
If size of
wfeis different thansensor_names.
- wfe
- get_all_corrections() list[lsst.ts.ofc.correction.Correction]¶
Return corrections for all components in the appropriate order.
Returns¶
corrections :
listofCorrections
- get_correction(dof_comp: str) Correction¶
Get the aggregated correction for specified component.
DOF: Degree of freedom.
Parameters¶
- dof_comp
string Name of the component in the DOF index dictionary. See
OFData.comp_dof_idx.
Returns¶
- correction
Correction Component correction.
- dof_comp
- init_lv_dof() None¶
Initialize last visit degree of freedom.
- reset() list[lsst.ts.ofc.correction.Correction]¶
Reset the OFC calculation state, which is the aggregated DOF now.
This function is needed for the long slew angle of telescope.
DOF: Degree of freedom.
Returns¶
- M2HexapodCorrection
The position offset for the MT M2 Hexapod.
- CameraHexapodCorrection
The position offset for the MT Hexapod.
- M1M3Correction
The figure offset for the MT M1M3.
- M2Correction
The figure offset for the MT M2.
- set_controller(controller_name: str) None¶
Set the controller to be used.
Parameters¶
- controller_name
str Name of the controller. Options are: “PID”, “OIC”.
- controller_name
- set_controller_filename(controller_filename: str) None¶
Set the controller filename.
Parameters¶
- controller_filename
str Filename of the controller.
- controller_filename
- set_fwhm_data(fwhm: ndarray[float], sensor_ids: ndarray[int]) None¶
Set the list of FWHMSensorData of each CCD of camera. Parameters ———- fwhm :
np.ndarray[float]Array of arrays (e.g. 2-d array) which contains the FWHM data. Each element contains an array of fwhm (in arcsec) measurements for a particular sensor.
- sensor_ids
np.ndarray[int] List of sensor ids.
- sensor_ids
- ofc_data