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
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
Release history Release notifications | RSS feed
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)
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3c7c5b4f5fb0b99640e9eb06d18e45f788403e8d896cf4adc9c521b73fc5626
|
|
| MD5 |
22b7b89170710d70a7323424ac179ed8
|
|
| BLAKE2b-256 |
6bacb3dda5a7d6310bb591636adbd6ab50abca0f4dce839d0228685e7d4c417b
|
Provenance
The following attestation bundles were made for saftig-0.1.0.tar.gz:
Publisher:
python-publish.yml on timbk/saftig
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
saftig-0.1.0.tar.gz -
Subject digest:
c3c7c5b4f5fb0b99640e9eb06d18e45f788403e8d896cf4adc9c521b73fc5626 - Sigstore transparency entry: 273102002
- Sigstore integration time:
-
Permalink:
timbk/saftig@b399316e4614bb9dd3f5e5a0250bfa9fb29b5607 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/timbk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b399316e4614bb9dd3f5e5a0250bfa9fb29b5607 -
Trigger Event:
release
-
Statement type: