WfEstimator

class lsst.ts.wep.WfEstimator(algoDir)

Bases: object

Initialize the wavefront estimator class.

Parameters:
algoDirstr

Path to algorithm directory.

Methods Summary

calWfsErr([tol, showZer, showPlot])

Calculate the wavefront error.

config([instParams, solver, camType, ...])

Configure the TIE solver.

getAlgo()

Get the algorithm object.

getExtraImg()

Get the extra-focal donut image.

getInst()

Get the instrument object.

getIntraImg()

Get the intra-focal donut image.

getOptModel()

Get the optical model.

getSizeInPix()

Get the donut image size in pixel defined by the config() function.

reset()

Reset the calculation for the new input images with the same algorithm settings.

setImg(fieldXY, defocalType[, blendOffsets, ...])

Set the wavefront image.

Methods Documentation

calWfsErr(tol=0.001, showZer=False, showPlot=False)

Calculate the wavefront error.

Parameters:
tolfloat, optional

[description] (the default is 1e-3.)

showZerbool, optional

Decide to show the annular Zernike polynomails or not. (the default is False.)

showPlotbool, optional

Decide to show the plot or not. (the default is False.)

Returns:
numpy.ndarray

Coefficients of Zernike polynomials (z4 - z22).

Raises:
RuntimeError

Input image shape is wrong.

config(instParams=None, solver='exp', camType=CamType.LsstCam, opticalModel='offAxis', sizeInPix=120, centroidFindType=CentroidFindType.RandomWalk, debugLevel=0)

Configure the TIE solver.

Parameters:
instParamsdict or None, optional

Instrument Configuration Parameters to use. If None will default to files in policy/cwfs directory.

solverstr, optional

Algorithm to solve the Poisson’s equation in the transport of intensity equation (TIE). It can be “fft” or “exp” here. (the default is “exp”.)

camTypeenum ‘CamType’, optional

Camera type. (the default is CamType.LsstCam.)

opticalModelstr, optional

Optical model. It can be “paraxial”, “onAxis”, or “offAxis”. (the default is “offAxis”.)

sizeInPixint, optional

Wavefront image pixel size. (the default is 120.)

centroidFindTypeenum ‘CentroidFindType’, optional

Algorithm to find the centroid of donut. (the default is CentroidFindType.RandomWalk.)

debugLevelint, optional

Show the information under the running. If the value is higher, the information shows more. It can be 0, 1, 2, or 3. (the default is 0.)

Raises:
ValueError

Wrong Poisson solver name.

ValueError

Wrong optical model.

ValueError

Wrong optical model for AuxTel (“offAxis” is not implemented).

getAlgo()

Get the algorithm object.

Returns:
Algorithm

Algorithm object.

getExtraImg()

Get the extra-focal donut image.

Returns:
CompensableImage

Extra-focal donut image.

getInst()

Get the instrument object.

Returns:
Instrument

Instrument object.

getIntraImg()

Get the intra-focal donut image.

Returns:
CompensableImage

Intra-focal donut image.

getOptModel()

Get the optical model.

Returns:
str

Optical model.

getSizeInPix()

Get the donut image size in pixel defined by the config() function.

Returns:
int

Donut image size in pixel

reset()

Reset the calculation for the new input images with the same algorithm settings.

setImg(fieldXY, defocalType, blendOffsets=None, image=None, imageFile=None)

Set the wavefront image.

Parameters:
fieldXYtuple or list

Position of donut on the focal plane in degree for intra- and extra-focal images.

defocalTypeenum ‘DefocalType’

Defocal type of image.

blendOffsetslist or None, optional

Positions of blended donuts relative to location of center donut. Enter as [xCoordList, yCoordList]. Length of xCoordList and yCoordList must be the same length. (the default is None).

imagenumpy.ndarray, optional

Array of image. (the default is None.)

imageFilestr, optional

Path of image file. (the default is None.)