class FSeries Frequency series class.
The FSeries class is used to represent a series in the frequency domain, e.g. the Fourier transform coefficients of a given signal. The coefficient normalization is set such that the magnitude squared gives a meaningful power spectral density (psd). The Fourier coefficients should are normalized so that the measured power of a flat spectrum is independent of bin size i.e. the amplitude coefficient must be be in units of root-seconds. Two tests for correct normalization:Note that the amplitude is defined to give the correct power density without adding positive and negative frequencies in double-ended FSeries.
- The total power in a fourier series is equal to the
of the original time series (Parseval's theorem) i.e. for Y = fft(X)
![]()
- The power density (
) of a sinusoid is equal to
where A is the amplitude of the sinusoid, and dT is the total time covered by the time series (inverse of the frequency spacing).
typedef unsigned long size_t
enum DSMode
FSeries(void)
FSeries(const FSeries& FS)
FSeries(double f0, double fBin, Time t0=Time(0), Interval dT=Interval(0.0))
fBin - Frequency step between adjacent elements (in Hz)
t0 - Start time of the data represented by the FSeries
dT - Time interval of the data represented by the FSeries.
FSeries(double f0, double dF, Time t0, Interval dT, size_t NData, const float dData[])
fBin - Frequency step between adjacent elements (in Hz)
t0 - Start time of the data represented by the FSeries
dT - Time interval of the data represented by the FSeries.
dData - Float data to be loaded into the FSeries.
FSeries(double f0, double dF, Time t0, Interval dT, size_t NData, const Complex dData[])
fBin - Frequency step between adjacent elements (in Hz)
t0 - Start time of the data represented by the FSeries
dT - Time interval of the data represented by the FSeries.
dData - Complex data to be loaded into the FSeries.
FSeries(const TSeries& tData)
FSeries(double f0, double dF, size_t NData, const Chirp& func)
~FSeries(void)
dF - Frequency step between adjacent elements (in Hz)
NData - Number of points to be put in the Series.
func - Wave function template.
FSeries extract(double f0, double dF) const
dF - Frequency interval to be extracted (in Hz)
Time getStartTime(void) const
Time getEndTime(void) const
double getLowFreq(void) const
double getHighFreq(void) const
double getCenterFreq(void) const
double getFStep(void) const
const char* getName(void) const
size_t getNStep(void) const
const void* refData(void) const
const DVector* refDVect() const
std::ostream& Dump(std::ostream& out) const
size_t getData(size_t len, Complex* data) const
data - Complex buffer into which the data will be copied.
size_t getData(size_t len, float* data) const
data - Float buffer into which the data will be copied.
bool isDoubleSided(void) const
bool isEmpty(void) const
bool isSingleSided(void) const
float Power(float fmin=0.0, float fmax=0.0) const
fmax - Maximum frequency over which the Power is summed.
void appName(const char* name)
void clear(void)
void setT0(const Time& t0)
void setName(const char* name)
void setData(size_t len, const float* data)
data - A float array holding data to be written to the FSeries.
void setData(size_t len, const Complex* data)
data - A Complex array with the data to be written to the FSeries.
void setData(const TSeries& data)
void ReSize(size_t len)
void tDerivative(void)
void tIntegral(void)
FSeries& operator =(const FSeries& rhs)
FSeries& operator +=(const FSeries& rhs)
FSeries& operator -=(const FSeries& rhs)
FSeries& operator *=(double scale)
FSeries& operator *=(const FSeries& fs)
FSeries& operator /=(const FSeries& fs)
Complex operator *(const FSeries& rhs) const
Complex operator)(double freq) const
void evolve(const Interval& dT)
alphabetic index hierarchy of classes
generated by doc++