OFCData

class lsst.ts.ofc.OFCData(name=None, config_dir=None, log=None, **kwargs)

Bases: BaseOFCData

Optical Feedback Control Data.

This container class provides a unified interface to all the data used by the OFC and its ancillary classes. It provides utiliy to load, inspect and update the different configuration files used by these classes.

Parameters
namestring or None, optional

Name of the instrument/configuration. This must map to a directory inside data_path.

config_dirstring or None, optional

Path to configuration directory. If None (default) use data provided with the module. If a string is provided it must map to a valid path.

loglogging.Logger or None, optional

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

kwargsdict

Additional keyword arguments. Value are passed over to the BaseOFCData parent class.

Raises
RuntimeError

If input config_dir does not exists.

Attributes
bend_modedict

Dictionary to hold bending mode data. The data is read alongside the other files when the name is set.

config_dirpathlib.Path

Path to the directory storing configuration files.

dof_idxdict of string

Index of Degree of Freedom (DOF).

field_idxdict of string

Mapping between sensor name and field index.

gq_points: `np.ndarray` of `float`

Gaussian Quadrature points for LSST field.

image_quality_weightnp.ndarray of float

Image quality weight for the Gaussian Quadrature points.

intrinsic_zkdict of string

Intrinsic zernike coefficients per band per detector for a specific instrument configuration.

loglogging.Logger

Logger class used for logging operations.

namestring

Name of the instrument configuration. This is used to define where intrinsic_zk and y2 will be read from.

sensitivity_matrixnp.ndarray of float

Sensitivity matrix M.

start_taskasyncio.Future

Asyncio future that tracks whether the class is setup and ready or not.

xrefstring

Define how the control strategy will handle the reference point.

xref_listlist of string

Available reference point strategies.

y2_correctionnp.ndarray of float

Y2 correction.

Attributes Summary

comp_dof_idx

control_strategy

delta

Delta coefficient for the normalized point-source sensitivity (PSSN).

dof_idx

dof_idx_mask

dof_state0_filename

intrinsic_zk_filename_root

m1m3_actuator_penalty

m2_actuator_penalty

motion_penalty

name

sen_m_filename_root

xref

xref_list

y2_filename_root

zn3_idx_in_intrinsic_zn_file

znmax

znmin

Methods Summary

configure_instrument(instrument)

Configure instrument concurrently.

load_yaml_file(file_path)

Load yaml file.

Attributes Documentation

comp_dof_idx
control_strategy: str = 'optiPSSN'
delta

Delta coefficient for the normalized point-source sensitivity (PSSN).

This delta defines the range where PSSN=1-alpha^2 sigma^2 is accurate to 0.001. What we are concerned with is that the system could be trying to achieve tiny PSSN gains at the price of large control motions. This only applies to converged states. In converged states, of course the Zernikes will be within the range defined by delta. For more details, please check the page 19-21 in: https://docushare.lsst.org/docushare/dsweb/Get/Document-18041/150513.pptx.pdf

Returns
np.array of float

Delta coefficient.

dof_idx
dof_idx_mask
dof_state0_filename: str = 'state0_in_dof.yaml'
intrinsic_zk_filename_root: str = 'intrinsic_zk'
m1m3_actuator_penalty: float = 13.2584
m2_actuator_penalty: float = 134.0
motion_penalty: float = 0.001
name
sen_m_filename_root: str = 'sensitivity'
xref
xref_list
y2_filename_root: str = '_y2.yaml'
zn3_idx_in_intrinsic_zn_file: int = 3
znmax: int = 22
znmin: int = 4

Methods Documentation

async configure_instrument(instrument: str) None

Configure instrument concurrently.

Parameters
instrumentstring

Name of the instrument.

load_yaml_file(file_path: str) dict

Load yaml file.

Parameters
file_pathstring

Path to the yaml file.

Returns
dict

Dictionary with the yaml file content.

Raises
RuntimeError

If file does not exist.