STPSF

class snappl.psf.STPSF(sed=None, size=201, _parent_class=False, **kwargs)[source]

Bases: PSF

Wrap the STPSF PSFs.

Each time you call get_stamp it will render a new one, with all the photon ops and so forth.

However, an object of this class will cache, so if you call get_stamp with identical arguments it will return the cached version).

Don’t call this or the constructor of a subclass directly, call PSF.get_psf_object().

See get_psf_object for parameter documentation.

_called_from_get_psf_object is used internally and should not be used outside this module, unless you know what you’re doing and intentionally mean to subvert the system.

Note:

If both are set, then band overrides image.band

Attributes Summary

stamp_size

The size of the one side of a PSF image stamp at image resolution.

Methods Summary

get_stamp([x, y, x0, y0, flux, seed, ext_name])

Return a 2d numpy image of the PSF at the detector resolution.

Attributes Documentation

stamp_size

Methods Documentation

get_stamp(x=None, y=None, x0=None, y0=None, flux=1.0, seed=None, ext_name='DET_SAMP')[source]

Return a 2d numpy image of the PSF at the detector resolution.

Parameters are as in PSF.get_stamp, plus:

Parameters:

seed (int) – A random seed to pass to galsim.BaseDeviate for photonOps. NOTE: this is not part of the base PSF interface (at least, as of yet), so don’t use it in production pipeline code. However, it will be useful in tests for purposes of testing reproducibility.

ext_namestr

DET_SAMP is detector resolution. You can choose other planes if you want.

Notes

For more details

see the STPSF documentation

https://stpsf.readthedocs.io/en/latest/roman.html

and sample Roman WFI STPSF Notebook

https://github.com/spacetelescope/stpsf/blob/develop/notebooks/STPSF-Roman_Tutorial.ipynb