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_dataOFCData

Data container.

loglogging.Logger or None, optional

Optional logging class to be used for logging operations. If None (default), creates a new logger.

Notes

FWHM: Full width at half maximum. PSSN: Normalized point source sensitivity.

Attributes
default_gainfloat

Default gain, used when setting gain in set_pssn_gain() when fwhm is above fwhm_threshold.

dof_ordertuple

Order of the degrees of freedom.

fwhm_thresholdfloat

Full width half maximum threshold when estimating gain with set_pssn_gain().

loglogging.Logger

Logger class used for logging operations.

lv_dofnp.ndarray

Last visit degrees of freedom.

ofc_controllerOFCController

Instance of OFCController class.

ofc_dataOFCData

OFC data container.

pssn_datadict

Normalized point source sensitivity data.

state_estimatorStateEstimator

Instance of StateEstimator.

Methods Summary

calculate_corrections(wfe, sensor_names, ...)

Calculate the Hexapod, M1M3, and M2 corrections from the FWHM and wavefront error.

get_all_corrections()

Return corrections for all components in the appropriate order.

get_correction(dof_comp)

Get the aggregated correction for specified component.

init_lv_dof()

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 of string List of sensor names. Raises ------ RuntimeError If size of fwhm and sensor_names are different.

set_last_visit_dof(dof)

Set the state (or degree of freedom, DOF) correction from the last visit.

set_pssn_gain()

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
wfenp.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_namestring

Name of the filter used in the observations. This must be a valid entry in the ofc_data.intrinsic_zk and ofc_data.eff_wavelength dictionaries.

gainfloat

User provided gain. If < 0, calculate gain based on point source sensitivity normalized (PSSN).

rotation_anglefloat

Camera rotator angle (in degrees) during the observations.

Returns
correctionslist of Correction

Corrections for the individual componets. Order is: M2 Hexapod, Camera Hexapod, M1M3 and M2.

Raises
RuntimeError

If size of wfe is different than sensor_names.

get_all_corrections() list[lsst.ts.ofc.correction.Correction]

Return corrections for all components in the appropriate order.

Returns
correctionslist of Corrections
get_correction(dof_comp: str) Correction

Get the aggregated correction for specified component.

DOF: Degree of freedom.

Parameters
dof_compstring

Name of the component in the DOF index dictionary. See OFData.comp_dof_idx.

Returns
correctionCorrection

Component correction.

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_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_nameslist of string

List of sensor names.

Raises

RuntimeError

If size of fwhm and sensor_names are different.

set_last_visit_dof(dof) None

Set the state (or degree of freedom, DOF) correction from the last visit.

Parameters
dofnumpy.ndarray

Calculated degrees of freedom.

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.