Skip to main content

Implementations of different static and adaptive filtering techniques for the prediction of a correlated signal component from witness signals.

Project description

saftig – Static & Adaptive Filtering Techniques In Gravitational-wave-research

Test status Linting status

Python implementations of different static and adaptive filtering techniques for the prediction of a correlated signal component from witness signals. The main goal is to provide a unified interface for the different filtering techniques.

Features

Static:

  • Wiener Filter (WF)

Adaptive

  • Updating Wiener Fitler (UWF)
  • Least-Mean-Squares Filter (LMS)

Non-Linear:

  • Experimental non-linear LMS Filter variant (PolynomialLMS)

Minimal example

>>> import saftig as sg
>>>
>>> # generate data
>>> n_channel = 2
>>> witness, target = sg.TestDataGenerator([0.1]*n_channel).generate(int(1e5))
>>>
>>> # instantiate the filter and apply it
>>> filt = sg.LMSFilter(n_filter=128, idx_target=0, n_channel=n_channel)
>>> filt.condition(witness, target)
>>> prediction = filt.apply(witness, target) # check on the data used for conditioning
>>>
>>> # success
>>> sg.RMS(target-prediction) / sg.RMS(prediction)
0.08221177645361015

Terminology

  • Witness signal w: One or multiple sensors that are used to make a prediction
  • Target signal s: The goal for the prediction

Useful commands

make # run linter, testing and generate documentation
make test # run just the tests
make view # build and open documentation
make coverage # report test coverage in terminal
make cweb # full test coverage report with html

make ie # install as editable package
make testpublish # build and push to test pypi

# run an individual test
python -m unittest testing.test_wf

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

saftig-0.1.0.tar.gz (34.8 kB view details)

Uploaded Source

File details

Details for the file saftig-0.1.0.tar.gz.

File metadata

  • Download URL: saftig-0.1.0.tar.gz
  • Upload date:
  • Size: 34.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for saftig-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c3c7c5b4f5fb0b99640e9eb06d18e45f788403e8d896cf4adc9c521b73fc5626
MD5 22b7b89170710d70a7323424ac179ed8
BLAKE2b-256 6bacb3dda5a7d6310bb591636adbd6ab50abca0f4dce839d0228685e7d4c417b

See more details on using hashes here.

Provenance

The following attestation bundles were made for saftig-0.1.0.tar.gz:

Publisher: python-publish.yml on timbk/saftig

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page