Skip to content

Overview

sensipy is a Python toolkit for simulating gamma-ray follow-up observations of time-variable astrophysical sources. It is specifically designed to work with many different instruments and builds on top of gammapy, the open-source Python package for gamma-ray astronomy.

Many of the most exciting astrophysical phenomena are transient—gamma-ray bursts, flaring active galactic nuclei, novae, and electromagnetic counterparts to gravitational wave events all evolve on timescales from seconds to days. sensipy helps answer a fundamental question: Given a source that changes with time, can we detect it with a gamma-ray telescope?

The package helps to simulate how quickly a gamma-ray telescope can detect a time-variable source given the following inputs:

  • A time-evolving spectral energy distribution (SED)
  • Instrument response functions (IRFs) for specific observing conditions
  • Realistic observational constraints (delays, exposure times, sensitivity limits)

Sensitivity Calculations

Calculate differential or integral sensitivity curves for gamma-ray observatories using instrument response functions and spectral models. For example, you can produce plots like the Sensitivity vs Observation Time curves of CTAO page.

Exposure Time Calculations

Calculate the observation time needed to detect a source with a given spectral model at a specified significance level.

Followup Calculations

Use lookup tables to quickly calculate required exposure times for observing sources with specific models and observing conditions.

EBL Models

Built-in support for extragalactic background light (EBL) absorption models to account for gamma-ray attenuation over cosmological distances.

The package requires the following inputs:

  • Time-resolved spectral models: Spectra that evolve over time, representing the source emission (e.g., gamma-ray burst models)
  • Instrument Response Functions (IRFs): CTAO IRFs that define the telescope’s sensitivity under specific observing conditions
  • Observational parameters: Energy range, observation delays, target significance levels, and other constraints

A typical workflow with sensipy involves:

  1. Loading IRFs for your target observatory and observing conditions
  2. Preparing a spectral model of the transient source (CSV or FITS format)
  3. Calculating sensitivity curves using Gammapy or pre-computed templates
  4. Simulating observations to determine detection times and required exposures
  5. Analyzing results to understand detectability under different scenarios

sensipy is particularly useful for:

  • Mission planning: Determining optimal observing strategies for gamma-ray followup campaigns
  • Sensitivity studies: Understanding detection prospects for different source models and observing conditions
  • Heatmap generation: Creating visualizations showing detection fractions across your parameter space
  • Quick lookups: Using pre-computed lookup tables to rapidly assess detectability during transient alerts