Quickstart

Quickstart#

This quickstart shows how to generate a synthetic astronomical image using cabaret and display it.

First, create an image by specifying the sky coordinates and exposure time.

import cabaret

image = cabaret.Observatory().generate_image(
    ra=12.33230,  # right ascension in degrees
    dec=30.4343,  # declination in degrees
    exp_time=10,  # exposure time in seconds
)

We can display the image using the convenience function plot_image (requires matplotlib):

from cabaret.plot import plot_image

_ = plot_image(image, title="Basic simulated image")
../_images/4241e4933b5df233870a053ca352d746febf7cbda2cc30492e6c6a61f47bab1d.png

You have generated your first synthetic astronomical image with cabaret! Look at the tutorials to learn how to customize observatory settings and simulate more complex scenarios.