Metadata-Version: 2.4
Name: sgnl
Version: 0.3.1
Summary: Inspiral Search Pipeline using SGN Framework
Author-email: Chad Hanna <crh184@psu.edu>, Yun-Jing Huang <yzh5436@psu.edu>, James Kennington <jmk7376@psu.edu>
License: MPL-2.0
Project-URL: Homepage, https://git.ligo.org/greg/sgnl
Project-URL: Documentation, https://docs.ligo.org/greg/sgnl
Project-URL: Issues, https://git.ligo.org/greg/sgnl/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
Classifier: Operating System :: OS Independent
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: torch
Requires-Dist: pandas
Requires-Dist: ligo-gracedb[kafka]>=2.16.0
Requires-Dist: lalsuite>=8.0
Requires-Dist: igwn-ligolw>=2.1.0
Requires-Dist: igwn-segments
Requires-Dist: sgn
Requires-Dist: sgn-ts
Requires-Dist: sgn-ligo
Requires-Dist: sgn-skig
Requires-Dist: gw-strike
Requires-Dist: sgnl-cpu-interp>=0.2.0
Requires-Dist: sgnl-pastro
Requires-Dist: sgnl-config
Requires-Dist: flask
Requires-Dist: dcc
Requires-Dist: ligo-scald>=0.8.5
Requires-Dist: pexpect
Requires-Dist: pelicanfs
Requires-Dist: python-gitlab
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: lalsuite; extra == "test"
Requires-Dist: gwpy; extra == "test"
Provides-Extra: docs
Requires-Dist: mkdocs; extra == "docs"
Requires-Dist: mkdocstrings; extra == "docs"
Requires-Dist: mkdocstrings-python; extra == "docs"
Requires-Dist: mkdocs-material; extra == "docs"
Requires-Dist: pymdown-extensions; extra == "docs"
Provides-Extra: lint
Requires-Dist: black; extra == "lint"
Requires-Dist: flake8; extra == "lint"
Requires-Dist: flake8-bandit; extra == "lint"
Requires-Dist: flake8-black; extra == "lint"
Requires-Dist: flake8-bugbear; extra == "lint"
Requires-Dist: flake8-future-annotations; extra == "lint"
Requires-Dist: flake8-isort; extra == "lint"
Requires-Dist: flake8-logging; extra == "lint"
Requires-Dist: flake8-pyproject; extra == "lint"
Requires-Dist: isort; extra == "lint"
Requires-Dist: mypy; extra == "lint"
Requires-Dist: mypy-extensions; extra == "lint"
Requires-Dist: types-requests; extra == "lint"
Requires-Dist: types-PyYAML; extra == "lint"
Provides-Extra: dev
Requires-Dist: sgnl[docs]; extra == "dev"
Requires-Dist: sgnl[lint]; extra == "dev"
Requires-Dist: sgnl[test]; extra == "dev"
Provides-Extra: dag
Requires-Dist: ezdag; extra == "dag"

<h1 align="center">SGNL</h1>

<p align="center">SGN inspiraL: a scalable, low-latency compact binary coalescence search pipeline built on <a href="https://git.ligo.org/greg/sgn">sgn</a></p>

<p align="center">
  <a href="https://git.ligo.org/greg/sgnl/-/pipelines/latest">
    <img alt="ci" src="https://git.ligo.org/greg/sgnl/badges/main/pipeline.svg" />
  </a>
  <a href="https://git.ligo.org/greg/sgnl/-/pipelines/latest">
    <img alt="coverage" src="https://git.ligo.org/greg/sgnl/badges/main/coverage.svg" />
  </a>
  <a href="https://greg.docs.ligo.org/sgnl/">
    <img alt="documentation" src="https://img.shields.io/badge/docs-mkdocs%20material-blue.svg?style=flat" />
  </a>
  <a href="https://pypi.org/project/sgnl/">
    <img alt="pypi version" src="https://img.shields.io/pypi/v/sgnl.svg" />
  </a>
  <a href="https://arxiv.org/abs/2511.04730">
    <img alt="arXiv" src="https://img.shields.io/badge/arXiv-2511.04730-b31b1b.svg" />
  </a>
</p>

---

SGNL is a matched-filtering search pipeline for gravitational waves from
compact binary mergers. It reimplements the methods of the GstLAL pipeline on
the [`sgn`](https://git.ligo.org/greg/sgn) streaming framework, with a
PyTorch filtering core that runs on CPUs or GPUs. The same building blocks
power both the **low-latency (online)** analysis, which streams candidates to
GraceDB within seconds, and the **offline** analysis used for archival
searches.

Design, implementation, and performance results are described in
[*SGNL: Scalable Low-Latency Gravitational Wave Detection Pipeline for Compact
Binary Mergers*](https://arxiv.org/abs/2511.04730) (Huang et al. 2025).

## Features

- **LLOID filtering**: SVD-decomposed template banks filtered with multi-rate
  time-domain FIR filters, implemented as `sgn` transforms in PyTorch.
- **Ranking and significance**: likelihood-ratio ranking statistics and FAR
  assignment via [`gw-strike`](https://git.ligo.org/greg/strike).
- **Low-latency alerts**: GraceDB event uploads, p(astro) via
  [`sgnl-pastro`](https://git.ligo.org/greg/sgnl-pastro), event plotting, and
  live monitoring (range, trigger counts, PSDs).
- **Workflow generation**: HTCondor DAGs for both online and offline
  analyses.
- **Results and diagnostics**: injection (sim) pages, results pages, PSD
  plots, and offline event-investigation tools.

## Installation

```bash
pip install sgnl
```

SGNL requires Python 3.11 or newer. For a full development environment
(including the containerized setup used for production analyses), see the
[installation guide](https://greg.docs.ligo.org/sgnl/install/). A container
image is also published at `containers.ligo.org/greg/sgnl:latest`.

## Getting started

The [documentation](https://greg.docs.ligo.org/sgnl/) has step-by-step
tutorials:

- [Online CBC analysis](https://greg.docs.ligo.org/sgnl/tutorials/online_analysis/)
- [Offline CBC analysis](https://greg.docs.ligo.org/sgnl/tutorials/offline_analysis/)

A few of the main command-line tools:

| Command | Purpose |
| --- | --- |
| `sgnl-inspiral` | Run the matched-filtering inspiral search |
| `sgnl-dagger` | Generate an offline analysis DAG |
| `sgnl-ll-dagger` | Generate a low-latency (online) analysis DAG |
| `sgnl-inspiral-svd-bank` | Build SVD banks from a template bank |
| `sgnl-reference-psd` | Measure a reference PSD from strain data |
| `sgnl-assign-likelihood` / `sgnl-assign-far` | Rank candidates and assign FARs |
| `sgnl-ll-inspiral-event-uploader` | Upload low-latency candidates to GraceDB |
| `sgnl-results-page` / `sgnl-sim-page` | Produce results and injection summary pages |

Every tool supports `--help`; see the
[API reference](https://greg.docs.ligo.org/sgnl/) for the full list.

## The SGN family

SGNL is the CBC application layer of a family of libraries built on SGN:

- [`sgn`](https://greg.docs.ligo.org/sgn/): base streaming framework
- [`sgn-ts`](https://greg.docs.ligo.org/sgn-ts/): time-series utilities
- [`sgn-ligo`](https://greg.docs.ligo.org/sgn-ligo/): LIGO/LSC-specific sources, sinks, and utilities

## Contributing

Issues and merge requests are welcome at
[git.ligo.org/greg/sgnl](https://git.ligo.org/greg/sgnl). See the
[developer guide](https://greg.docs.ligo.org/sgnl/dev-guide/contributing/)
for setup, testing, and style conventions.

## Citing

If you use SGNL in your work, please cite
[arXiv:2511.04730](https://arxiv.org/abs/2511.04730).

## License

SGNL is distributed under the [Mozilla Public License 2.0](https://www.mozilla.org/en-US/MPL/2.0/).
