Skip to main content

# skymap-overlap

Compute the overlap between two skymaps

## Requirements
  • scipy-stack (numpy, scipy, matplotlib, pandas)

  • astropy

  • healpy

  • ligo.skymap (only supports Python3.X)

  • ligo-gracedb (for batch downloading skymaps)

  • pycondor

## Installation This package is available on PyPI. To install, simply run `bash pip install skymap-overlap `

## Usage ### Computing the overlap between two skymaps To compute the overlap between two skymaps $`p(Omega)`$ and $`q(Omega)`$, one can use compute_overlap to compute the overlap. Currently the script computes three overlap statistics:

1. Posterior overlap, which is defined as `math \displaystyle\int_{\rm all sky} p(\Omega)q(\Omega) \; d\Omega `

2. Normalized posterior overlap, which is defined as `math \frac{\displaystyle\int_{\rm all sky} p(\Omega)q(\Omega) \; d\Omega}{\sqrt{\displaystyle\int_{\rm all sky} p(\Omega)p(\Omega) \; d\Omega}\sqrt{\displaystyle\int_{\rm all sky} q(\Omega)q(\Omega) \; d\Omega}} `

3. 90% credible region (CR) overlap, which is defined as `math \frac{\displaystyle\int \mathbf{1}_{\rm 90\% CR} \left[ p(\Omega)\right] \mathbf{1}_{\rm 90\% CR} \left[ q(\Omega) \right] d\Omega}{{\rm min} (\displaystyle\int \mathbf{1}_{\rm 90\% CR} \left[ p(\Omega) \right] \; d\Omega , \displaystyle\int \mathbf{1}_{\rm 90\% CR} \left[ q(\Omega) \right] \; d\Omega)}, ` where $`mathbf{1}`$ is the indicator function.

4. Cross-highest posterior density (HPD) `math \max \left\{ 1 - \mathcal{H}(p, q), 1 - \mathcal{H}(q, p) \right\} ` where `math \mathcal{H}(p, q) = \int \mathbf{1} \left[ q(\Omega) > q(\Omega_{p, \mathrm{MAP}}) \right] q(\Omega) d\Omega \,, ` $`mathbf{1}`$ is the indicator function, $`Omega_{p,mathrm{MAP}}`$ is the maximum a posteriori estimate of the sky location $`Omega`$ for $`p`$.

Given two FITS skymaps, the simplest usage is ` compute_overlap --skymap SKYMAP1.fits.gz --skymap SKYMAP2.fits.gz `

### Computing the pairwise overlap between a batch of skymaps To compute the pairwise overlap between a batch of skymaps, you can use compute_overlap_from_skymaps_pipe which generates a DAG file for you to submit to a HTCondor-compatible cluster to calculate the overlap. The simplest usage is ` compute_overlap_from_skymaps_pipe --skymap SKYMAP1.fits.gz --skymap SKYMAP2.fits.gz --skymap SKYMAP3.fits.gz ` so on and so forth. There are also other options for example the accounting tag (if you are running on LDG).

### Batch downloading skymaps from GraceDB You can use download_skymap to download skymaps from GraceDB given the GID or SID. The simplest usage is ` download_skymap GID_or_SID ` By default it will download LALInference skymaps whenever possible. There is also an option –bayestar to only use skymaps generated by bayestar.

### Joint sky localization This package provides a command-line-interface tool combine_skymaps that is identical to ligo-skymap-combine [here](https://lscsoft.docs.ligo.org/ligo.skymap/tool/ligo_skymap_combine.html), except all distance information stored in the given maps will be discarded. The simplest usage is ` combine_skymaps INPUT1.fits INPUT2.fits OUTPUT.fits `

## Author Rico K. L. Lo @ka-lok.lo

Metadata

Release files for skymap-overlap 0.1.6

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

Source distribution (sdist)

Source distribution for skymap-overlap 0.1.6
File Size Uploaded Provenance Actions
skymap_overlap-0.1.6.tar.gz 10.3 kB Without provenance Details for skymap_overlap-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for skymap-overlap 0.1.6
File Interpreter ABI Platform Actions
skymap_overlap-0.1.6-py3-none-any.whl Python 3 none any Details for skymap_overlap-0.1.6-py3-none-any.whl

Total release size: 21.1 kB

Release files / skymap_overlap-0.1.6.tar.gz

Download URL skymap_overlap-0.1.6.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2152600b79e04b3e98821d0177ded67db4c306e707e4aceccf863ee68041fd0c
BLAKE2b-256 checksum
How to use checksums
968cf2d76259def5cf257862804f01c6c1eaa3348773ddb7446d44445ec960fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / skymap_overlap-0.1.6-py3-none-any.whl

Download URL skymap_overlap-0.1.6-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a1299731a8557a6ce713e789ceafbfee5f05e46e27dbbb4c51cd73fa38e1027
BLAKE2b-256 checksum
How to use checksums
755cfc0791001cf4571bfec9a6a23f6e8f596c1f4167923eed6e423eaba65cdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Security for skymap-overlap 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files No provenance

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