cabaret.Observatory.generate_fits_image#
- Observatory.generate_fits_image(ra: float, dec: float, exp_time: float, file_path: str | Path | None = None, dateobs: datetime | None = None, light: int = 1, filter_band: Filters | str = Filters.G, airmass: float = 1.5, n_star_limit: int = 2000, rng: Generator = Generator(PCG64) at 0x741C17446DC0, seed: int | None = None, timeout: float | None = None, sources: Sources | None = None, wcs: WCS | None = None, fwhm_multiplier: float = 5.0, user_header: dict[str, ~typing.Any] | ~astropy.io.fits.header.Header | None=None, tap_source: GaiaTAPSource | GaiaSQLiteSource | str | None = None, tracking_ra_rate: float | Quantity = 0.0, tracking_dec_rate: float | Quantity = 0.0, n_trail_samples: int = 50, jitter_sigma: float = 0.0, additional_sources: Sources | None = None, overwrite: bool = True) HDUList[source]#
Generate a simulated FITS image of the sky.
- Parameters:
ra (float) – Right ascension of the center of the image in degrees.
dec (float) – Declination of the center of the image in degrees.
exp_time (float) – Exposure time in seconds.
file_path (str or Path, optional) – If provided, the path to save the FITS file.
user_header (dict or fits.Header, optional) – Additional header keywords to add.
dateobs (datetime, optional) – Observation date and time in UTC.
light (int, optional) – If 1, simulate light exposure; if 0, simulate dark exposure.
filter_band (Filters or str, optional) – Photometric filter to use for the simulation (default: Filters.G).
airmass (float, optional) – Airmass value for the observation (default: 1.5).
n_star_limit (int, optional) – Maximum number of stars to include in the image.
rng (numpy.random.Generator, optional) – Random number generator.
seed (int, optional) – Random number generator seed.
timeout (float, optional) – The maximum time to wait for the Gaia query to complete, in seconds. If None, there is no timeout. By default, it is set to None.
sources (Sources, optional) – A collection of sources with their sky coordinates and fluxes. If provided, these sources will be used instead of querying Gaia.
wcs (WCS or None, optional) – World Coordinate System information for the image.
fwhm_multiplier (float, optional) – Multiplier to determine the rendering radius around each star (default: 5.0).
tracking_ra_rate (float, u.Quantity, optional) – Telescope tracking rate offset in right ascension, in angular sky coordinate units per second as expected by
generate_image. Non-zero values simulate RA drift/trailing during the exposure.tracking_dec_rate (float, u.Quantity, optional) – Telescope tracking rate offset in declination, in angular sky coordinate units per second as expected by
generate_image. Non-zero values simulate Dec drift/trailing during the exposure.n_trail_samples (int, optional) – Number of samples used to integrate source motion across the exposure when simulating star trails. Larger values give smoother trails at higher computational cost.
jitter_sigma (float, optional) – 1-sigma guiding jitter in arcsec applied per trail sample (default: 0). Larger values produce broader motion blur from random tracking variations.
additional_sources (Sources, optional) – Additional
Sourcesto render in every image on top of the base source set. When supplied, they are appended to the sources obtained from Gaia, or to the explicitly providedsourcescollection; they do not replace those base sources.overwrite (bool, optional) – Whether to overwrite existing file (default: True).
- Returns:
The generated FITS HDU list.
- Return type:
fits.HDUList