Metadata-Version: 2.4
Name: gwfolding
Version: 0.1.0
Summary: Folding of Stochastic Intermediate Data (SID) to one sidereal day for stochastic gravitational-wave searches.
Author: Anirban Ain, Prathamesh Dalvi, Sanjit Mitra, Erik Floden
Maintainer-email: Jishnu Suresh <jishnu.suresh@ligo.org>
License: MIT
Project-URL: Homepage, https://github.com/jishnu-suresh/gwfolding
Project-URL: Source, https://github.com/jishnu-suresh/gwfolding
Project-URL: Issues, https://github.com/jishnu-suresh/gwfolding/issues
Keywords: gravitational-waves,stochastic,ligo,folding,sidereal
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Astronomy
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: scipy
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Dynamic: license-file

# gwfolding

<p align="center">
  <img src="https://raw.githubusercontent.com/jishnu-suresh/gwfolding/main/assets/logo.png" alt="gwfolding logo" width="360">
</p>

Folding of **Stochastic Intermediate Data (SID)** frames to one sidereal day for
stochastic gravitational-wave searches. The output can be written as folded SID
(`.gwf`) frames.

Mathematical details are described in the LIGO technical document **T0900093**.

## Prerequisite: the `Fr` frame library (not on PyPI)

This package reads and writes gravitational-wave frame files via the `Fr` module
(`frgetvect` / `frputvect`). `Fr` is **not** distributed on PyPI and is **not**
installed by `pip`. It must already be available in your Python environment,
typically from the **conda / IGWN** software stack used for LIGO/Virgo analysis.

Install or activate your IGWN/conda environment so that the following works
before using this package:

```python
from Fr import frgetvect, frputvect
```

If that import fails, install the frame library from your conda/IGWN channel
first.

## Installation

```bash
pip install gwfolding
```

This installs the pure-Python package and its PyPI dependencies (`numpy`,
`scipy`). The `Fr` frame library must be provided separately (see above).

## Usage

```python
from gwfolding import foldSID

foldedInvCov, foldedStatistic, params, foldParams = foldSID(
    "foldSID.par",   # path to the parameter file
    writeFrames=1,   # write folded SID frames
)
```

A worked example runner is provided in `run_foldSID.py`, and an example
parameter file in `foldSID.par.txt`.

## Authors

- **Authors:** Anirban Ain, Prathamesh Dalvi, Sanjit Mitra
- **Python translation:** Erik Floden
- **Data production & maintainer:** Jishnu Suresh (`jishnu.suresh@ligo.org`)

## License

MIT. See `LICENSE`.
