QtiPlot
0.9.8.2
|
#include <FFTFilter.h>
Public Types | |
enum | FilterType { LowPass = 1, HighPass = 2, BandPass = 3, BandBlock = 4 } |
Public Member Functions | |
void | enableOffset (bool offset=true) |
Enables/Disables the DC offset when applying a Band Pass/Band block filter. More... | |
FFTFilter (ApplicationWindow *parent, QwtPlotCurve *c, int m=1) | |
FFTFilter (ApplicationWindow *parent, QwtPlotCurve *c, double start, double end, int m=1) | |
FFTFilter (ApplicationWindow *parent, Graph *g, const QString &curveTitle, int m=1) | |
FFTFilter (ApplicationWindow *parent, Graph *g, const QString &curveTitle, double start, double end, int m=1) | |
FFTFilter (ApplicationWindow *parent, Table *t, const QString &xCol, const QString &yCol, int start=0, int end=-1, int m=1) | |
void | setBand (double lowFreq, double highFreq) |
Sets the cutoff frequencies. To be used only for the Band Pass and Band block filters. More... | |
void | setCutoff (double f) |
Sets the cutoff frequency. To be used only for Low Pass and High Pass filters. More... | |
void | setFilterType (int type) |
![]() | |
int | dataSize () |
Returns the size of the input data set. More... | |
virtual void | enableGraphicsDisplay (bool on=true, Graph *g=0) |
bool | error () |
Filter (ApplicationWindow *parent, Table *t=0, const QString &name=QString()) | |
Filter (ApplicationWindow *parent, Graph *g=0, const QString &name=QString()) | |
Filter (ApplicationWindow *parent, Matrix *m, const QString &name=QString()) | |
Filter (ApplicationWindow *parent, QwtPlotCurve *c) | |
virtual QString | legendInfo () |
Output string added to the plot as a new legend. More... | |
Graph * | outputGraph () |
Returns a pointer to the graph where the result curve should be displayed. More... | |
Table * | resultTable () |
Returns a pointer to the table created to display the results. More... | |
virtual bool | run () |
Actually does the job. Should be reimplemented in derived classes. More... | |
void | setColor (int colorId) |
Obsolete: sets the color of the output fit curve. More... | |
void | setColor (const QColor &color) |
Sets the color of the output fit curve. More... | |
void | setColor (const QString &colorName) |
Sets the color of the output fit curve. Provided for convenience. To be used in scripts only! More... | |
virtual void | setDataCurve (QwtPlotCurve *curve, double start, double end) |
bool | setDataFromCurve (QwtPlotCurve *c) |
bool | setDataFromCurve (QwtPlotCurve *c, double from, double to) |
bool | setDataFromCurve (const QString &curveTitle, Graph *g=0) |
bool | setDataFromCurve (const QString &curveTitle, double from, double to, Graph *g=0) |
virtual bool | setDataFromTable (Table *, const QString &, const QString &, int=1, int=-1, bool=false) |
void | setError (bool on=true) |
void | setInterval (double from, double to) |
Changes the data range if the source curve was already assigned. Provided for convenience. More... | |
void | setMaximumIterations (int iter) |
Sets the maximum number of iterations to be performed during an iterative session. More... | |
void | setOutputPoints (int points) |
Sets the number of points in the output curve. More... | |
void | setOutputPrecision (int digits) |
Sets the precision used for the output. More... | |
void | setSortData (bool on=true) |
void | setTolerance (double eps) |
Sets the tolerance used by the GSL routines. More... | |
void | setUpdateOutputGraph (bool update=true) |
virtual void | showLegend () |
Adds a new legend to the plot. Calls virtual legendInfo() More... | |
double * | x () |
Returns the x values of the input data set. More... | |
double * | y () |
Returns the y values of the input data set. More... | |
~Filter () | |
Private Member Functions | |
void | calculateOutputData (double *x, double *y) |
Calculates the data for the output curve and store it in the X an Y vectors. More... | |
void | init (int m) |
Private Attributes | |
FilterType | d_filter_type |
The filter type. More... | |
double | d_high_freq |
Upper edge of the band for Band Pass and Band block filters. More... | |
double | d_low_freq |
Cutoff frequency for Low Pass and High Pass filters. Lower edge of the band for Band Pass and Band block filters. More... | |
bool | d_offset |
Flag telling if the DC offset must be added/substracted when applying a Band Pass/Band block filter respectively. More... | |
Additional Inherited Members | |
![]() | |
QwtPlotCurve * | addResultCurve (double *x, double *y) |
Adds the result curve to the target output plot window. Creates a hidden table and frees the input data from memory. More... | |
MultiLayer * | createOutputGraph () |
virtual int | curveData (QwtPlotCurve *c, double start, double end, double **x, double **y) |
int | curveIndex (const QString &curveTitle, Graph *g) |
Performs checks and returns the index of the source data curve if OK, -1 otherwise. More... | |
int | curveRange (QwtPlotCurve *c, double start, double end, int *iStart, int *iEnd) |
virtual void | freeMemory () |
Frees the memory allocated for the X and Y data sets. More... | |
void | init () |
virtual QString | logInfo () |
Output string added to the log pannel of the application. More... | |
void | memoryErrorMessage () |
virtual void | output () |
Performs the data analysis and takes care of the output. More... | |
virtual int | sortedCurveData (QwtPlotCurve *c, double start, double end, double **x, double **y) |
Same as curveData, but sorts the points by their x value. More... | |
![]() | |
QwtPlotCurve * | d_curve |
The curve to be analysed. More... | |
QColor | d_curveColor |
Color index of the result curve. More... | |
QString | d_explanation |
String explaining the operation in the comment of the result table and in the project explorer. More... | |
double | d_from |
Data interval. More... | |
Graph * | d_graph |
The source graph with the curve to be analyzed. More... | |
bool | d_graphics_display |
Specifies if the filter should display a result curve. More... | |
bool | d_init_err |
Error flag telling if something went wrong during the initialization phase. More... | |
Matrix * | d_matrix |
int | d_max_iterations |
Maximum number of iterations per fit. More... | |
int | d_min_points |
Minimum number of data points necessary to perform the operation. More... | |
int | d_n |
Size of the data arrays. More... | |
Graph * | d_output_graph |
The graph where the result curve should be displayed. More... | |
int | d_points |
Number of result points to de calculated and displayed in the output curve. More... | |
int | d_prec |
Precision (number of significant digits) used for the results output. More... | |
Table * | d_result_table |
The table displaying the results of the filtering operation (not alvays valid!) More... | |
bool | d_sort_data |
Specifies if the filter needs sorted data as input. More... | |
Table * | d_table |
A table source of data. More... | |
double | d_to |
double | d_tolerance |
GSL Tolerance, if ever needed... More... | |
bool | d_update_output_graph |
Specifies if the filter should update the output graph. More... | |
double * | d_x |
x data set to be analysed More... | |
double * | d_y |
y data set to be analysed More... | |
QString | d_y_col_name |
FFTFilter::FFTFilter | ( | ApplicationWindow * | parent, |
QwtPlotCurve * | c, | ||
int | m = 1 |
||
) |
References Filter::init(), and Filter::setDataFromCurve().
FFTFilter::FFTFilter | ( | ApplicationWindow * | parent, |
QwtPlotCurve * | c, | ||
double | start, | ||
double | end, | ||
int | m = 1 |
||
) |
References Filter::init(), and Filter::setDataFromCurve().
FFTFilter::FFTFilter | ( | ApplicationWindow * | parent, |
Graph * | g, | ||
const QString & | curveTitle, | ||
int | m = 1 |
||
) |
References Filter::init(), and Filter::setDataFromCurve().
FFTFilter::FFTFilter | ( | ApplicationWindow * | parent, |
Graph * | g, | ||
const QString & | curveTitle, | ||
double | start, | ||
double | end, | ||
int | m = 1 |
||
) |
References Filter::init(), and Filter::setDataFromCurve().
FFTFilter::FFTFilter | ( | ApplicationWindow * | parent, |
Table * | t, | ||
const QString & | xCol, | ||
const QString & | yCol, | ||
int | start = 0 , |
||
int | end = -1 , |
||
int | m = 1 |
||
) |
References Filter::init(), and Filter::setDataFromTable().
|
privatevirtual |
Calculates the data for the output curve and store it in the X an Y vectors.
Reimplemented from Filter.
References Filter::d_explanation, d_filter_type, d_high_freq, d_low_freq, Filter::d_n, d_offset, Filter::d_points, Filter::d_x, and Filter::d_y.
|
inline |
Enables/Disables the DC offset when applying a Band Pass/Band block filter.
References d_offset.
Referenced by FilterDialog::filter().
|
private |
References d_high_freq, d_low_freq, Filter::d_n, d_offset, Filter::d_points, and setFilterType().
void FFTFilter::setBand | ( | double | lowFreq, |
double | highFreq | ||
) |
Sets the cutoff frequencies. To be used only for the Band Pass and Band block filters.
References d_filter_type, d_high_freq, Filter::d_init_err, and d_low_freq.
Referenced by FilterDialog::filter().
void FFTFilter::setCutoff | ( | double | f | ) |
Sets the cutoff frequency. To be used only for Low Pass and High Pass filters.
References d_filter_type, and d_low_freq.
Referenced by FilterDialog::filter().
void FFTFilter::setFilterType | ( | int | type | ) |
References d_filter_type, and Filter::d_init_err.
Referenced by init().
|
private |
The filter type.
Referenced by calculateOutputData(), setBand(), setCutoff(), and setFilterType().
|
private |
Upper edge of the band for Band Pass and Band block filters.
Referenced by calculateOutputData(), init(), and setBand().
|
private |
Cutoff frequency for Low Pass and High Pass filters. Lower edge of the band for Band Pass and Band block filters.
Referenced by calculateOutputData(), init(), setBand(), and setCutoff().
|
private |
Flag telling if the DC offset must be added/substracted when applying a Band Pass/Band block filter respectively.
Referenced by calculateOutputData(), enableOffset(), and init().