WfEstimator

class lsst.ts.wep.estimation.WfEstimator(algoName: str = 'tie', algoConfig: Optional[Union[dict, WfAlgorithm]] = None, instConfig: Union[str, dict, Instrument] = 'policy:instruments/LsstCam.yaml', nollIndices: Sequence = (4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22), startWithIntrinsic: bool = True, returnWfDev: bool = False, units: str = 'um', saveHistory: bool = False)

Bases: object

Class providing a high-level interface for wavefront estimation.

Parameters

algoNameWfAlgorithmName or str, optional

Name of the algorithm to use. Can be specified using a WfAlgorithmName Enum or the corresponding string. (the default is “tie”)

algoConfigdict or WfAlgorithm, optional

Algorithm configuration. If a string, it is assumed this points to a config file, which is used to configure the algorithm. If the path begins with “policy:”, then it is assumed the path is relative to the policy directory. If a dictionary, it is assumed to hold keywords for configuration. If a WfAlgorithm object, that object is just used. If None, the algorithm defaults are used. (The default is None)

instConfigstr or dict or Instrument, optional

Instrument configuration. If a Path or string, it is assumed this points to a config file, which is used to configure the Instrument. If a dictionary, it is assumed to hold keywords for configuration. If an Instrument object, that object is just used. (the default is “policy:instrument/LsstCam.yaml”)

nollIndicesSequence, optional

List, tuple, or array of Noll indices for which you wish to estimate Zernike coefficients. Note these values must be unique, ascending, and >= 4. (the default is indices 4-22)

startWithIntrinsicbool, optional

Whether to start the Zernike estimation process from the intrinsic Zernikes rather than zero. (the default is True)

returnWfDevbool, optional

If False, the full OPD is returned. If True, the wavefront deviation is returned. The wavefront deviation is defined as the OPD - intrinsic Zernikes. (the default is False)

unitsstr, optional

Units in which the Zernike coefficients are returned. Options are “m”, “um”, “nm”, or “arcsec”. (the default is “um”)

saveHistorybool, optional

Whether to save the algorithm history in the self.history attribute. If True, then self.history contains information about the most recent time the algorithm was run. (the default is False)

Attributes Summary

algo

Return the WfAlgorithm object.

history

instrument

Return the Instrument object.

nollIndices

Return the Noll indices for which Zernikes are estimated.

returnWfDev

Whether to return the wavefront deviation instead of the OPD.

saveHistory

Whether to save the algorithm history.

startWithIntrinsic

Whether to start Zernike estimation with the intrinsics.

units

Return the wavefront units.

Methods Summary

estimateZk(I1[, I2])

Estimate Zernike coefficients of the wavefront from the stamp(s).

Attributes Documentation

algo

Return the WfAlgorithm object.

history
instrument

Return the Instrument object.

nollIndices

Return the Noll indices for which Zernikes are estimated.

returnWfDev

Whether to return the wavefront deviation instead of the OPD.

saveHistory

Whether to save the algorithm history.

startWithIntrinsic

Whether to start Zernike estimation with the intrinsics.

units

Return the wavefront units.

For details about this parameter, see the class docstring.

Methods Documentation

estimateZk(I1: Image, I2: Optional[Image] = None) ndarray

Estimate Zernike coefficients of the wavefront from the stamp(s).

Parameters

I1Image

An Image object containing an intra- or extra-focal donut image.

I2Image, optional

A second image, on the opposite side of focus from I1. (the default is None)

Returns

np.ndarray

Zernike coefficients estimated from the stamp(s)

Raises

ValueError

If I1 and I2 are on the same side of focus.