simulate_counts_generic

romanisim.image.simulate_counts_generic(image, exptime, objlist=None, psf=None, zpflux=None, sky=None, dark=None, flat=None, xpos=None, ypos=None, ignore_distant_sources=10, bandpass=None, filter_name=None, rng=None, seed=None)

Add some simulated counts to an image.

No Roman specific code allowed! To do this, we need to have an image to start with with an attached WCS. We also need an exposure time and potentially a zpflux so we know how to translate between the catalog fluxes and the counts entering the image. For chromatic rendering, this role instead is played by the bandpass, though the exposure time is still needed to handle that part of the conversion from flux to counts.

Then there are a few of individual components that can be added on to an image:

  • objlist: a list of CatalogObjects to render, or a Table. Can be chromatic or not. This will have all your normal PSF and galaxy profiles.

  • sky: a sky background model. This is different from a dark in that it is sensitive to the flat field.

  • dark: a dark model.

  • flat: a flat field for modulating the object and sky counts

Parameters:
imagegalsim.Image

Image onto which other effects should be added, with associated WCS.

exptimefloat

Exposure time

objlistlist[CatalogObject], Table, or None

Sources to render

psfgalsim.Profile

PSF to use when rendering sources

zpfluxfloat

For non-chromatic profiles, the factor converting flux to counts / s.

skyfloat or array_like

Image or constant with the counts / pix / sec from sky.

darkfloat or array_like

Image or constant with the counts / pix / sec from dark current.

flatarray_like

Image giving the relative QE of different pixels.

xpos, yposarray_like (float)

x, y positions of each source in objlist

ignore_distant_sourcesint

Ignore sources more than this distance off image.

bandpassgalsim.Bandpass

bandpass to use for rendering chromatic objects

filter_namestr

name of filter (used to look up flux in achromatic case)

rnggalsim.BaseDeviate

random number generator

seedint

seed for random number generator

Returns:
objinfonp.ndarray

Information on position and flux of each rendered source.