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/5ced4989d68ee0f50e8305d13cbd6a2a15925d1126f9b4e958b27168c0ee30b3.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.