Skip to main content

GW detector inspiral range calculation tools

The inspiral_range package provides tools for calculating various binary inspiral range measures useful as figures of merit for gravitational wave detectors characterized by a strain noise spectral density.

It includes a command-line tool for calculating various inspiral ranges from a supplied file of detector noise spectral density (either ASD or PSD).

See the following references for more information:

Authors:

Installation

inspiral_range is available via pip and conda.

$ pip install inspiral_range

inspiral_range depends on scipy for various optimization routines, and astropy for cosmology calculations. The LSC Algorithm Library (LAL) can also be used for faster versions of some calculations. The LAL dependencies (both lal and lalsimulation) can be found in the lalsuite package in pip or conda, or in native packaging available for the various IGWN supported operating systems. Use the lal extra flag during pip installation to pull in the LAL dependencies:

$ pip install inspiral_range[lal]

Note the following caveats:

cosmology

inspiral_range needs to calculate luminosity distance and differential comoving volume as a function of redshift, which requires specifying a cosmology model. Two different packages are supported for these cosmological calculations:

  • astropy (default): pure python and widely available, but slow
  • lal: not pure python so not as accessible, but much faster

waveform generation

inspiral_range needs the amplitude of strain waveforms of binary inspiral signals in order to calculate the detection SNR for a given detector noise spectrum. Included in the package is a cached interpolant for equal mass, non-spinning BBH systems. For range calculations for other systems (non-equal masses, including spin) the lalsimulation package is required for waveform calculations.

other requirements

Other python package requirements:

  • numpy
  • scipy
  • gpstime (CLI)
  • gwpy (CLI LIGO data fetching)
  • nds2-client (CLI LIGO data fetching)
  • yaml (CLI output)
  • matplotlib (CLI plotting)

Usage

library usage

The package includes multiple functions for calculating various range measures for a given PSD.

Analytical methods:

  • sensemon_range
  • sensemon_horizon
  • int73

Cosmologically-corrected measures (see arxiv:1709.08079):

  • horizon (Mpc)
  • horizon_redshift (z)
  • volume (Mpc^3)
  • range (Mpc)
  • response_frac (Mpc)
  • response_frac_redshift (z)
  • reach_frac (Mpc)
  • reach_frac_redshift (z)

By default, all functions calculate measures for 1.4/1.4 M_sol BNS inspirals:

>>> import inspiral_range
>>> freq, psd = np.loadtxt('PSD.txt')
>>> range_bns = inspiral_range.range(freq, psd)

But other masses can be used as well:

>>> range_bbh = inspiral_range.range(freq, psd, m1=30, m2=30)

When calculating multiple measures together it is more efficient to generate the fiducial waveform first and then pass it to the various functions:

>>> H = inspiral_range.CBCWaveform(freq, m1=30, m2=30)
>>> horizon = inspiral_range.horizon(freq, psd, H=H)
>>> range = inspiral_range.range(freq, psd, H=H)

The cosmology being used can be modified with the Cosmology class:

>>> cosmo = inspiral_range.Cosmology(h=70.0)
>>> H = inspiral_range.CBCWaveform(freq, cosmo=cosmo)

The 'cosmo' parameter can also be supplied directly to the range calculator:

>>> range = inspiral_range.range(freq, psd, cosmo=cosmo)

A convenience function all_ranges is included that calculates most of the range metrics together in an efficient way (all return values in Mpc):

  • range
  • horizon
  • response_50
  • response_10
  • reach_50
  • reach_90
  • sensemon_range
  • sensemon_horizon

e.g.:

>>> metrics, H = inspiral_range.all_ranges(freq, psd)

command line interface

The package also include a command line interface for easily calculating ranges for a given ASD or PSD specified in a two-column text file:

$ python3 -m inspiral_range -p PSD.txt m1=30 m2=30

LIGO "official" range from calibrated strain data

The CLI can also calculate the range from LIGO's calibrated strain data using the --ligo option and a time specified in either GPS or natural language, e.g.:

$ python3 -m inspiral_range --ligo '2017-08-17 12:41:04 UTC'

This requires gwpy with NDS to retrieve the data.

Metadata

Release files for inspiral-range 0.9.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for inspiral-range 0.9.3
File Size Uploaded
inspiral_range-0.9.3.tar.gz 340.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for inspiral-range 0.9.3
File Interpreter ABI Platform
inspiral_range-0.9.3-py3-none-any.whl Python 3 none any Details

Total release size: 679.7 kB

Release files / inspiral_range-0.9.3.tar.gz

Download URL inspiral_range-0.9.3.tar.gz
Size 340.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5b0ec4789ce227e8a73a2fee9470a78a4e0800836cb3dc46ae2d76f445555c88
BLAKE2b-256 checksum
How to use checksums
5ee3081f013f132e7fdf597275e49be53a2cadb073e04b7b5c72a02e73cfcbe0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / inspiral_range-0.9.3-py3-none-any.whl

Download URL inspiral_range-0.9.3-py3-none-any.whl
Size 339.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f3a4c5b0c1a2d0099c9a2b6f22adf725eb8930699b48ac8922caf88fd36dc810
BLAKE2b-256 checksum
How to use checksums
dd5c98071f884af02def3109bc69c2d28ea9f5aa50cb6cf99960f97b301e9ad4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

0.9.3 This release

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page