Metadata-Version: 2.4
Name: sgn-ts
Version: 0.7.0
Summary: TimeSeries Extensions for 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/sgn-ts
Project-URL: Documentation, https://docs.ligo.org/greg/sgn-ts
Project-URL: Issues, https://git.ligo.org/greg/sgn-ts/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.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: sgn>=0.6
Requires-Dist: numpy
Requires-Dist: scipy
Provides-Extra: torch
Requires-Dist: torch; extra == "torch"
Provides-Extra: plot
Requires-Dist: matplotlib; extra == "plot"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: sgn-ts[torch]; extra == "test"
Requires-Dist: sgn-ts[plot]; extra == "test"
Requires-Dist: pytest-markdown-docs; extra == "test"
Requires-Dist: gwpy; extra == "test"
Requires-Dist: gpstime; extra == "test"
Requires-Dist: sgnl-cpu-interp; 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: mkdocs-gen-files; extra == "docs"
Requires-Dist: mkdocs-literate-nav; extra == "docs"
Requires-Dist: mkdocs-section-index; extra == "docs"
Requires-Dist: pymdown-extensions; extra == "docs"
Requires-Dist: sgn-ts[plot]; 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"
Provides-Extra: dev
Requires-Dist: sgn-ts[docs]; extra == "dev"
Requires-Dist: sgn-ts[lint]; extra == "dev"
Requires-Dist: sgn-ts[test]; extra == "dev"
Dynamic: license-file

# SGN-TS

SGN-TS extends the [SGN](https://docs.ligo.org/greg/sgn/) streaming pipeline
framework with time-series data types: precise offset-based timing, uniformly
sampled buffers, frame alignment across multiple channels, and a library of
signal processing elements.

## Installation

```bash
pip install sgn-ts
```

For PyTorch-accelerated operations (resampling, array backends):

```bash
pip install sgn-ts[torch]
```

## Quick Example

Generate a sine wave, amplify it, and collect the output:

```python notest
from sgn import Pipeline
from sgnts.sources import FakeSeriesSource
from sgnts.transforms import Amplify
from sgnts.sinks import TSFrameCollectSink

src = FakeSeriesSource(
    name="src",
    source_pad_names=["out"],
    signal_type="sin",
    rate=2048,
    duration=2,
)
amp = Amplify(name="amp", factor=3.0)
snk = TSFrameCollectSink(name="snk")

Pipeline().connect(src, amp).connect(amp, snk).run()

for frame in snk.data["out"]:
    print(frame.offset, len(frame.buffers))
```

## Documentation

Full documentation is available at
[docs.ligo.org/greg/sgn-ts](https://docs.ligo.org/greg/sgn-ts/).

## Related Libraries

- [`sgn`](https://docs.ligo.org/greg/sgn/): Base streaming pipeline framework
- [`sgn-ligo`](https://git.ligo.org/greg/sgn-ligo): LIGO-specific utilities for SGN
