Metadata-Version: 2.4
Name: ligo_fir
Version: 0.1.0
Summary: FIR filter tools for LIGO data analysis.
Author-email: Aaron Viets <aaron.viets@ligo.org>, Miftahul Ma'arif <miftahul.maarif@ligo.org>, Madeline Wade <madeline.wade@ligo.org>, Louis Dartez <louis.dartez@ligo.org>
Maintainer: LIGO Calibration Group
Maintainer-email: Max Melching <max.melching@ligo.org>
License-Expression: GPL-3.0-or-later
Project-URL: Homepage, https://git.ligo.org/Calibration/ligo-fir
Project-URL: Source, https://git.ligo.org/Calibration/ligo-fir
Project-URL: Issue Tracker, https://git.ligo.org/Calibration/ligo-fir/-/issues
Project-URL: Documentation, https://calibration.docs.ligo.org/ligo-fir
Keywords: gravitational-waves,LIGO,calibration,FIR,signal-processing
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Astronomy
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: scipy
Provides-Extra: docs
Requires-Dist: sphinx<9.0.0; extra == "docs"
Requires-Dist: sphinx-immaterial-igwn; extra == "docs"
Provides-Extra: lint
Requires-Dist: mypy; extra == "lint"
Requires-Dist: mypy-extensions; extra == "lint"
Requires-Dist: pip; extra == "lint"
Requires-Dist: ruff; extra == "lint"
Provides-Extra: test
Requires-Dist: h5py; extra == "test"
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Provides-Extra: all
Requires-Dist: ligo_fir[docs]; extra == "all"
Requires-Dist: ligo_fir[lint]; extra == "all"
Requires-Dist: ligo_fir[test]; extra == "all"
Dynamic: license-file

# ligo-fir

[![PyPI version](https://badge.fury.io/py/ligo-fir.svg)](https://badge.fury.io/py/ligo-fir)
[![Conda version](https://img.shields.io/conda/vn/conda-forge/ligo-fir.svg)](https://anaconda.org/conda-forge/ligo-fir/)
[![License](https://img.shields.io/pypi/l/ligo-fir.svg)](https://choosealicense.com/licenses/gpl-3.0/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ligo-fir.svg)

A package for FIR filter functionality needed by LIGO applications such as pydarm or sgn-cal.

## Installation

On Unix systems, you can install directly from PyPI:

```shell
pip install ligo-fir
```

Alternatively, install from [conda-forge](https://conda-forge.org/):

```shell
conda install -c conda-forge ligo-fir
```

See [INSTALL.md](INSTALL.md) for installing from source and for development setups.

## Basic usage

```python
from ligo_fir import FIRfilter

# configure the filter geometry: sample rate, length, low-frequency roll-off
fir = FIRfilter(fNyq=8192, desired_dur=1.0, highpass_fcut=9.0)

# evaluate your frequency-domain model on fir.freq_array, then convert it
model = my_transfer_function(fir.freq_array)
model_FIR, double_model, window = fir.create_fir_filter(model)
```

See the [web-based documentation](https://calibration.docs.ligo.org/ligo-fir) for
a fuller walkthrough of filter generation and of the FFT, window and resampling
routines in `ligo_fir.firtools`. You can use ligo-fir either from `python`,
`ipython`, or a jupyter notebook, depending on your preferences.

## Documentation

The documentation is available at [here](https://calibration.docs.ligo.org/ligo-fir).
It is built with [Sphinx](https://www.sphinx-doc.org/) from the
[`docs/`](docs) directory. To build it locally:

```shell
python -m pip install -e ".[docs]"
make docs
```

The result lands in `docs/_build/html/index.html`.
