fitMaskModel

lsst.ts.wep.utils.fitMaskModel(optic: CompoundOptic, wavelength: float = 5e-07, deg: int = 3, thetaMax: float = 2, dTheta: float = 0.01) Tuple[dict, dict]

Fit the mask model for the telescope.

This function is meant to produce mask models for Instruments. Use the printMaskModel to print the yaml-formatted mask model. Note this function assumes azimuthal symmetry.

This function produces a non-minimal model. I.e. it might include elements that never actually vignette the pupil, and the thetaMin- thetaMax range might be larger than required. It is recommended you run pruneMaskModel on the output fitDict to get the minimal model.

Parameters:
opticbatoid.CompoundOptic

The Batoid model for which to fit the mask model

wavelengthfloat

The wavelength of the photons in meters.

degint, optional

The degree of the polynomial to fit (the default is 3)

thetaMaxfloat, optional

The maximum field angle to fit (the default is 2)

dThetafloat, optional

The increment in field angle to use for fitting. (the default is 1e-2 degrees)

Returns:
dict

The mask model. Each item in the compound optic has an entry, except for the detector. Each item entry is also a dictionary that contains an “outer” key. Annular obscurations also contain an “inner” key. Each of these is a dictionary containing the keys: - clear: whether the item is clear or opaque - thetaMin: minimum field angle in degrees where the item vignettes - thetaMax: maximum field angle in degrees where the item vignettes - center: polynomial coefficients in meters fit to the mask center - radius: polynomial coefficients in meters fit to the mask radius

dict

A similarly nested dictionary containing the output of lsst.ts.wep.utils.maskUtils.fitMaskPoly for each item. See the docstring for that function to understand the contents of this dictionary.