class FSeries Frequency series class.
| | DSMode Data Storage mode. |
| | Complex Complex data type. |
| | size_type Length data type. |
| | FSeries (void) Default constructor. |
| | FSeries (const FSeries& fs) Copy constructor. |
| | FSeries (double f0, double dF, Time t0, Interval dT, size_type NData, const float dData[]) Data constructor. |
| | FSeries (double f0, double dF, Time t0, Interval dT, size_type NData, const Complex dData[]) Data constructor. |
| | FSeries (double f0, double dF, Time t0, Interval dT, const DVector& dv) Data constructor. |
| | FSeries (double f0, double dF, Time t0=Time(0), Interval dT=0, DVector* dv=0) Data constructor. |
| | FSeries (const TSeries& tData) FFT constructor. |
| | FSeries (double f0, double dF, size_type NData, const Chirp& func) Template constructor. |
| | ~FSeries (void) FSeries Destructor. |
| | extend (double fmax) Extend the FSeries. |
| | extract (double f0, double dF) const Get a substring of the FSeries. |
| | getData (size_type len, Complex* data) const Get complex series data. |
| | getData (size_type len, float* data) const Get float series data. |
| | getDt (void) const Get the time interval. |
| | getEndTime (void) const Get the End time. |
| | getLowFreq (void) const Get the minimum frequency. |
| | getLength (void) const Get the Number of data words |
| | getHighFreq (void) const Get the maximum Frequency. |
| | getCenterFreq (void) const Get the maximum Frequency. |
| | getFStep (void) const Get the frequency step. |
| | getName (void) const Get the series name. |
| | getNStep (void) const Get the number of frequency steps. |
| | getStartTime (void) const Get the start time. |
| | interpolate (double fmin, double fmax, double df, bool logar=false) const Interpolate the FSeries points |
| | refData (void) const Get a pointer to the series data. |
| | refDVect (void) const Data Vector reference. |
| | Dump (std::ostream& out) const Dump the contents of the FSeries to an output stream. |
| | isDoubleSided (void) const Test for double sided storage. |
| | empty (void) const Test for empty series. |
| | isSingleSided (void) const Test for double sided storage. |
| | null (void) const Test for null series. |
| | Power (float fmin=0.0, float fmax=0.0) const Get the power in a band. |
| | appName (const char* name) Append a string to the series name. |
| | clear (void) Clear the data vector. |
| | setData (size_type len, const float* data) Overwrite the series with float data. |
| | setData (size_type len, const Complex* data) Overwrite the series with Complex data. |
| | setData (DVector* data) Overwrite the series with the specified data vector. |
| | setData (const TSeries& data) Replace the series with an FFT of a TSeries. |
| | setName (const char* name) Set the series name. |
| | setTimeSpan (const Time& t0, Interval dT) Set the time span. |
| | setT0 (const Time& t0) Set the start time. |
| | ReSize (size_type len) Increase the data vector storage. |
| | tDerivative (void) Time derivative. |
| | tIntegral (void) Time integral. |
| | cdot (const FSeries& fs) const complex convolution. |
| | operator = (const FSeries& rhs) Assignment operator. |
| | operator += (double bias) Bias an FSeries. |
| | operator += (const FSeries& rhs) Add two FSeries. |
| | operator -= (const FSeries& rhs) Subtract a series. |
| | operator *= (double scale) Scale a series. |
| | operator *= (const FSeries& fs) Multiply a series by another. |
| | operator /= (const FSeries& fs) Divide a series by another. |
| | operator) (double freq) const Get the amplitude at a specified frequency. |
| | evolve (const Interval& dT) Evolve the Frequency series in time. |
| | getBin (double f) const Calculate the bin number closest to a given frequency |
| | getBinF (size_type bin) const Calculate the frequency of a given bin |
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_type
enum DSMode
FSeries(void)
FSeries(const FSeries& fs)
FSeries(double f0, double dF, Time t0, Interval dT, size_type 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_type 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(double f0, double dF, Time t0, Interval dT, const DVector& dv)
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.
dv - DVector to be loaded into the FSeries.
FSeries(double f0, double dF, Time t0=Time(0), Interval dT=0, DVector* dv=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.
dv - DVector to be loaded into the FSeries.
FSeries(const TSeries& tData)
FSeries(double f0, double dF, size_type 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.
void extend(double fmax)
FSeries extract(double f0, double dF) const
dF - Frequency interval to be extracted (in Hz)
size_type getData(size_type len, Complex* data) const
data - Complex buffer into which the data will be copied.
size_type getData(size_type len, float* data) const
data - Float buffer into which the data will be copied.
Interval getDt(void) const
Time getEndTime(void) const
double getLowFreq(void) const
size_type getLength(void) const
double getHighFreq(void) const
double getCenterFreq(void) const
double getFStep(void) const
const char* getName(void) const
size_type getNStep(void) const
Time getStartTime(void) const
FSeries interpolate(double fmin, double fmax, double df, bool logar=false) const
fMin - Maximum frequency of returned series
df - Frequency step of returned series.
logar - If true, logarithmic interpolation.
const void* refData(void) const
const DVector* refDVect(void) const
std::ostream& Dump(std::ostream& out) const
bool isDoubleSided(void) const
bool empty(void) const
bool isSingleSided(void) const
bool null(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 setData(size_type len, const float* data)
data - A float array holding data to be written to the FSeries.
void setData(size_type len, const Complex* data)
data - A Complex array with the data to be written to the FSeries.
void setData(DVector* data)
void setData(const TSeries& data)
void setName(const char* name)
void setTimeSpan(const Time& t0, Interval dT)
dT - Interval over which the data were derived or valid.
void setT0(const Time& t0)
void ReSize(size_type len)
void tDerivative(void)
void tIntegral(void)
Complex cdot(const FSeries& fs) const
FSeries& operator =(const FSeries& rhs)
FSeries& operator +=(double bias)
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)(double freq) const
void evolve(const Interval& dT)
size_type getBin(double f) const
double getBinF(size_type bin) const
alphabetic index hierarchy of classes
Please send questions and comments to zweizig_j@ligo.caltech.edu
generated by doc++