OFCController¶
- class lsst.ts.ofc.OFCController(ofc_data, log=None)¶
Bases:
object
Optical Feedback Control Controller.
This class is mainly used to determine the offset (
uk
) of degree of freedom (DOF) at timek+1
based on the wavefront error (yk
) at timek
.- Parameters
- ofc_data
OFCData
Data container.
- log
logging.Logger
orNone
Optional logging class to be used for logging operations. If
None
, creates a new logger.
- ofc_data
- Attributes
- dof_state
np.array
State of telescope in the basis of degrees of freedom.
- dof_state0
np.array
Initial state of telescope in the basis of degrees of freedom.
- log
logging.Logger
Logger class used for logging operations.
- m1m3_bmf
BendModeToForce
Class to convert bend mode to forces for M1M3.
- m2_bmf
BendModeToForce
Class to convert bend mode to forces for M2.
- ofc_data
OFCData
OFC data container.
- dof_state
Attributes Summary
Returns the aggregated state.
Get the gain value.
Methods Summary
aggregate_state
(dof, dof_idx)Aggregate the calculated degree of freedom (DOF) in the state.
Compute the authority of the system.
calc_uk_0
(mat_f, qx, mat_h)Calculate uk by referencing to "0".
calc_uk_x0
(mat_f, qx, **kwargs)Calculate uk by referencing to "x0".
calc_uk_x00
(mat_f, qx, mat_h)Calculate uk by referencing to "x00".
effective_fwhm_g4
(pssn, sensor_names)Calculate the effective FWHM by Gaussian quadrature.
fwhm_to_pssn
(fwhm)Convert the FWHM data to PSSN.
Initialize the state to the state 0 in the basis of degree of freedom (DOF).
uk
(filter_name, dof_state[, sensor_names])Estimate the offset (
uk
) of degree of freedom (DOF) at timek+1
based on the wavefront error (yk
) at timek
.uk_gain
(filter_name, dof_state[, sensor_names])Estimate uk in the basis of degree of freedom (DOF) with gain compensation.
Attributes Documentation
- ETA = 1.086¶
- FWHM_ATM = 0.6¶
- aggregated_state¶
Returns the aggregated state.
- Returns
np.ndarray
Aggregated state.
Methods Documentation
- aggregate_state(dof, dof_idx)¶
Aggregate the calculated degree of freedom (DOF) in the state.
- Parameters
- dof
numpy.ndarray
orlist
Calculated DOF.
- dof_idx
numpy.ndarray
orlist
ofint
Index array of degree of freedom.
- dof
- authority()¶
Compute the authority of the system.
- Returns
- authority
np.array
- authority
- calc_uk_0(mat_f, qx, mat_h)¶
Calculate uk by referencing to “0”.
The offset will trace the real value and target for 0.
uk = -F’ * (QX + rho**2 * H * S).
- Parameters
- mat_f
numpy.ndarray
Matrix F.
- qx
numpy.ndarray
qx array.
- mat_h
numpy.ndarray
The H matrix (see equation above).
- mat_f
- Returns
- uk
numpy.ndarray
Calculated uk in the basis of degree of freedom (DOF).
- uk
- calc_uk_x0(mat_f, qx, **kwargs)¶
Calculate uk by referencing to “x0”.
The offset will only trace the previous one.
uk = -F’ * QX.
- Parameters
- mat_f
numpy.ndarray
Matrix F.
- qx
numpy.ndarray
qx array.
- kwargs
dict
Additional keyword arguments. This is mainly added to provide similar interaface to other
calc_uk_*
methods.
- mat_f
- Returns
- uk
numpy.ndarray
Calculated uk in the basis of degree of freedom (DOF).
- uk
- calc_uk_x00(mat_f, qx, mat_h)¶
Calculate uk by referencing to “x00”. The offset will only trace the relative changes of offset without regarding the real value. uk = -F’ * [QX + rho**2 * H * (S - S0)].
- Parameters
- mat_f
numpy.ndarray
Matrix F.
- qx
numpy.ndarray
qx array.
- mat_f
- Returns
numpy.ndarray
Calculated uk in the basis of degree of freedom (DOF).
- effective_fwhm_g4(pssn, sensor_names)¶
Calculate the effective FWHM by Gaussian quadrature.
FWHM: Full width at half maximum. FWHM = eta * FWHM_{atm} * sqrt(1/PSSN -1). Effective GQFWHM = sum_{i} (w_{i}* FWHM_{i}).
- Parameters
- pssn
numpy.ndarray
orlist
Normalized point source sensitivity (PSSN).
- sensor_names
list
ofstring
List of sensor names.
- pssn
- Returns
float
Effective FWHM in arcsec by Gaussian quadrature.
- Raises
- ValueError
Input values are unphysical.
- ValueError
Image quality weights sum is zero. Please check your weights.
- fwhm_to_pssn(fwhm)¶
Convert the FWHM data to PSSN.
Take the array of FWHM values (nominally 1 per CCD) and convert it to PSSN (nominally 1 per CCD).
- Parameters
- fwhm
numpy.ndarray[x]
An array of FWHM values with sensor information.
- fwhm
- Returns
- pssn
numpy.ndarray[y]
An array of PSSN values.
- pssn
- reset_dof_state()¶
Initialize the state to the state 0 in the basis of degree of freedom (DOF).
- uk(filter_name: str, dof_state: ndarray, sensor_names: list[str] | None = None) ndarray ¶
Estimate the offset (
uk
) of degree of freedom (DOF) at timek+1
based on the wavefront error (yk
) at timek
.uk in the basis of degree of freedom (DOF) without gain compensation.
- Parameters
- filter_name
string
Name of the filter.
- dof_state
numpy.ndarray
Optical state in the basis of DOF.
- sensor_names
list
ofstring
List of sensor names.
- filter_name
- Returns
- uk
numpy.ndarray
Calculated uk in the basis of DOF.
- uk
- Raises
- RuntimeError
If
xref
strategy is not valid.- RuntimeError
If
sensor_names
is not provided for full array mode instruments.- ValueError
If image quality weights sum is zero.
- uk_gain(filter_name: str, dof_state: ndarray, sensor_names: list[str] | None = None) ndarray ¶
Estimate uk in the basis of degree of freedom (DOF) with gain compensation.
- Parameters
- filter_name
string
Name of the filter.
- dof_state
numpy.ndarray
Optical state in the basis of DOF.
- sensor_names
list
ofstring
List of sensor names.
- filter_name
- Returns
- uk
numpy.ndarray
Calculated uk in the basis of DOF.
- uk
- Raises
- RuntimeError
If
sensor_names
is not provided for full array mode instruments.