OpdMetrology

class lsst.ts.phosim.OpdMetrology

Bases: object

Methods Summary

addFieldXYbyCamPos(sensorName, xInpixel, ...)

Add the new field X, Y in degree by the camera pixel positions.

addFieldXYbyDeg(fieldXInDegree, fieldYInDegree)

Add the new field X, Y in degree.

calcDm5(pssn)

Calculate the loss of limiting depth (dm5).

calcEllip(wavelengthInUm[, opdFitsFile, ...])

Calculate the ellipticity.

calcFWHMeff(pssn)

Calculate the effective FWHM.

calcGQvalue(valueList)

Calculate the GQ value.

calcPSSN(wavelengthInUm[, opdFitsFile, ...])

Calculate the PSSN based on OPD map.

getDefaultLsstWfsGQ()

Get the default field X, Y of LSST WFS on GQ.

getFieldXY()

Get the field X, Y in degree.

getWeightingRatio()

Get the weighting ratio used in Gaussian quadrature.

getZkFromOpd([opdFitsFile, opdMap, znTerms, ...])

Get the wavefront error of OPD in the basis of annular Zernike polynomials.

rmPTTfromOPD([opdFitsFile, opdMap])

Remove the afftection of piston (z1), x-tilt (z2), and y-tilt (z3) from the OPD map.

setCamera(instName)

Set the camera.

setDefaultComcamGQ()

Set the default ComCam GQ field X, Y and weighting ratio.

setDefaultLsstGQ()

Set the default LSST GQ field X, Y and weighting ratio.

setDefaultLsstWfsGQ()

Set default values for LSST WFS field X, Y and weighting ratio.

setFieldXYinDeg(fieldXInDegree, fieldYInDegree)

Set the field X, Y in degree.

setWeightingRatio(wt)

Set the weighting ratio used in Gaussian quadrature.

setWgtAndFieldXyOfGQ(instName)

Set the GQ weighting ratio and field X, Y.

Methods Documentation

addFieldXYbyCamPos(sensorName, xInpixel, yInPixel, folderPath2FocalPlane)

Add the new field X, Y in degree by the camera pixel positions.

Parameters:
sensorNamestr

Canera sensor name (e.g. “R22_S11”, “R40_S02_C0”).

xInpixelfloat

Pixel x on camera coordinate.

yInPixelfloat

Pixel y on camera coordinate.

folderPath2FocalPlanestr

Path to the directory of focal plane data (“focalplanelayout.txt”).

addFieldXYbyDeg(fieldXInDegree, fieldYInDegree)

Add the new field X, Y in degree.

Parameters:
fieldXInDegreefloat, list, or numpy.ndarray

New field X in degree.

fieldYInDegreefloat, list, or numpy.ndarray

New field Y in degree.

calcDm5(pssn)

Calculate the loss of limiting depth (dm5).

PSSN: Normalized point source sensitivity.

Parameters:
pssnfloat

PSSN value.

Returns:
float

dm5.

calcEllip(wavelengthInUm, opdFitsFile=None, opdMap=None, zen=0, debugLevel=0)

Calculate the ellipticity.

Parameters:
wavelengthInUmfloat

Wavelength in microns.

opdFitsFilestr, optional

OPD FITS file. (the default is None.)

opdMapnumpy.ndarray, optional

OPD map data. (the default is None.)

zenfloat, optional

elescope zenith angle in degree. (the default is 0.)

debugLevelint, optional

Debug level. The higher value gives more information. (the default is 0.)

Returns:
float

Ellipticity.

calcFWHMeff(pssn)

Calculate the effective FWHM.

FWHM: Full width at half maximum. PSSN: Normalized point source sensitivity.

Parameters:
pssnfloat

PSSN value.

Returns:
float

Effective FWHM.

calcGQvalue(valueList)

Calculate the GQ value.

GQ: Gaussian quadrature

Parameters:
valueListlist or numpy.ndarray

List of value (PSSN, effective FWHM, dm5, ellipticity).

Returns:
float

GQ value.

Raises:
ValueError

Length of wt ratio != length of value list.

calcPSSN(wavelengthInUm, opdFitsFile=None, opdMap=None, zen=0, debugLevel=0)

Calculate the PSSN based on OPD map.

PSSN: Normalized point source sensitivity. OPD: Optical path difference.

Parameters:
wavelengthInUmfloat

Wavelength in microns.

opdFitsFilestr, optional

OPD FITS file. (the default is None.)

opdMapnumpy.ndarray, optional

OPD map data. (the default is None.)

zenfloat, optional

elescope zenith angle in degree. (the default is 0.)

debugLevelint, optional

Debug level. The higher value gives more information. (the default is 0.)

Returns:
float

Calculated PSSN.

getDefaultLsstWfsGQ()

Get the default field X, Y of LSST WFS on GQ.

WFS: Wavefront sensor. GQ: Gaussian quadrature

Returns:
list

Field X in degree.

list

Field Y in degree.

getFieldXY()

Get the field X, Y in degree.

Returns:
numpy.ndarray

Field X in degree.

numpy.ndarray

Field Y in degree.

getWeightingRatio()

Get the weighting ratio used in Gaussian quadrature.

Returns:
numpy.ndarray

Weighting ratio.

getZkFromOpd(opdFitsFile=None, opdMap=None, znTerms=22, obscuration=0.61)

Get the wavefront error of OPD in the basis of annular Zernike polynomials.

OPD: Optical path difference.

Parameters:
opdFitsFilestr, optional

OPD FITS file. (the default is None.)

opdMapnumpy.ndarray, optional

OPD map data. (the default is None.)

znTermsint, optional

Number of terms of annular Zk (z1-z22 by default). (the default is 22.)

obscurationfloat, optional

Obscuration of annular Zernike polynomial. (the default is 0.61.)

Returns:
numpy.ndarray

Annular Zernike polynomials. For PhoSim OPD, the unit is um.

numpy.ndarray

OPD map.

numpy.ndarray

Meshgrid x in OPD map.

numpy.ndarray

Meshgrid y in OPD map.

Raises:
ValueError

The x, y dimensions of OPD are different.

rmPTTfromOPD(opdFitsFile=None, opdMap=None)

Remove the afftection of piston (z1), x-tilt (z2), and y-tilt (z3) from the OPD map.

OPD: Optical path difference.

Parameters:
opdFitsFilestr, optional

OPD FITS file. (the default is None.)

opdMapnumpy.ndarray, optional

OPD map data. (the default is None.)

Returns:
numpy.ndarray

OPD map after removing the affection of z1-z3.

numpy.ndarray

Meshgrid x in OPD map.

numpy.ndarray

Meshgrid y in OPD map.

setCamera(instName)

Set the camera.

Parameters:
instNamestr

Instrument name. Valid options are ‘comcam or ‘lsstfam’.

setDefaultComcamGQ()

Set the default ComCam GQ field X, Y and weighting ratio.

GQ: Gaussian quadrature

setDefaultLsstGQ()

Set the default LSST GQ field X, Y and weighting ratio.

GQ: Gaussian quadrature

setDefaultLsstWfsGQ()

Set default values for LSST WFS field X, Y and weighting ratio.

setFieldXYinDeg(fieldXInDegree, fieldYInDegree)

Set the field X, Y in degree.

Parameters:
fieldXInDegreelist or numpy.ndarray

Field X in degree.

fieldYInDegreelist or numpy.ndarray

Field Y in degree.

setWeightingRatio(wt)

Set the weighting ratio used in Gaussian quadrature.

Parameters:
wtlist or numpy.ndarray

Weighting ratio.

setWgtAndFieldXyOfGQ(instName)

Set the GQ weighting ratio and field X, Y.

GQ: Gaussian quadrature.

Parameters:
instNamestr

Instrument name.

Raises:
RuntimeError

If the instrument path does not exists. If fieldXy.yaml file does not exists in the instrument configuration directory.