simulate

romanisim.image.simulate(metadata, objlist, usecrds=True, psftype='galsim', level=2, crparam={}, persistence=None, seed=None, rng=None, psf_keywords={}, extra_counts=None, **kwargs)

Simulate a sequence of observations on a field in different bandpasses.

Parameters:
metadatadict

metadata structure for Roman asdf file, including information about

  • pointing: metadata[‘wcsinfo’][‘ra_ref’], metadata[‘wcsinfo’][‘dec_ref’]

  • date: metadata[‘exposure’][‘start_time’]

  • sca: metadata[‘instrument’][‘detector’]

  • bandpass: metadata[‘instrument’][‘optical_detector’]

  • ma_table_number: metadata[‘exposure’][‘ma_table_number’]

  • read_pattern: metadata[‘exposure’][‘read_pattern’]

objlistlist[CatalogObject] or Table

List of objects in the field to simulate

usecrdsbool

use CRDS to get reference files

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

How to determine the PSF.

levelint

0, 1 or 2, specifying level 1 or level 2 image 0 makes a special idealized total electrons image; these are only intended for testing purposes and are not supported.

persistenceromanisim.persistence.Persistence

persistence object to use; None for no persistence

crparamdict

Parameters for cosmic ray simulations. None for no cosmic rays. Empty dictionary for default parameters.

rnggalsim.BaseDeviate

Random number generator to use

seedint

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

psf_keywordsdict

Keywords passed to the PSF generation routine. For STPSF, this dict can also include an “stpsf_options” dictionary to specify WFI object options (e.g. defocus, jitter).

extra_countsndarray, galsim.Image (optional)

An additional array that just gets added into the counts image. Useful for wrapping idealized images into L1/L2 images + the Roman datamodel.

Returns:
imageroman_datamodels model

simulated image

extrasdict

Dictionary of additionally valuable quantities. Includes at least simcatobj, the image positions and fluxes of simulated objects. It may also include information on persistence and cosmic ray hits.