ou24PSF_slow

class snappl.psf.ou24PSF_slow(sed=None, config_file=None, size=201, n_photons=1000000, _parent_class=False, _include_photonOps=False, **kwargs)[source]

Bases: PSF

Wrap the roman_imsim PSFs.

Each time you call get_stamp it will render a new one, with all the photon ops and so forth. This is why it’s called “_slow”. Look at ou24PSF for something that only does the photonops stuff once.

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

Currently, does not support any oversampling, because SFFT doesn’t # TODO: support oversampling!

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])

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

Attributes Documentation

stamp_size

Methods Documentation

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

Return a 2d numpy image of the PSF at the image 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.

  • image (snappl.image.Image or None) – The image that the PSF is associated with. This image will be used to determine the WCS of the PSF stamp. If None, the WCS will be determined using rmutils.getLocalWCS.