API#

The Observatory#

The Observatory class is the main entry point for simulating astronomical images.

cabaret.Observatory([name, camera, focuser, ...])

Observatory configuration.

The Observatory Devices#

The Observatory class encapsulates the configuration of all key devices at an observatory, as well as its site.

cabaret.Camera([name, width, height, bin_x, ...])

Camera configuration and properties.

cabaret.Focuser([position, best_position, ...])

A simple focuser model for simulating the effect of defocus on image quality.

cabaret.Telescope([focal_length, diameter, ...])

Telescope configuration.

cabaret.Site([sky_background, seeing, ...])

Observatory site configuration.

A notable feature of the Camera class is its support for pixel defects, which are documented in the pixel defects section.

Generating images#

The simulation of images uses two important concepts:

  • Filters: Photometric bands (e.g., G, R, I) that determine the wavelength range in which the catalog fluxes are extracted for the simulation.

  • GaiaQuery: Provides methods to query star catalogs such as Gaia and 2MASS, returning tables or ready-to-use Sources objects for simulations. Query backends can be selected via GaiaTAPSource (or by passing "GAIA" / "VIZIER" as a string) or via GaiaSQLiteSource / sqlite:///... for offline catalogs.

  • Sources: Representations of stars with positions and fluxes, either queried from catalogs or provided directly.

cabaret.Filters(*values)

Allowed Gaia and 2MASS flux filter_band strings.

cabaret.GaiaQuery()

Class to query Gaia DR3 data and retrieve sources.

cabaret.GaiaSQLiteSource(database[, table])

Configuration for querying a local SQLite catalog.

cabaret.GaiaTAPSource(*values)

TAP service endpoints for Gaia DR3 data.

cabaret.Sources(coords, fluxes[, ra_rates, ...])

A collection of sources with their sky coordinates and fluxes.