fitMaskModel#
- lsst.ts.wep.utils.fitMaskModel(optic, wavelength=5e-07, deg=3, thetaMax=2, dTheta=0.01)#
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:
optic (batoid.CompoundOptic) – The Batoid model for which to fit the mask model
wavelength (float) – The wavelength of the photons in meters.
deg (int, optional) – The degree of the polynomial to fit (the default is 3)
thetaMax (float, optional) – The maximum field angle to fit (the default is 2)
dTheta (float, optional) – The increment in field angle to use for fitting. (the default is 1e-2 degrees)
- Return type:
- 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.