Wavelet - A library for online estimation of the Continuous Wavelet Transform
0.1-alpha
|
Minimal-delay Wavelet Filterbank. More...
#include <filterbank.hpp>
Public Types | |
enum | Optimisation : unsigned char { NONE = 0, STANDARD = 1, AGRESSIVE = 2 } |
Optimisation level of the filterbank implementation. More... | |
Public Member Functions | |
Constructors | |
Filterbank (float samplerate, float frequency_min, float frequency_max, float bands_per_octave) | |
Constructor. More... | |
Filterbank (Filterbank const &src) | |
Copy Constructor. More... | |
Filterbank & | operator= (Filterbank const &src) |
Assignment operator. More... | |
virtual | ~Filterbank () |
Destructor. | |
Accessors | |
template<typename T > | |
void | setAttribute (std::string attr_name, T attr_value) |
set attribute value by name More... | |
template<typename T > | |
T | getAttribute (std::string attr_name) const |
get attribute value by name More... | |
Online Estimation | |
void | update (float value) |
update the filter with an incoming value | |
void | reset () |
clear the current data buffer | |
Utilities | |
std::size_t | size () const |
get number of bands More... | |
std::string | info () const |
get info on the current configuration More... | |
std::vector< int > | delaysInSamples () const |
get the delays in sample for each filter More... | |
std::string | __str__ () |
"print" method for python => returns the results of write method More... | |
Public Attributes | |
Attribute< float > | frequency_min |
Minimum Frequency of the Filterbank (Hz) | |
Attribute< float > | frequency_max |
Maximum Frequency of the Filterbank (Hz) | |
Attribute< float > | bands_per_octave |
Number of bands per octave of the Filterbank. | |
Attribute< Optimisation > | optimisation |
Optimisation mode the filterbank implementation. | |
Attribute< Family > | family |
Wavelet Family. | |
std::vector< double > | scales |
Scales of each band in the filterbank. | |
std::vector< double > | frequencies |
Equivalent Fourier frequencies of each band in the filterbank. | |
std::vector< int > | downsampling_factors |
Downsampling factor for each band. | |
std::vector< std::complex< double > > | result_complex |
Results of the filtering process (scalogram slice) | |
std::vector< double > | result_power |
Resulting Power of the filtering process (power scalogram slice) | |
Minimal-delay Wavelet Filterbank.
Online scalogram estimation with minimal delay per scale (per frequency band). Several optimization modes are possible for estimating the online scalogram, using wavelet decimation, and optionally signal decimation. If using Armadillo, "process" methods can be used to compute the scalogram offline.
enum wavelet::Filterbank::Optimisation : unsigned char |
wavelet::Filterbank::Filterbank | ( | float | samplerate, |
float | frequency_min, | ||
float | frequency_max, | ||
float | bands_per_octave | ||
) |
Constructor.
samplerate | sampling rate |
frequency_min | minimum frequency of the filterbank |
frequency_max | maximum frequency of the filterbank |
bands_per_octave | number of bands per octave |
wavelet::Filterbank::Filterbank | ( | Filterbank const & | src | ) |
Copy Constructor.
src | source Filterbank |
|
inline |
"print" method for python => returns the results of write method
std::vector<int> wavelet::Filterbank::delaysInSamples | ( | ) | const |
get the delays in sample for each filter
|
inline |
get attribute value by name
attr_name | attribute name |
Possible attributes are
runtime_error | if the attribute does not exist for the current wavelet or is not shared among filters, or if the type does not match the attribute's internal type |
Attribute name | Attribute type | Description |
---|---|---|
frequency_min | float | Minimum Frequency of the Filterbank (Hz) |
frequency_max | float | Maximum Frequency of the Filterbank (Hz) |
bands_per_octave | float | Number of bands per octave of the Filterbank |
optimisation | Optimisation | Optimisation mode the filterbank implementation |
family | Family | Wavelet Family |
samplerate | float | Sampling rate of the data |
delay | float | Delay relative to critical wavelet time |
padding | float | Padding relative to critical wavelet time |
=== Wavelet-specific attributes:
Wavelet | Attribute name | Attribute type | Description |
---|---|---|---|
Morlet | omega0 | float | Carrier Frequency |
Paul | order | unsigned int | Order of the Paul Wavelet |
std::string wavelet::Filterbank::info | ( | ) | const |
get info on the current configuration
Filterbank& wavelet::Filterbank::operator= | ( | Filterbank const & | src | ) |
Assignment operator.
src | source Filterbank |
|
inline |
set attribute value by name
attr_name | attribute name |
attr_value | attribute value |
Possible attributes are
runtime_error | if the attribute does not exist for the current wavelet or is not shared among filters, or if the type does not match the attribute's internal type |
Attribute name | Attribute type | Description | Value Range |
---|---|---|---|
frequency_min | float | Minimum Frequency of the Filterbank (Hz) | ]0., samplerate/2.] |
frequency_max | float | Maximum Frequency of the Filterbank (Hz) | ]0., samplerate/2.] |
bands_per_octave | float | Number of bands per octave of the Filterbank | > 1. |
optimisation | Optimisation | Optimisation mode the filterbank implementation | {NONE, STANDARD, AGRESSIVE} |
family | Family | Wavelet Family | {MORLET, PAUL} |
samplerate | float | Sampling rate of the data | ]0. |
delay | float | Delay relative to critical wavelet time | > 0. |
padding | float | Padding relative to critical wavelet time | >=0. |
=== Wavelet-specific attributes:
Wavelet | Attribute name | Attribute type | Description | Value Range |
---|---|---|---|---|
Morlet | omega0 | float | Carrier Frequency | > 0. |
Paul | order | unsigned int | Order of the Paul Wavelet | > 0 |
std::size_t wavelet::Filterbank::size | ( | ) | const |
get number of bands