This repository hosts a custom visibility tool rtavis for real-time analysis.
To create a virtual environment with all required dependencies:
conda env create --name <envname> --file=environment.yamlNote that you should already have anaconda installed: https://www.anaconda.com/
You can then proceed to install the software:
pip install .for editable installation:
pip install -e .To complete the environment be sure to download and install the correct IRFs (only prod2 comes with ctools installation). Public IRFs can be downloaded from here: https://www.cta-observatory.org/science/cta-performance/
Under cfg you can find a sample configuration file. Description of each parameter is commented within. This file will serve as input when running the code.
After adjusting the configuration file to your needs, you can run the code as follows:
python runCatVisibility.py -f cfg/config.yamlThe output is saved via numpy as a binary NPY file. You can run an example of how to access data like this:
python readVisTable -f path/to/output.npyA notebook for useful plot and checks on the visibility is provided in the notebooks folder.
A dedicated script is available to check source visibility at ASTRI over a custom UTC time window, including Moon information:
- Moon presence (altitude)
- Moon-source angular distance (if a source is provided)
- Moon illumination
- Moon phase
Script:
python rtavis/checkVisibilityWindow_ASTRI.py --help--startand--end: UTC time window--date: convenience single-night mode (YYYY-MM-DD)--moon-only: evaluate Moon only, without a source--sourceor--source-name: resolve source name--raand--dec: provide source coordinates directly--plot: save output plot
Moon only, single night:
python rtavis/checkVisibilityWindow_ASTRI.py --moon-only --date "2025-12-11" --plot moon_night.pngMoon only, custom window:
python rtavis/checkVisibilityWindow_ASTRI.py --moon-only --start "2026-04-28" --end "2026-05-10" --plot moon_window.png --phase-label-step-deg 45With source name:
python rtavis/checkVisibilityWindow_ASTRI.py --start "2026-04-28" --end "2026-05-10" --plot source_window.png --source "Mrk 501"With source coordinates:
python rtavis/checkVisibilityWindow_ASTRI.py --start "2026-04-28" --end "2026-05-10" --plot source_window.png --ra "16:56:28" --dec "+39:45:36"