Initial commit
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
//! # rtx-neuro-signal
|
||||
//!
|
||||
//! Signal processing for MEG/EEG neuroimaging data.
|
||||
//!
|
||||
//! ## Features
|
||||
//!
|
||||
//! - **Filtering**: Bandpass, highpass, lowpass, notch filters
|
||||
//! - **Artifact Removal**: SSP, ICA
|
||||
//! - **Resampling**: Up/downsampling with anti-aliasing
|
||||
//! - **Baseline Correction**: Mean, median, zscore normalization
|
||||
//! - **Time-Frequency**: Morlet wavelets, STFT, PSD
|
||||
|
||||
#![warn(missing_docs)]
|
||||
|
||||
pub mod baseline;
|
||||
pub mod filter;
|
||||
pub mod ica;
|
||||
pub mod resample;
|
||||
pub mod ssp;
|
||||
pub mod tfr;
|
||||
|
||||
// Re-export main types
|
||||
pub use baseline::{BaselineMethod, baseline_correct};
|
||||
pub use filter::{FilterMethod, bandpass, highpass, lowpass, notch};
|
||||
pub use ica::{Ica, IcaMethod};
|
||||
pub use ssp::SspProjector;
|
||||
pub use tfr::{
|
||||
CycleSpec, PsdResult, StftResult, TfrOutput, TfrResult, Window, psd_multitaper, psd_welch,
|
||||
stft, tfr_morlet, tfr_morlet_adaptive,
|
||||
};
|
||||
|
||||
/// Signal processing error types
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
pub enum SignalError {
|
||||
/// Invalid filter parameters
|
||||
#[error("Invalid filter parameters: {0}")]
|
||||
InvalidParameters(String),
|
||||
|
||||
/// Data length error
|
||||
#[error("Invalid data length: {0}")]
|
||||
InvalidLength(String),
|
||||
|
||||
/// Numerical error
|
||||
#[error("Numerical error: {0}")]
|
||||
Numerical(String),
|
||||
}
|
||||
|
||||
/// Result type for signal processing operations
|
||||
pub type SignalResult<T> = Result<T, SignalError>;
|
||||
Reference in New Issue
Block a user