Utilities

The simulator utility module consists of miscellaneous utility routines intended to be of broad use. Present examples include:

  • turning astropy coordinates into galsim coordinates and vice-versa

  • making an RGB image from image slices

  • generating points at random in a region on the sky

romanisim.util Module

Miscellaneous utility routines.

Functions

skycoord(celestial)

Turn a CelestialCoord into a SkyCoord.

celestialcoord(sky)

Turn a SkyCoord into a CelestialCoord.

scalergb(rgb[, scales, gray])

Scales three flux images into an RGB image for displaying.

random_points_in_cap(coord, radius, nobj[, rng])

Choose locations at random within radius of coord.

random_points_in_king(coord, rc, rt, nobj[, rng])

Sample points from a King distribution

random_points_at_radii(coord, radii[, rng])

Choose locations at random at given radii from coord.

add_more_metadata(metadata[, usecrds])

Fill out the metadata dictionary, modifying it in place.

update_pointing_and_wcsinfo_metadata(...)

Update pointing and wcsinfo keywords to use the aperture for this SCA.

king_profile(r, rc, rt)

Compute the King profile.

sample_king_distances(rc, rt, npts[, rng])

Sample distances from a King profile.

decode_context_times(context, exptimes)

Get 0-based indices of input images that contributed to (resampled) output pixel with coordinates x and y.

default_image_meta([time, ma_table, ...])

Return some simple default metadata for input to image.simulate

update_photom_keywords(im[, gain])

Add photometry calibration keywords to image metadata.

merge_dicts(a, b)

Merge two dictionaries, replacing values in a with values in b.

calc_scale_factor(date, ra, dec)

Calculate velocity aberration scale factor