Skip to main content

Python package for INTEGRAL IBIS/ISGRI lightcurve analysis

Project description

ISGRI

Python toolkit for INTEGRAL/ISGRI data analysis.

Features

📊 SCW Catalog Query

Query INTEGRAL Science Window catalogs with a fluent Python API:

  • Filter by time, position, quality, revolution
  • Calculate detector offsets
  • Export results to FITS/CSV

💡 Light Curve Analysis

Extract and analyze ISGRI light curves:

  • Event loading with PIF weighting
  • Custom time binning
  • Module-by-module analysis
  • Quality metrics (chi-squared tests)
  • Time conversions (IJD ↔ UTC)

Installation

pip install isgri

Quick Start

Query SCW Catalog

from isgri.catalog import ScwQuery

# Load catalog
cat = ScwQuery("path_to_catalog.fits")

# Find Crab observations in 2010 with good quality
results = (cat
    .time(tstart="2010-01-01", tstop="2010-12-31")
    .quality(max_chi=2.0)
    .position(ra=83.63, dec=22.01, fov_mode="full")
    .get()
)

print(f"Found {len(results)} observations")

Analyze Light Curves

from isgri.utils import LightCurve, QualityMetrics

# Load events with PIF weighting
lc = LightCurve.load_data(
    events_path="isgri_events.fits",
    pif_path="source_model.fits",
    pif_threshold=0.5
)

# Create 1-second binned light curve
time, counts = lc.rebin(binsize=1.0, emin=20, emax=100)

# Compute quality metrics
qm = QualityMetrics(lc, binsize=1.0, emin=20, emax=100)
chi = qm.raw_chi_squared()
print(f"Chisq/dof = {chi:.2f}")

Documentation

Project Structure

isgri/
├── catalog/          # SCW catalog query tools
│   ├── scwquery.py   # Main query interface
│   └── wcs.py        # Coordinate transformations
└── utils/            # Light curve analysis utilities
    ├── lightcurve.py # Light curve class
    ├── quality.py    # Quality metrics
    ├── pif.py        # PIF tools
    ├── file_loaders.py
    └── time_conversion.py

Requirements

  • Python ≥ 3.10
  • astropy
  • numpy

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

isgri-0.4.0.tar.gz (66.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

isgri-0.4.0-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

Details for the file isgri-0.4.0.tar.gz.

File metadata

  • Download URL: isgri-0.4.0.tar.gz
  • Upload date:
  • Size: 66.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for isgri-0.4.0.tar.gz
Algorithm Hash digest
SHA256 b4370e322552122255c84d15a2323d9d0bac91b3f1a8c016568afcdf650d31b6
MD5 6fb22e98fb1f858e7a8c2bb16538bad9
BLAKE2b-256 e5d48200a689cdd8dcd20015848fc71fdb35e2bb44a61fdeca16ddaaaade90c7

See more details on using hashes here.

File details

Details for the file isgri-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: isgri-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 24.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for isgri-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ec230a04c5e238eaa4e60ef291f502bd1d0f9f5053c01fd76d0b21739c88b4ff
MD5 e53a585bda3519f2d006f8e024c852dc
BLAKE2b-256 460395466b320614d9c234915c70a39df92f11ab5a43ecdeaaae2152e6230496

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page