cabaret is a Python package to simulate astronomical images using the Gaia catalog of stars.
Documentation can be found at cabaret.readthedocs.io.
You can install cabaret in a Python (>=3.11
) environment with
pip install cabaret
or from a local clone
git clone https://github.com/ppp-one/cabaret
pip install -e cabaret
You can test the package has been properly installed with
python -c "import cabaret"
To generate an image from RA/DEC coordinates, run:
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
)
To display the image (matplotlib
required here):
import matplotlib.pyplot as plt
from cabaret.plot import plot_image
plot_image(image)
plt.show()
Explore the full documentation, API reference, and advanced usage examples at cabaret.readthedocs.io.