In file SweptSine/SweptSine.hh:

class SweptSine

Swept sine analysis

Inheritance:


Public Methods

SweptSine ()
Default constructor.
SweptSine (double fsample, double fstart, double fstop, int points = 101, const char* type = "log", double cycles = 10, double mintime = 0.1, double settle = 0.3, const Window* window = 0)
Default constructor.
SweptSine (const SweptSine& prm)
Copy constructor.
~SweptSine ()
Destructor.
SweptSine& operator= (const SweptSine& prm)
Assignment operator.
bool Sweep (const Pipe& filter, float* f, fComplex* tf) const
Sweep.
fComplex operator) (const Pipe& filter, float f) const
Sine response.
fComplex Response (const Pipe& filter, float f) const
Sine response.
double GetSampling () const
Get sampling rate.
void SetSampling (double fsample)
Set sampling rate.
double GetFStart () const
Get start frequency.
void SetFStart (double fstart)
Set start frequency.
double GetFStop () const
Get stop frequency.
void SetFStop (double fstop)
Set stop frequency.
int GetPoints () const
Get number of points.
void SetPoints (int points)
Set number of points.
const char* GetSweepType () const
Get sweep type.
void SetSweepType (const char* type)
Set sweep type.
double GetCycles () const
Get number of measurement cycles.
void SetCycles (double cycles)
Set number of measurement cycles.
double GetMinTime () const
Get minimum measurement time.
void SetMinTime (double mintime)
Set minimum measurement time.
double GetSettlingTime () const
Get settling time.
void SetSettlingTime (double settle)
Set settling time.
Window* GetWindow () const
Get window.
void SetWindow (const Window* w)
Set window.

Protected Fields

double fFsample
Sample frequency
double fFstart
Start frequency
double fFstop
Stop frequency
int fPoints
Number of points
std::string fType
Sweept type: Linear or Logarithmic
double fCycles
Number of cycles to measure
double fMinTime
Minimum time to measure
double fSettlingTime
Settling time (relative to the measurement time)
Window* fWindow
Window function

Protected Methods

bool ComputeCoeff (Pipe& f1, float f, fComplex& tf, Window& win) const
Compute a transfer coefficient

Documentation

Swept sine analysis. A sweep will go through the specified frequency range, generate a sine waveform of the specified measurement time, send it through a filter, window the result, down-convert it by the sine frequency, take the complex average of output and input and form the transfer coefficient.

double fFsample
Sample frequency

double fFstart
Start frequency

double fFstop
Stop frequency

int fPoints
Number of points

std::string fType
Sweept type: Linear or Logarithmic

double fCycles
Number of cycles to measure

double fMinTime
Minimum time to measure

double fSettlingTime
Settling time (relative to the measurement time)

Window* fWindow
Window function

SweptSine()
Constructs a swept sine class with default parameters.

SweptSine(double fsample, double fstart, double fstop, int points = 101, const char* type = "log", double cycles = 10, double mintime = 0.1, double settle = 0.3, const Window* window = 0)
Constructs a swept sine class with default parameters.

SweptSine(const SweptSine& prm)
Copy constructor.

~SweptSine()
Destructor.

SweptSine& operator= (const SweptSine& prm)
Assignment operator.

bool Sweep(const Pipe& filter, float* f, fComplex* tf) const
Sweep a filter. The return arrays f and tf must hold at least fPoints data values.
Returns:
true if successful
Parameters:
filter - Filter
f - frequency array (return)
tf - transfer function (return)

fComplex operator) (const Pipe& filter, float f) const
Computes the filter response at a given frequency.
Returns:
transfer coefficient at frequency f
Parameters:
filter - Filter
f - frequency

fComplex Response(const Pipe& filter, float f) const
Computes the filter response at a given frequency.
Returns:
transfer coefficient at frequency f
Parameters:
filter - Filter
f - frequency

double GetSampling() const
Get sampling rate.
Returns:
sampling rate

void SetSampling(double fsample)
Set sampling rate.
Returns:
void
Parameters:
fsample - sampling rate

double GetFStart() const
Get start frequency.
Returns:
start frequency

void SetFStart(double fstart)
Set start frequency.
Returns:
void
Parameters:
fstart - start frequency

double GetFStop() const
Get stop frequency.
Returns:
stop frequency

void SetFStop(double fstop)
Set stop frequency.
Returns:
void
Parameters:
fstop - stop frequency

int GetPoints() const
Get number of points.
Returns:
number of points

void SetPoints(int points)
Set number of points.
Returns:
void
Parameters:
points - number of points

const char* GetSweepType() const
Get sweep type (linear or log).
Returns:
sweep type

void SetSweepType(const char* type)
Set sweep type (linear or log).
Returns:
void
Parameters:
type - sweep type

double GetCycles() const
Get number of measurement cycles.
Returns:
number of measurement cycles

void SetCycles(double cycles)
Set number of measurement cycles.
Returns:
void
Parameters:
cycles - number of measurement cycles

double GetMinTime() const
Get minimum measurement time (s).
Returns:
minimum measurement time

void SetMinTime(double mintime)
Set minimum measurement time (s).
Returns:
void
Parameters:
mintime - minimum measurement time

double GetSettlingTime() const
Get settling time (relative to measurement time).
Returns:
settling time

void SetSettlingTime(double settle)
Set settling time (relative to measurement time).
Returns:
void
Parameters:
settle - settling time

Window* GetWindow() const
Get window. The window is never 0. Default is Hanning.
Returns:
window

void SetWindow(const Window* w)
Set window. Window is not adopted! If set to 0, Hanning is used.
Returns:
void
Parameters:
w - window

bool ComputeCoeff(Pipe& f1, float f, fComplex& tf, Window& win) const
Compute a transfer coefficient


This class has no child classes.
Author:
Written July 2002 by Daniel Sigg
Version:
1.0

alphabetic index hierarchy of classes


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


generated by doc++