OFC¶
- class lsst.ts.ofc.OFC(ofc_data: OFCData, log: logging.Logger | None = None)¶
Bases:
object
Optical 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.Logger
orNone
, optional Optional logging class to be used for logging operations. If
None
(default), creates a new logger.
- ofc_data
Notes
FWHM: Full width at half maximum. PSSN: Normalized point source sensitivity.
- 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
Last visit degrees of freedom.
- ofc_controller
OFCController
Instance of
OFCController
class.- ofc_data
OFCData
OFC data container.
- pssn_data
dict
Normalized point source sensitivity data.
- state_estimator
StateEstimator
Instance of
StateEstimator
.
- default_gain
Methods Summary
calculate_corrections
(wfe, sensor_names, ...)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_fwhm_data
(fwhm, sensor_names)Set the list of FWHMSensorData of each CCD of camera. Parameters ---------- fwhm :
np.ndarray
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_names :list
ofstring
List of sensor names. Raises ------ RuntimeError If size offwhm
andsensor_names
are different.set_last_visit_dof
(dof)Set the state (or degree of freedom, DOF) correction from the last visit.
Set the gain value based on the PSSN, which comes from the FWHM by DM team.
Methods Documentation
- calculate_corrections(wfe: ndarray, sensor_names: list[str], filter_name: str, gain: float, 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
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_names: `list`
List of sensor names.
- filter_name
string
Name of the filter used in the observations. This must be a valid entry in the
ofc_data.intrinsic_zk
andofc_data.eff_wavelength
dictionaries.- gain
float
User provided gain. If < 0, calculate gain based on point source sensitivity normalized (PSSN).
- rotation_angle
float
Camera rotator angle (in degrees) during the observations.
- wfe
- Returns
- corrections
list
ofCorrection
Corrections for the individual componets. Order is: M2 Hexapod, Camera Hexapod, M1M3 and M2.
- corrections
- Raises
- RuntimeError
If size of
wfe
is different thansensor_names
.
- get_all_corrections() list[lsst.ts.ofc.correction.Correction] ¶
Return corrections for all components in the appropriate order.
- Returns
- corrections
list
ofCorrections
- corrections
- 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
.
- dof_comp
- Returns
- correction
Correction
Component correction.
- correction
- 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_fwhm_data(fwhm, sensor_names)¶
Set the list of FWHMSensorData of each CCD of camera. Parameters ———- fwhm :
np.ndarray
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.
Raises¶
- RuntimeError
If size of
fwhm
andsensor_names
are different.
- set_last_visit_dof(dof) None ¶
Set the state (or degree of freedom, DOF) correction from the last visit.
- Parameters
- dof
numpy.ndarray
Calculated degrees of freedom.
- dof
- set_pssn_gain()¶
Set the gain value based on the PSSN, which comes from the FWHM by DM team.
- Raises
- RuntimeError
If
pssn_data
is not properly set.