#include <ReassignedSpectrum.h>
Public Types | |
| typedef FourierTransform::size_type | size_type |
Public Member Functions | |
| ReassignedSpectrum (const std::vector< double > &window) | |
| ReassignedSpectrum (const std::vector< double > &window, const std::vector< double > &windowDerivative) | |
| void | transform (const double *sampsBegin, const double *pos, const double *sampsEnd) |
| size_type | size (void) const |
| Return the length of the Fourier transforms. | |
| const std::vector< double > & | window (void) const |
| double | convergence (long idx) const |
| double | reassignedFrequency (long idx) const |
| double | reassignedMagnitude (long idx) const |
| double | reassignedPhase (long idx) const |
| double | reassignedTime (long idx) const |
| double | frequencyCorrection (long sample) const |
| double | timeCorrection (long sample) const |
| double | reassignedPhase (long idx, double, double) const |
| double | reassignedMagnitude (double, long intBinNumber) const |
| std::complex< double > | operator[] (unsigned long idx) const |
An unsigned integral type large enough to represent the length of any transform.
| Loris::ReassignedSpectrum::ReassignedSpectrum | ( | const std::vector< double > & | window | ) |
Construct a new instance using the specified short-time window. Transform lengths are the smallest power of two greater than twice the window length.
| Loris::ReassignedSpectrum::ReassignedSpectrum | ( | const std::vector< double > & | window, | |
| const std::vector< double > & | windowDerivative | |||
| ) |
Construct a new instance using the specified short-time window and its time derivative. Transform lengths are the smallest power of two greater than twice the window length.
| double Loris::ReassignedSpectrum::convergence | ( | long | idx | ) | const |
Compute and return the convergence indicator, computed from the mixed partial derivative of spectral phase, optionally used in BW enhanced analysis as a convergence indicator. The convergence value is on the range [0,1], 0 for a sinusoid, and 1 for an impulse.
| idx | the frequency sample at which to evaluate the transform |
| double Loris::ReassignedSpectrum::frequencyCorrection | ( | long | sample | ) | const |
Compute the frequency correction at the specified frequency sample using the method of Auger and Flandrin to evaluate the partial derivative of spectrum phase w.r.t. time.
Correction is computed in fractional frequency samples, because that's the kind of frequency domain ramp we used on our window. sample is the frequency sample index, the nominal component frequency in samples.
| double Loris::ReassignedSpectrum::reassignedFrequency | ( | long | idx | ) | const |
Return the reassigned frequency in fractional frequency samples computed at the specified transform index.
| idx | the frequency sample at which to evaluate the transform |
| double Loris::ReassignedSpectrum::reassignedMagnitude | ( | long | idx | ) | const |
Return the spectrum magnitude (absolute) computed at the specified transform index.
| idx | the frequency sample at which to evaluate the transform |
| double Loris::ReassignedSpectrum::reassignedPhase | ( | long | idx | ) | const |
Return the phase in radians computed at the specified transform index. The reassigned phase is shifted to account for the time correction according to the corrected frequency.
| idx | the frequency sample at which to evaluate the transform |
| double Loris::ReassignedSpectrum::reassignedTime | ( | long | idx | ) | const |
Return the reassigned time in fractional samples computed at the specified transform index.
| idx | the frequency sample at which to evaluate the transform |
| double Loris::ReassignedSpectrum::timeCorrection | ( | long | sample | ) | const |
Compute the time correction at the specified frequency sample using the method of Auger and Flandrin to evaluate the partial derivative of spectrum phase w.r.t. frequency.
Correction is computed in fractional samples, because that's the kind of ramp we used on our window.
| void Loris::ReassignedSpectrum::transform | ( | const double * | sampsBegin, | |
| const double * | pos, | |||
| const double * | sampsEnd | |||
| ) |
Compute the reassigned Fourier transform of the samples on the half open range [sampsBegin, sampsEnd), aligning sampCenter with the center of the analysis window.
| sampsBegin | pointer representing the beginning of the (half-open) range of samples to transform | |
| sampCenter | the sample in the range that is to be aligned with the center of the analysis window | |
| sampsEnd | pointer representing the end of the (half-open) range of samples to transform |
sampsEnd must be past sampCenter
| const std::vector< double >& Loris::ReassignedSpectrum::window | ( | void | ) | const |
Return read access to the short-time window samples. (Peers may need to know about the analysis window or about the scale factors in introduces.)
1.5.7