Skip to content

Setup and Data Requirements

After installing sensipy, you’ll need to set up the required data files to use the package effectively.

Setup checklist:

  • Compatible IRFs — CTAO IRFs are freely available on Zenodo (required)
  • EBL models — Included with package (no action needed unless you want to use a different EBL model)
  • Spectral models — Example data included (bring your own for real analysis)

Download CTAO IRFs automatically:

Terminal window
uv run sensipy-download-ctao-irfs

or in an already activated conda environment:

Terminal window
sensipy-download-ctao-irfs

This downloads IRFs to ./IRFs/CTAO. See the IRFs page for manual download instructions and details.

EBL models are included with the package. No setup required unless you want to use Gammapy’s EBL dataset. See the EBL Models page for details.

Example mock data is included with the package. See the Spectral Models page for format requirements and how to access the included mock data files.

To verify your setup is working correctly:

from sensipy.ctaoirf import IRFHouse
from sensipy.source import Source
import astropy.units as u
# Test IRF loading
print("Testing IRF loading...")
try:
house = IRFHouse(base_directory="./IRFs/CTAO")
irf = house.get_irf(
site="south",
configuration="alpha",
zenith=20,
duration=1800,
azimuth="average",
version="prod5-v0.1",
)
print("✓ IRF loading successful")
except Exception as e:
print(f"✗ IRF loading failed: {e}")
# Test spectral model loading
print("Testing spectral model loading with EBL...")
try:
from sensipy.util import get_data_path
mock_data_path = get_data_path("mock_data/GRB_42_mock.csv")
source = Source(
filepath=str(mock_data_path),
min_energy=30 * u.GeV,
max_energy=10 * u.TeV,
ebl="franceschini",
)
print("✓ Spectral model loading successful")
except Exception as e:
print(f"✗ Spectral model loading failed: {e}")

Now that your environment is set up, you can: