Python toolbox scaffold for fast variational 1D signal and ERP alignment
Project description
FlowReg1D
Python toolbox scaffold for fast variational 1D alignment.
Under Development
This project is still in an alpha stage. Expect rapid changes, incomplete features, and possible breaking updates between releases.
- The API may evolve as we stabilize core functionality.
- Documentation and examples are incomplete.
- Feedback and bug reports are especially valuable at this stage.
Purpose
FlowReg1D is intended to provide Python workflows for 1D signal and ERP latency
alignment using the same general software style as PyFlowReg: installable
src package layout, typed options, ERP-focused TOML configuration, examples,
Sphinx documentation, pytest coverage, CLI support, and release-ready GitHub
Actions files.
The future numerical port should use these MATLAB/C++ baselines:
variational_aligner/core/align_lines.mvariational_aligner/core/align_core.cppERP_alignment/VERPA/functionsERP/Var_Alignment.mERP_alignment/VERPA/functionsERP/CrossCorrRef.m
Requirements
Python 3.10 or newer.
python -m venv .venv
.venv\Scripts\activate
pip install -e .[test]
On Linux or macOS:
python -m venv .venv
source .venv/bin/activate
pip install -e .[test]
Quickstart
The public API is already shaped for the later solver port:
import numpy as np
from flowreg1d.core import AlignmentOptions, align_lines
signals = np.random.rand(20, 500)
reference = signals.mean(axis=0)
options = AlignmentOptions(alpha=1.0, sigma=5.0, iterations=100)
registered, displacement = align_lines(signals, reference, options=options)
In this scaffold version, align_lines raises NotImplementedError.
ERP CLI Configuration
ERP alignment configuration follows the same typed-options pattern as PyFlowReg without adding higher-level workflow orchestration:
input_file = "erp_trials.npy"
output_file = "aligned_erp_trials.npy"
[alignment_options]
alpha = 1.0
sigma = 5.0
iterations = 100
levels = 40
[erp_options]
reference_method = "mean"
iter_ref = 1
fs = 200.0
denoising = "none"
Validate a configuration with:
flowreg1d erp validate --config examples/erp_config.toml
Development
pip install -e .[test,docs]
pytest
Pre-commit hooks are included for code style and file hygiene:
pip install pre-commit
pre-commit install
pre-commit run --all-files
Citation
If you use this toolbox for your work, please cite:
P. Flotho, D. Thinnes, B. Kuhn, C. J. Roome, J. F. Vibell, and D. J. Strauss, "Fast variational alignment of non-flat 1D displacements for applications in neuroimaging," Journal of Neuroscience Methods, 353, 109076, 2021. doi: 10.1016/j.jneumeth.2021.109076
BibTeX:
@article{flotho2021fast,
author = {Flotho, Philipp and Thinnes, David and Kuhn, Bernd and Roome, Christopher J. and Vibell, Jonas F. and Strauss, Daniel J.},
title = {Fast variational alignment of non-flat 1D displacements for applications in neuroimaging},
journal = {Journal of Neuroscience Methods},
volume = {353},
pages = {109076},
year = {2021},
doi = {10.1016/j.jneumeth.2021.109076}
}
If you use it for ERP alignment, please additionally cite:
D. Thinnes, P. Flotho, F. I. Corona-Strauss, D. J. Strauss, and J. F. Vibell, "Compensation of ERP Latency Jitter Using Fast Variational 1D Displacement Estimation," TechRxiv, 2025. doi: 10.36227/techrxiv.174062901.13096882/v1
BibTeX:
@article{thinnes2025erp,
author = {Thinnes, D. and Flotho, P. and Corona-Strauss, F. I. and Strauss, D. J. and Vibell, J. F.},
title = {Compensation of ERP Latency Jitter Using Fast Variational 1D Displacement Estimation},
journal = {TechRxiv},
year = {2025},
doi = {10.36227/techrxiv.174062901.13096882/v1}
}
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flowreg1d-1.0.0a1.tar.gz.
File metadata
- Download URL: flowreg1d-1.0.0a1.tar.gz
- Upload date:
- Size: 3.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11358273f5d9344400eac6f89345ba5060efd397033076cebf97d839f03fc07b
|
|
| MD5 |
c62374342e90e5964f958dcbed6c83d3
|
|
| BLAKE2b-256 |
7ee7f43ca4be49d0297185513878af52f5c64ca71026fa6d6a1f71bd04ca68f6
|
Provenance
The following attestation bundles were made for flowreg1d-1.0.0a1.tar.gz:
Publisher:
pypi-release.yml on FlowRegSuite/flowreg1D
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flowreg1d-1.0.0a1.tar.gz -
Subject digest:
11358273f5d9344400eac6f89345ba5060efd397033076cebf97d839f03fc07b - Sigstore transparency entry: 1633740008
- Sigstore integration time:
-
Permalink:
FlowRegSuite/flowreg1D@5dbd8cc734426d94d7bfbb713879f59b50f9f019 -
Branch / Tag:
refs/tags/v1.0.0a1 - Owner: https://github.com/FlowRegSuite
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-release.yml@5dbd8cc734426d94d7bfbb713879f59b50f9f019 -
Trigger Event:
push
-
Statement type:
File details
Details for the file flowreg1d-1.0.0a1-py3-none-any.whl.
File metadata
- Download URL: flowreg1d-1.0.0a1-py3-none-any.whl
- Upload date:
- Size: 30.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea925aae3f584f04a29508baefe3c8662971aa510d9ca62fccd407351f900af0
|
|
| MD5 |
7ffd0b26f5eead56995302143e3893cb
|
|
| BLAKE2b-256 |
d7bb91541c696f70940af9d274fdfb2226a24d3c2acc80e7f4290c34203a8b92
|
Provenance
The following attestation bundles were made for flowreg1d-1.0.0a1-py3-none-any.whl:
Publisher:
pypi-release.yml on FlowRegSuite/flowreg1D
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flowreg1d-1.0.0a1-py3-none-any.whl -
Subject digest:
ea925aae3f584f04a29508baefe3c8662971aa510d9ca62fccd407351f900af0 - Sigstore transparency entry: 1633740060
- Sigstore integration time:
-
Permalink:
FlowRegSuite/flowreg1D@5dbd8cc734426d94d7bfbb713879f59b50f9f019 -
Branch / Tag:
refs/tags/v1.0.0a1 - Owner: https://github.com/FlowRegSuite
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-release.yml@5dbd8cc734426d94d7bfbb713879f59b50f9f019 -
Trigger Event:
push
-
Statement type: