Making images

Ultimately, romanisim builds image by feeding source profiles, world coordinate system objects, and point spread functions to galsim. The image and l1 modules currently implement this functionality.

The image module is responsible for translating a metadata object that specifies everything about the conditions of the observation into objects that the simulation can understand. The metadata object follows the metadata that real WFI images will include; see here for more information.

The parsed metadata is used to make a counts image that is an idealized image containing the number of photons each WFI pixel would collect over an observation. It includes no systematic effects or noise beyond Poisson noise from the astronomical scene and backgrounds. Actual WFI observations are more complicated than just noisy versions of this idealized image, however, for several reasons:

  • WFI pixels have a very uncertain pedestal.

  • WFI pixels are sampled “up the ramp” during an observation, so a number of reads contribute to the final estimate for the rate of photons entering each pixel.

  • WFI reads are averaged on the telescope into resultants; ground images see only resultants.

These idealized count images are then used to either make a level 2 image or a level 1 image, which are intended to include the effects of these complications. The construction of L1 images is described here, and the construction of L2 images is described here.

romanisim.image Module

Roman WFI simulator tool.

Based on galsim’s implementation of Roman image simulation. Uses galsim Roman modules for most of the real work.

Functions

add_objects_to_image(image, objlist, xpos, ...)

Add sources to an image.

gather_reference_data(image_mod[, usecrds])

Gather reference data corresponding to metadata.

in_bounds(xx, yy, imbd, margin)

Filter sources to those landing on an image.

make_asdf(slope, slopevar_rn, slopevar_poisson)

Wrap a galsim simulated image with ASDF/roman_datamodel metadata.

make_l2(resultants, read_pattern[, ...])

Simulate an image in a filter given resultants.

make_test_catalog_and_images([seed, sca, ...])

This routine kicks the tires on everything in this module.

simulate(metadata, objlist[, usecrds, ...])

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

simulate_counts(metadata, objlist[, rng, ...])

Simulate total counts in a single SCA.

simulate_counts_generic(image, exptime[, ...])

Add some simulated counts to an image.

trim_objlist(objlist, image)

Trim a Table of objects down to those falling near an image.