simulate_counts

romanisim.image.simulate_counts(metadata, objlist, rng=None, seed=None, ignore_distant_sources=10, usecrds=True, psftype='galsim', darkrate=None, flat=None, gain=None, psf_keywords={})

Simulate total electrons in a single SCA.

This gives the total electrons recorded in an idealized instrument with no systematics; it includes only distortion & PSF convolution. This total includes an appropriate amount of Poisson noise.

Parameters:
metadatadict

CRDS metadata dictionary

objlistlist[CatalogObject] or Table

Objects to simulate

rnggalsim.BaseDeviate

Random number generator to use

seedint

Seed for populating RNG. Only used if rng is None.

ignore_distant_sourcesfloat

do not render sources more than this many pixels off edge of detector

usecrdsbool

use CRDS distortion map

psftypeOne of [‘epsf’, ‘galsim’, ‘stpsf’]

How to determine the PSF. If None and usecrds then “crds” will be used otherwise “galsim”.

darkratefloat or np.ndarray[float]

dark rate image to use (electrons / s)

flatfloat or np.ndarray[float]

flat field

gainfloat or np.ndarray[float]

gain (electrons / DN)

psf_keywordsdict

keywords passed to PSF generation routine

Returns:
imagegalsim.Image

idealized image of scene as seen by Roman, giving total electron counts from rate sources (astronomical objects; backgrounds; dark current) in each pixel.

simcatobjnp.ndarray

catalog of simulated objects in image