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.

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[float]

Last visit degrees of freedom.

controllerPIDController or OICController

Controller class.

ofc_dataOFCData

OFC data container.

pssn_datadict

Normalized point source sensitivity data.

state_estimatorStateEstimator

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.

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_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.

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

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

Name of the filter used in the observations.

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

corrections : list 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: 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_idsnp.ndarray[int]

List of sensor ids.

set_last_visit_dof(dof: ndarray[float]) None

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

Parameters

dofnumpy.ndarray

Calculated degrees of freedom.