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)
Quick Setup
Section titled “Quick Setup”Download CTAO IRFs automatically:
uv run sensipy-download-ctao-irfsor in an already activated conda environment:
sensipy-download-ctao-irfsThis downloads IRFs to ./IRFs/CTAO. See the IRFs page for manual download instructions and details.
EBL Models
Section titled “EBL Models”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.
Spectral Models
Section titled “Spectral Models”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.
Verifying Your Setup
Section titled “Verifying Your Setup”To verify your setup is working correctly:
from sensipy.ctaoirf import IRFHousefrom sensipy.source import Sourceimport astropy.units as u
# Test IRF loadingprint("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 loadingprint("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}")Next Steps
Section titled “Next Steps”Now that your environment is set up, you can:
- Learn about IRFs setup and downloading
- Understand EBL Models and when to use them
- Learn about Spectral Models formats and requirements
- Explore the API Reference for detailed documentation