In file Window/Window.hh:

class Window : public Pipe

Windowing base class.

Inheritance:


Public Fields

typedef double element_type
Element type of window array

Public Methods

Window (void)
Default constructor.
Window (const Window& w)
Copy constructor.
virtual ~Window ()
Virtual destructor.
Window& operator= (const Window& w)
Assignment operator.
TSeries apply (const TSeries& ts)
Return a windowed TSeries.
virtual Window* clone (void) const
Clone a window function
void dataCheck (const TSeries& ts) const
Check the data for validity
bool isDataValid (const TSeries& ts) const
Check the data for validity
int getLength (void) const
Ge the current window length.
double getRMS (void)
Get window function RMS.
void setWindow (int N)
Set the length and calculate the Window function.
virtual double WinFc (double arg)
Calculate the Window function.
virtual bool isPiSymmetric (void)
Test the Window function for symmetry around .
Time getStartTime (void) const
Get start time.
Time getCurrentTime (void) const
Get the current time of the current data epoch
bool inUse (void) const
Returns true if the filter is in use
void reset (void)
Prepare the filter for a disjoint data epoch
FilterIO& apply (const FilterIO& in)
Apply the window to a FilterIO object holding a single conainer

Inherited from Pipe:

Public Methods

virtual TSeries operator)(const TSeries& in)
FilterIO& operator)(const FilterIO& in)
KeyChain& getInputKeys(void) const
KeyChain& getOutputKeys(void) const
virtual Interval getTimeDelay(void) const
virtual bool Xfer(fComplex& coeff, double f) const
virtual bool Xfer(fComplex* tf, const float* freqs, int points) const
virtual bool Xfer(FSeries& Fs, float Fmin = 0.0, float Fmax = 1000.0, float dF = 1.0) const

Protected Methods

virtual bool xfer(fComplex& coeff, double f) const

Inherited from FilterBase:

Public Methods

virtual bool rootGetStartTime(Time& t) const throw()
virtual bool rootGetCurrentTime(Time& t) const throw()

Documentation

The Window base class performs all the common window calculation operations. The derived classes typically differ from one another only in the window function and the constructors needed to provide whatever variation is appropriate to the specific window type. The Window base class forces a normalization of . This maintains the power of a windowed series approximately constant, but it overrides any normalization built into the window function.

The Window function calculation can save half of the computation steps for Windows that are symmetric about the center bin (). This symmetry is assumed by default. Derived classes representing windows that don't exhibit this symmetry should define isPiSymmetric() to return false.

typedef double element_type
Element type of window array

Window(void)
Build an empty window function.

Window(const Window& w)
Copy constructor.

virtual ~Window()
Destroy the Window object and release the function storage.

Window& operator= (const Window& w)
Assignment operator.

TSeries apply(const TSeries& ts)
The argument time series is multiplied on an element-by-element basis by the windowing function. The resulting windowed series is returned. The argument TSeries is left unchanged. The Window normalization is set to , as described in the class description.

virtual Window* clone(void) const
Clone a window function. The clone method returns a pointer to a new Window object identical to the current one.

void dataCheck(const TSeries& ts) const
Check the data for validity. If the data are not applicable for this window, an exception is thrown.

bool isDataValid(const TSeries& ts) const
Check the data for validity. Performs the same data checks as dataCheck() but returns a boolean status instead of throwing an exception.

int getLength(void) const
Return the current window length.

double getRMS(void)
Get window function RMS.

void setWindow(int N)
The Window table length is set to the specified value. A new function array is allocated if insufficient storage is available. The function array is then filled with the calculated window coefficients.
Parameters:
N - Number of entries in the current window function table.

virtual double WinFc(double arg)
The window function is calculated at the argument position (, n is the entry number, N is the total number of entries)

virtual bool isPiSymmetric(void)
Return true if the Window function is symmetric around . Functions are by default symmetric, but the symmetry assumption may be preempted by defining isPiSymmetric() for a derived class.
Returns:
true if the window function is symmetric around .

Time getStartTime(void) const
Get the start time of the current data epoch. The start time is set to the time of the first filtered sample after either the filter is constructed or the filter is reset. If no data have been windowed since the construction or reset, the start time is given as 0.
Returns:
Current epoch start time or 0 if no data have been windowed.

Time getCurrentTime(void) const
Get the current time of the current data epoch. The current time is set with the time of the next expected sample to be filtered.

bool inUse(void) const
Returns true if the filter is in use

void reset(void)
Prepare the filter for a disjoint data epoch. Reset the filter.

FilterIO& apply(const FilterIO& in)
Apply the window to a FilterIO object holding a single conainer


Direct child classes:
Welch
Uniform
Hanning
Hamming
FlatTop
Blackman
Bartlett
BMH
Author:
John G. Zweizig
Version:
1.1 ; Modified July 21, 1999

alphabetic index hierarchy of classes


Please send questions and comments to zweizig_j@ligo.caltech.edu


generated by doc++