QtiPlot
0.9.8.2
|
#include <FFT.h>
Public Member Functions | |
Matrix * | amplitudesMatrix () |
FFT (ApplicationWindow *parent, Table *t, const QString &realColName, const QString &imagColName=QString(), int from=1, int to=-1) | |
FFT (ApplicationWindow *parent, QwtPlotCurve *c) | |
FFT (ApplicationWindow *parent, QwtPlotCurve *c, double start, double end) | |
FFT (ApplicationWindow *parent, Graph *g, const QString &curveTitle) | |
FFT (ApplicationWindow *parent, Graph *g, const QString &curveTitle, double start, double end) | |
FFT (ApplicationWindow *parent, Matrix *re, Matrix *im=NULL, bool inverse=false, bool shift=true, bool norm=false, bool outputPower2Sizes=true) | |
Matrix * | imaginaryOutputMatrix () |
void | normalizeAmplitudes (bool norm=true) |
Matrix * | realOutputMatrix () |
void | setInverseFFT (bool inverse=true) |
void | setSampling (double sampling) |
void | shiftFrequencies (bool shift=true) |
![]() | |
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 | fftCurve () |
void | fftMatrix () |
void | fftTable () |
void | init () |
void | output () |
Performs the data analysis and takes care of the output. More... | |
void | outputGraphs () |
bool | setDataFromTable (Table *t, const QString &realColName, const QString &imagColName=QString(), int from=0, int to=-1) |
Private Attributes | |
Matrix * | d_amp_matrix |
Matrix * | d_im_matrix |
Matrix * | d_im_out_matrix |
int | d_imag_col |
bool | d_inverse |
Flag telling if an inverse FFT must be performed. More... | |
bool | d_normalize |
Flag telling if the amplitudes in the output spectrum must be normalized. More... | |
bool | d_power2 |
Matrix * | d_re_out_matrix |
int | d_real_col |
double | d_sampling |
bool | d_shift_order |
Flag telling if the output frequencies must be shifted in order to have a zero-centered spectrum. 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... | |
virtual void | calculateOutputData (double *X, double *Y) |
Calculates the data for the output curve and store it in the X an Y vectors. 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 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 |
FFT::FFT | ( | ApplicationWindow * | parent, |
Table * | t, | ||
const QString & | realColName, | ||
const QString & | imagColName = QString() , |
||
int | from = 1 , |
||
int | to = -1 |
||
) |
References init(), and setDataFromTable().
FFT::FFT | ( | ApplicationWindow * | parent, |
QwtPlotCurve * | c | ||
) |
References init(), and Filter::setDataFromCurve().
FFT::FFT | ( | ApplicationWindow * | parent, |
QwtPlotCurve * | c, | ||
double | start, | ||
double | end | ||
) |
References init(), and Filter::setDataFromCurve().
FFT::FFT | ( | ApplicationWindow * | parent, |
Graph * | g, | ||
const QString & | curveTitle | ||
) |
References init(), and Filter::setDataFromCurve().
FFT::FFT | ( | ApplicationWindow * | parent, |
Graph * | g, | ||
const QString & | curveTitle, | ||
double | start, | ||
double | end | ||
) |
References init(), and Filter::setDataFromCurve().
FFT::FFT | ( | ApplicationWindow * | parent, |
Matrix * | re, | ||
Matrix * | im = NULL , |
||
bool | inverse = false , |
||
bool | shift = true , |
||
bool | norm = false , |
||
bool | outputPower2Sizes = true |
||
) |
References d_imag_col, Filter::d_output_graph, d_real_col, and d_sampling.
|
inline |
References d_amp_matrix.
|
private |
References ApplicationWindow::d_decimal_digits, d_inverse, Filter::d_n, d_normalize, Filter::d_result_table, d_sampling, d_shift_order, Filter::d_x, Filter::d_y, Filter::memoryErrorMessage(), and Table::setText().
Referenced by output().
|
private |
References Matrix::allocateMatrixData(), Matrix::cell(), Matrix::colorMap(), d_amp_matrix, d_im_matrix, d_im_out_matrix, d_inverse, Filter::d_matrix, d_normalize, d_power2, d_re_out_matrix, d_shift_order, Matrix::dx(), Matrix::dy(), fft2d(), fft2d_inv(), Matrix::freeMatrixData(), ApplicationWindow::generateUniqueName(), Matrix::headerViewType(), isPower2(), ApplicationWindow::newMatrix(), next2Power(), Matrix::numCols(), Matrix::numRows(), Matrix::range(), Matrix::setCell(), Matrix::setColorMap(), Matrix::setCoordinates(), Matrix::setHeaderViewType(), Matrix::setViewType(), MdiSubWindow::setWindowLabel(), ApplicationWindow::setWindowName(), and Matrix::viewType().
Referenced by output().
|
private |
References ApplicationWindow::d_decimal_digits, d_inverse, Filter::d_n, d_normalize, Filter::d_result_table, d_sampling, d_shift_order, Filter::d_x, Filter::d_y, Filter::memoryErrorMessage(), and Table::setText().
Referenced by output().
|
inline |
References d_im_out_matrix.
|
private |
References d_amp_matrix, d_im_matrix, d_im_out_matrix, d_imag_col, d_inverse, d_normalize, Filter::d_output_graph, d_re_out_matrix, d_real_col, d_sampling, and d_shift_order.
Referenced by FFT().
|
inline |
References d_normalize.
Referenced by FFTDialog::accept().
|
privatevirtual |
Performs the data analysis and takes care of the output.
Reimplemented from Filter.
References Table::colName(), Filter::d_curve, Filter::d_explanation, Filter::d_graph, Filter::d_graphics_display, d_inverse, Filter::d_matrix, Filter::d_n, d_real_col, Filter::d_result_table, Filter::d_table, fftCurve(), fftMatrix(), fftTable(), ApplicationWindow::generateUniqueName(), ApplicationWindow::newHiddenTable(), outputGraphs(), and Table::setHeader().
|
private |
References MultiLayer::addLayer(), MultiLayer::AlignCanvases, MultiLayer::arrangeLayers(), Filter::createOutputGraph(), Filter::d_curveColor, d_inverse, Filter::d_matrix, Filter::d_output_graph, Filter::d_result_table, Graph::enableAxis(), ScaleDraw::HideBegin, ScaleDraw::HideBeginEnd, Graph::insertCurve(), MultiLayer::linkXLayerAxes(), Graph::multiLayer(), Graph::removeLegend(), MultiLayer::setAlignPolicy(), Graph::setAxisTitle(), MultiLayer::setCols(), MultiLayer::setCommonLayerAxes(), MultiLayer::setRows(), ScaleDraw::setShowTicksPolicy(), MultiLayer::setSpacing(), Graph::setXAxisTitle(), Graph::setYAxisTitle(), and Graph::updatePlot().
Referenced by output().
|
inline |
References d_re_out_matrix.
|
private |
References Table::cell(), Table::colIndex(), Filter::d_curve, Filter::d_graph, d_imag_col, Filter::d_init_err, Filter::d_n, d_real_col, Filter::d_table, Filter::d_x, Filter::d_y, Filter::freeMemory(), Filter::memoryErrorMessage(), Table::Numeric, and Table::numRows().
Referenced by FFT().
|
inline |
References d_inverse.
Referenced by FFTDialog::accept().
|
inline |
References d_sampling.
Referenced by FFTDialog::accept().
|
inline |
References d_shift_order.
Referenced by FFTDialog::accept().
|
private |
Referenced by amplitudesMatrix(), fftMatrix(), and init().
|
private |
Referenced by fftMatrix(), and init().
|
private |
Referenced by fftMatrix(), imaginaryOutputMatrix(), and init().
|
private |
Referenced by FFT(), init(), and setDataFromTable().
|
private |
Flag telling if an inverse FFT must be performed.
Referenced by fftCurve(), fftMatrix(), fftTable(), init(), output(), outputGraphs(), and setInverseFFT().
|
private |
Flag telling if the amplitudes in the output spectrum must be normalized.
Referenced by fftCurve(), fftMatrix(), fftTable(), init(), and normalizeAmplitudes().
|
private |
Referenced by fftMatrix().
|
private |
Referenced by fftMatrix(), init(), and realOutputMatrix().
|
private |
Referenced by FFT(), init(), output(), and setDataFromTable().
|
private |
Referenced by FFT(), fftCurve(), fftTable(), init(), and setSampling().
|
private |
Flag telling if the output frequencies must be shifted in order to have a zero-centered spectrum.
Referenced by fftCurve(), fftMatrix(), fftTable(), init(), and shiftFrequencies().