1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
//! # Sciport-rs
//!
//! Sciport is a collection of mathematical algorithms ported from the popular python package Scipy
//!
//! # Api design
//!
//! The main philosophy behind sciport is to change the api surface of scipy to better utilize the
//! rich rust typesystem, when deciding between keeping the original function signature and
//! rewriting it to better represent the valid input space, more often than not we'll decide to
//! change it.<br/>
//! for example this is the scipy butter filter api:
//!
//! ```python
//! scipy.signal.butter(N: int, Wn: array_like, btype: String, analog: bool, output: String, fs:
//! float)
//! ```
//!
//! Wn represents a single or a pair of frequencies and btype is the type of filter,
//! however, a single frequency makes sense only for a subset of btypes and so does a pair,
//! in our implementation we rewrite this function like:
//!
//! ```ignore
//! fn filter<T>(order: u32, band_filter: BandFilter, analog: Analog) { .. }
//! ```
//!
//! where T represents the output representation of the filter (Zpk, Ba, Sos), band_filter
//! encapsulates the original Wn and btype like this:
//!
//! ```ignore
//! enum BandFilter
//!
//! pub enum BandFilter {
//! Highpass(f64),
//! Lowpass(f64),
//! Bandpass { low: f64, high: f64 },
//! Bandstop { low: f64, high: f64 },
//! }
//! ```
//!
//! and analog encapsulates analog and fs (since a sampling rate makes sense only when talking
//! about a digital filter) like this:
//!
//! ```ignore
//! pub enum Analog {
//! True,
//! False {
//! fs: f64
//! }
//! }
//! ```
//!
//! # Modules
//!
//! ## Signal Processing
//!
//! The signal processing toolbox currently contains some filtering functions, a limited set of filter design tools, and a few B-spline interpolation algorithms for 1- and 2-D data. While the B-spline algorithms could technically be placed under the interpolation category, they are included here because they only work with equally-spaced data and make heavy use of filter-theory and transfer-function formalism to provide a fast B-spline transform.
//!
//! ## Special
//!
//! The main feature of this module is the definition of numerous special functions
//! of mathematical physics. Available functions include airy, elliptic, bessel, gamma, beta,
//! hypergeometric, parabolic cylinder, mathieu, spheroidal wave, struve, and kelvin.
//!
pub mod signal;
pub mod special;