lsst_inaf_agile.image_simulator

Image simulation tools.

Attributes

logger

Classes

ImageSimulator

ImageSimulator class.

Module Contents

logger[source]
class ImageSimulator(dirname, catalog, filename_baseline)[source]

ImageSimulator class.

ImageSimulator interfaces with CatalogCombined in order to write instance catalogs and produce simulated images starting from the truth catalog. The class may further wrap around external image simulation software like galsim.

dirname[source]
catalog[source]
filename_baseline[source]
get_visit(observation_id=None, limit=None)[source]

Get the visit corresponding to the observation_id.

get_header(observation_id, ra_dec=None)[source]

Return the instance catalog header as a dictionary.

write_instance_catalog(observation_id: int, exptime: str = '38 29.2 29.2 29.2 29.2 29.2', ra_dec=None) list[str][source]

Write an instance catalog to a file.

Returns:

filenames – Filenames that were written as output.

Return type:

list[str]

get_catalog(band, mjd)[source]

Return the instance catalog corresponding to band and mjd.

Parameters:
  • band (str) – flux band detection e.g. ‘lsst-g’

  • mjd (int) – MJD of observation

simulate_image(observation_id, detector, logfile=None)[source]

Simulate a single image.

Runs ‘galsim’ on a single yaml configuration file to simulate a single image.

Parameters:
  • observation_id (int) – observation ID to be simulated from the baseline

  • detector (int) – which of the 189 detectors to simulate

  • logfile (str) – name of the logfile. Default is /dev/stdout. A special value of “auto” uses the .yaml file converted to a .log extension.

Returns:

exit code from running imSim

Return type:

exit_code