Skip to main content

openreadout_signal/
lib.rs

1//! Signal processing on top of OpenReadout's readers.
2//!
3//! - [`nmr`]: 1-D NMR processing from the free induction decay (digital-filter group-delay
4//!   removal, apodization, zero filling, Fourier transform, phase correction from stored or
5//!   automatically fitted phases, baseline correction, ppm referencing) and peak picking /
6//!   integration on a processed spectrum (computed here or stored by the vendor software).
7//!   Notes and vocabulary: `docs/formats/nmr-processing.md`; provenance:
8//!   `docs/provenance/nmr-processing.md`.
9//! - [`ephys`]: patch-clamp analysis (action-potential detection and features per sweep,
10//!   rheobase and f–I curve from the protocol's command waveform, passive membrane properties,
11//!   voltage-clamp holding current and test-pulse metrics) and extracellular threshold-crossing
12//!   spike detection on band-pass filtered signals. Notes and vocabulary:
13//!   `docs/formats/ephys-analysis.md`; provenance: `docs/provenance/ephys-analysis.md`.
14//!
15//! Everything works on the core `Dataset` interface, so any reader that exposes traces
16//! (Bruker, Varian, JEOL; ABF, ATF, NWB, Neuralynx, Blackrock, SpikeGLX, Intan, …) can be
17//! analysed. Nothing here panics on odd input: empty, constant or non-finite signals produce
18//! empty results or a clean error.
19#![forbid(unsafe_code)]
20#![warn(missing_docs)]
21// Numerical code: short names follow the formulas in the module docs, and `!(x > t)` is the
22// deliberate NaN-rejecting form of a threshold test.
23#![allow(clippy::many_single_char_names, clippy::neg_cmp_op_on_partial_ord)]
24
25pub mod api;
26pub mod ephys;
27pub mod fft;
28pub mod nmr;
29
30pub use fft::Complex;