PIDController¶
- class lsst.ts.ofc.PIDController(ofc_data: OFCData, log: logging.Logger | None = None)¶
Bases:
BaseController
PID controller.
Attributes Summary
Returns the aggregated state.
Derivative filter coefficient.
Derivative gain.
Integral gain.
Proportional gain.
Methods Summary
aggregate_state
(dof, dof_idx)Aggregate the calculated degree of freedom (DOF) in the state.
calculate_pid_step
(state)Calculate the control signal using PID controller.
control_step
(filter_name, dof_state[, ...])Estimate the control offset for the given DOF state.
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).
Reset the history of the controller.
set_fwhm_data
(fwhm, sensor_names)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_names :list
[string
] List of sensor names. Raises ------ RuntimeError If size offwhm
andsensor_names
are different.Attributes Documentation
- ETA = 1.086¶
- FWHM_ATM = 0.6¶
- derivative_filter_coeff¶
Derivative filter coefficient.
Returns¶
float
Derivative filter coefficient.
- kp¶
Proportional gain.
Methods Documentation
- aggregate_state(dof: numpy.ndarray[float] | list, dof_idx: numpy.ndarray[int] | list[int]) None ¶
Aggregate the calculated degree of freedom (DOF) in the state.
Parameters¶
- dof
numpy.ndarray
orlist
Calculated DOF.
- dof_idx
numpy.ndarray
orlist[int]
Index array of degree of freedom.
- dof
- calculate_pid_step(state: ndarray[float]) ndarray[float] ¶
Calculate the control signal using PID controller.
Parameters¶
- state
np.ndarray[float]
State of the system.
Returns¶
- uk
numpy.ndarray
Calculated uk in the basis of DOF.
- state
- control_step(filter_name: str, dof_state: ndarray[float], sensor_names: list[str] | None = None) ndarray[float] ¶
Estimate the control offset for the given DOF state.
Parameters¶
- filter_name
string
Name of the filter.
- dof_state
numpy.ndarray
Optical state in the basis of DOF.
- sensor_names
list
[string
] List of sensor names.
Returns¶
- control_effort
numpy.ndarray
Calculated control_effort in the basis of DOF.
- filter_name
- effective_fwhm_g4(pssn: ndarray[float], sensor_names: list[str]) float ¶
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
[string
] List of sensor names.
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.
- pssn
- fwhm_to_pssn(fwhm: ndarray[float]) ndarray[float] ¶
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.
Returns¶
- pssn
numpy.ndarray[y]
An array of PSSN values.
- fwhm
- reset_dof_state() None ¶
Initialize the state to the state 0 in the basis of degree of freedom (DOF).
- reset_history() None ¶
Reset the history of the controller.
- set_fwhm_data(fwhm: ndarray[float], sensor_names: list[str]) 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_names
list
[string
] List of sensor names.
Raises¶
- RuntimeError
If size of
fwhm
andsensor_names
are different.
- sensor_names