WfEstimator#

class lsst.ts.wep.estimation.WfEstimator(algoName='tie', algoConfig=None, instConfig='policy:instruments/LsstCam.yaml', nollIndices=(np.int64(4), np.int64(5), np.int64(6), np.int64(7), np.int64(8), np.int64(9), np.int64(10), np.int64(11)), startWithIntrinsic=True, returnWfDev=False, units='um', saveHistory=False)#

Bases: object

Class providing a high-level interface for wavefront estimation.

Parameters:
  • algoName (WfAlgorithmName or str, optional) – Name of the algorithm to use. Can be specified using a WfAlgorithmName Enum or the corresponding string. (the default is “tie”)

  • algoConfig (dict 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)

  • instConfig (str 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”)

  • nollIndices (Sequence, 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-11)

  • startWithIntrinsic (bool, optional) – Whether to start the Zernike estimation process from the intrinsic Zernikes rather than zero. (the default is True)

  • returnWfDev (bool, 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)

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

  • saveHistory (bool, 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, obs])

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, I2=None, obs=None)#

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

Parameters:
  • I1 (Image) – An Image object containing an intra- or extra-focal donut image.

  • I2 (Image, optional) – A second image, on the opposite side of focus from I1. (the default is None)

  • obs (ObservingConditions or None, optional) – Per-observation telescope pointing state (rotator angle, altitude). (the default is None)

Return type:

tuple[ndarray, dict]

Returns:

  • np.ndarray – Zernike coefficients estimated from the stamp(s)

  • dict – Metadata containing extra output from wavefront estimation algorithm.

Raises:

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