In file GenButterworth.d:

class GenButterworth

Provides a C++ object interface to the routine FlButterworth.

Inheritance:


Public Methods

[more] GenButterworth ()
Object creator.
[more] ~GenButterworth ()
Object destructor.
[more]float* Build ( float lowCut=0.5, float highCut=25.0, float lowRollOff=24, float highRollOff=24, float sampleRate=0.01, long numberOfSamples=1024 )
Build is used to make the filter, and return the array that holds the filter.
[more]void Clean ()
Clean will free up malloc'ed memory, except for the filter array malloc'ed by Build.
[more]void Setup ()
Setup will set up the object, making sure we have enough memory.
[more]long IsValid ()
IsValid will verify that the input paramters are valid.
[more]string GetErrorMessage ( )
GetErrorMessage will return a string describing what the most recent error was.

Private Fields

[more]string lastError
The string associated with the last error encountered in this class.
[more]float lowCut
The low frequency cutoff of the filter, in cycles per second.
[more]float highCut
The highfrequency cutoff of the filter, in cycles per second.
[more]float lowRollOff
The slope in decibels per octave of the low cut of the filter.
[more]float highRollOff
The slope in decibels per octave of the high cut of the filter.
[more]float sampleRate
The sample rate in cycles per second.
[more]long numberOfSamples
The number of samples, default 1024


Inherited from LwsBase:

Public Methods

ovoid SetErrorMessage( string newErrorMessage)
ovoid AppendErrorMessage( string nextErrorMessage )
ostring GetPreviousErrorMessage()
ovoid StdOut( float* output, long numberOfSamples )
ovoid StdFileOut( float* output, long numberOfSamples, string outputFileName="lastDataOutput" )
ovoid FileOut( float* output, long numberOfSamples, string outputFileName="lastDataOutput" )
ofloat* GetFileInput( string inputFileName, long* numberOfSamples )
ostring GetTempName( string seed = "ktmp")

Private Fields

ostring previousError
ostring currentError


Documentation

Provides a C++ object interface to the routine FlButterworth. The user must provide the low cut, high cut, low rate, high rate, numer of samples, and the sample rate required.

This object will allocate an array that the user is responsible for. The user must free that array when done.

o GenButterworth()
Object creator. You can provide the filter parameters here, or settle for the defaults.
Parameters:
none. -
Returns:
none.

o ~GenButterworth()
Object destructor. Frees up the objects memory. Does not free up the array returned by build. The latter is the user's responsibility.
Parameters:
none. -
Returns:
none.

ofloat* Build( float lowCut=0.5, float highCut=25.0, float lowRollOff=24, float highRollOff=24, float sampleRate=0.01, long numberOfSamples=1024 )
Build is used to make the filter, and return the array that holds the filter. The user may provide paramters, or use the defaults provided below. The length of the filter is 0 based, i.e. nsamples=1024 implies a filter of 1025 samples, 0 through 1024.
Parameters:
float - lowCut, the lower cutoff frequency of the filter, must be positive, default 0.05.
float - highCut, the higher cutoff frequency of the filter, must be greater than lowCut, default 25.0.
float - lowRollOff, the slope of the low cutoff in decibels per octave, default 24.
float - highRollOff, the slope of the high cutoff in decibels per octave, default 24.
float - sampleRate, default .01 hertz.
float - numberOfSamples, default 1024.
Returns:
float *filter, an array numberOfSamples long, user must free using delete [] filter. Null on failure.

ovoid Clean()
Clean will free up malloc'ed memory, except for the filter array malloc'ed by Build.
Parameters:
none. -
Returns:
none.

ovoid Setup()
Setup will set up the object, making sure we have enough memory.
Parameters:
none. -
Returns:
none.

olong IsValid()
IsValid will verify that the input paramters are valid. You can use the routine GetErrorMsg to find out what the problem is if the return is not 0. (O means valid, non-zero means invalid.)
Parameters:
none. -
Returns:
0 if valid, 1 or more if not valid.

ostring GetErrorMessage( )
GetErrorMessage will return a string describing what the most recent error was.
Parameters:
none. -
Returns:
string errorMessage, a character string with the error message, which must be free'd by the caller.

ostring lastError
The string associated with the last error encountered in this class. Usually set by IsValid.
See Also:
IsValid

ofloat lowCut
The low frequency cutoff of the filter, in cycles per second. default 0.05.

ofloat highCut
The highfrequency cutoff of the filter, in cycles per second. Default 25.0.

ofloat lowRollOff
The slope in decibels per octave of the low cut of the filter. Default 24.

ofloat highRollOff
The slope in decibels per octave of the high cut of the filter. Default 24.

ofloat sampleRate
The sample rate in cycles per second. Default 0.01.

olong numberOfSamples
The number of samples, default 1024


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java


Copyright 1993, 1994 Geophysical Software, Inc.
2603 Peninsulas Drive, Missouri City Texas 77459, (713)438-0583.
All Rights Reserved Company Confidential
Prepared for University of Minnesota, October, 2001