2023-11-22 13:40:16 +00:00
|
|
|
//! # Library for acoustic signal processing
|
2023-11-25 13:58:20 +00:00
|
|
|
//!
|
2024-07-11 19:10:38 +00:00
|
|
|
//! This crate contains structures and functions to perform acoustic
|
|
|
|
//! measurements, interact with data acquisition devices and apply common
|
|
|
|
//! acoustic analysis operations on them.
|
2024-07-13 07:43:01 +00:00
|
|
|
//!
|
2024-07-11 19:10:38 +00:00
|
|
|
//! You will find the following stuff in this crate:
|
2024-07-13 07:43:01 +00:00
|
|
|
//!
|
2024-08-11 11:47:24 +00:00
|
|
|
//! - Data acquisition, recording, signal generation: [daq].
|
|
|
|
//! - Power spectra estimation, transfer function estimation tools: [ps].
|
|
|
|
//! - Sound Level Meter implementation: [slm].
|
|
|
|
//! - Filter design tools. I.e. [filter::ZPKModel::butter].
|
|
|
|
//! - Includes bilinear transforms
|
|
|
|
//! - Tools for real time displaying of sensor data: [rt].
|
2024-07-11 19:10:38 +00:00
|
|
|
//!
|
|
|
|
//! ## Note to potential users
|
|
|
|
//!
|
2024-07-13 07:43:01 +00:00
|
|
|
//! **This crate is still under heavy development. API changes happen on the
|
|
|
|
//! fly. Documentation is not finished. Use with caution and expect things to be
|
2024-07-11 19:10:38 +00:00
|
|
|
//! broken and buggy. Use at your own risk and responsibility.**
|
|
|
|
//!
|
|
|
|
//! ## Author information
|
|
|
|
//!
|
|
|
|
//! The main developer is J.A. de Jong from [ASCEE](https://www.ascee.nl). In
|
2024-07-13 07:43:01 +00:00
|
|
|
//! case of bug reports, please file them to [info@ascee.nl](info@ascee.nl).
|
|
|
|
//!
|
|
|
|
//! If you have particular interest in this library, please also contact us.
|
2024-07-11 19:10:38 +00:00
|
|
|
//!
|
2023-12-13 10:02:06 +00:00
|
|
|
#![warn(missing_docs)]
|
|
|
|
#![allow(non_snake_case)]
|
|
|
|
#![allow(non_upper_case_globals)]
|
|
|
|
#![allow(unused_imports)]
|
|
|
|
|
|
|
|
mod config;
|
2024-04-19 12:09:32 +00:00
|
|
|
use config::*;
|
2023-12-13 10:02:06 +00:00
|
|
|
|
2024-04-19 12:09:32 +00:00
|
|
|
pub use config::Flt;
|
2023-12-13 10:02:06 +00:00
|
|
|
pub mod daq;
|
2024-07-11 19:10:38 +00:00
|
|
|
pub mod filter;
|
2024-06-25 14:20:47 +00:00
|
|
|
pub mod ps;
|
2023-12-13 10:02:06 +00:00
|
|
|
pub mod siggen;
|
2024-04-19 12:09:32 +00:00
|
|
|
use filter::*;
|
2024-07-18 11:06:49 +00:00
|
|
|
pub mod rt;
|
2024-08-19 18:23:29 +00:00
|
|
|
pub mod slm;
|
2023-12-13 10:02:06 +00:00
|
|
|
|
|
|
|
/// A Python module implemented in Rust.
|
2023-12-20 20:20:10 +00:00
|
|
|
#[cfg(feature = "python-bindings")]
|
2023-12-13 10:02:06 +00:00
|
|
|
#[pymodule]
|
2024-07-11 19:10:38 +00:00
|
|
|
#[pyo3(name = "_lasprs")]
|
2024-05-01 13:25:26 +00:00
|
|
|
fn lasprs(m: &Bound<'_, PyModule>) -> PyResult<()> {
|
2024-07-06 17:36:51 +00:00
|
|
|
daq::add_py_classses(m)?;
|
2023-12-13 10:02:06 +00:00
|
|
|
|
2023-11-25 13:58:20 +00:00
|
|
|
// Add filter submodule
|
2024-05-01 13:25:26 +00:00
|
|
|
m.add_class::<filter::Biquad>()?;
|
|
|
|
m.add_class::<filter::SeriesBiquad>()?;
|
|
|
|
m.add_class::<filter::BiquadBank>()?;
|
2024-05-05 13:01:50 +00:00
|
|
|
m.add_class::<siggen::Siggen>()?;
|
2024-08-11 09:58:50 +00:00
|
|
|
m.add_class::<filter::FilterSpec>()?;
|
|
|
|
m.add_class::<filter::ZPKModel>()?;
|
2024-08-26 19:57:11 +00:00
|
|
|
m.add_class::<filter::StandardFilterDescriptor>()?;
|
|
|
|
m.add_class::<slm::TimeWeighting>()?;
|
|
|
|
m.add_class::<ps::FreqWeighting>()?;
|
|
|
|
m.add_class::<slm::SLMSettings>()?;
|
|
|
|
m.add_class::<slm::SLM>()?;
|
2024-09-26 18:09:11 +00:00
|
|
|
m.add_class::<ps::WindowType>()?;
|
2024-09-26 19:13:11 +00:00
|
|
|
m.add_class::<ps::Overlap>()?;
|
2024-05-01 13:25:26 +00:00
|
|
|
|
2023-11-25 13:58:20 +00:00
|
|
|
Ok(())
|
|
|
|
}
|