simulate_counts_generic

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

Add some simulated counts to an image.

This routine intends to need to know nothing about Roman specifically. 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 electrons entering the image. For chromatic rendering, this role is instead played by the bandpass, though the exposure time is still needed to handle that part of the conversion from flux to electrons.

Then there are a few 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 quantum efficiency (QE).

  • dark: a dark model.

  • qe: relative quantum efficiency for modulating the object and sky electrons

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 electrons / s.

skyfloat or array_like

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

darkfloat or array_like

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

qearray_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.