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', jmax: int = 22, startWithIntrinsic: bool = True, returnWfDev: bool = False, return4Up: bool = True, 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”)

jmaxint, optional

The maximum Zernike Noll index to estimate. (the default is 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)

return4Upbool, optional

If True, the returned Zernike coefficients start with Noll index 4. If False, they follow the Galsim convention of starting with index 0 (which is meaningless), so the array index of the output corresponds to the Noll index. In this case, indices 0-3 are always set to zero, because they are not estimated by our pipeline. (the default is True)

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.

jmax

Return the maximum Zernike Noll index that will be estimated.

return4Up

Whether to return Zernikes starting with Noll index 4.

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.

jmax

Return the maximum Zernike Noll index that will be estimated.

return4Up

Whether to return Zernikes starting with Noll index 4.

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.