#include "SQDef.h"
#include "SQErrorCodes.h"
#include "SQProject.h"
#include "SQMDefines.h"
#include "SQControlCharts.h"
Go to the source code of this file.
Classes | |
struct | tagSQ_FilterHandle |
Typedefs | |
typedef struct tagSQ_FilterHandle * | SQ_Filter |
typedef struct tagSQ_FilterHandle * SQ_Filter |
The import handle used to identify an ongoing import. IMPORTANT: Always initialize it to NULL!
SQ_ErrorCode SQ_CreateSpectralFilter | ( | SQ_Project | hProject, |
int | iDatasetNumber, | ||
SQ_Filter * | pFilterHandle | ||
) |
Creates a spectral filter that filters data in the first dataset. If WCS/WOSC/OSCW filter is created the filtered data is appended last in the new dataset, otherwise the variables are replaced by the new data. If OSC/WOSC an unfitted model will always be created in the new project. Note that a chained filter is always created.
[in] | hProject | Handle to the project. |
[in] | iDatasetNumber | The number of the dataset that should be filtered |
[out] | pFilterHandle | The handle to the filter. |
SQ_ErrorCode SQ_CreateTimeSeriesFilter | ( | SQ_Project | hProject, |
SQ_TSFilterType | eFilter, | ||
int | iDatasetNumber, | ||
SQ_Filter * | pFilterHandle | ||
) |
Creates a time series filter that filters data in the first dataset.
[in] | hProject | Handle to the project. |
[in] | eFilter | A time series filter to create |
[in] | iDatasetNumber | The number of the dataset that should be filtered |
[out] | pFilterHandle | The handle to the filter. |
SQ_ErrorCode SQ_FinishFiltering | ( | SQ_Filter | hFilter | ) |
Finish the filtering process.
[in] | hFilter | Handle to the filter. |
SQ_ErrorCode SQ_GetAngle | ( | SQ_Filter | hFilter, |
float * | pfAngle | ||
) |
Gets angle in degrees of the last component calculated. Only valid when OSC filter. Must be called between StartFiltering and FinishFiltering.
[in] | hFilter | Handle to the OSC filter. |
[out] | pfAngle | The angle in degrees. |
SQ_ErrorCode SQ_GetDetailLevelData | ( | SQ_Filter | hFilter, |
int | iDetailLevelIndex, | ||
int * | pnCoeffs, | ||
float * | pfRetained | ||
) |
Gets the retained energy (in %) and number of coefficients for a given detail level index. Only valid when some kind of WAV filter and retained energy by details is set. Must be called between StartFiltering and FinishFiltering.
[in] | hFilter | Handle to the WAV filter type. |
[in] | iDetailLevelIndex | The detail level index to get data from. |
[out] | pnCoeffs | The number of coefficients for the given index. |
[out] | pfRetained | The retained energy (in %) for the given index. |
SQ_ErrorCode SQ_GetDetailLevelNumOfIndexes | ( | SQ_Filter | hFilter, |
int * | pnIndexes | ||
) |
Gets the number of detail level indexes that can be used to select the detail levels. The lowest index corresponds to the highest frequencies. Only valid when some kind of WAV filter and retained energy by details is set. Must be called between StartFiltering and FinishFiltering.
[in] | hFilter | Handle to the WAV filter type. |
[out] | pnIndexes | The number of detail level indexes that can be used in SetDetailLevelIndexes. Indexes that may be used are 1..pnIndexes. |
SQ_ErrorCode SQ_GetDetailLevelTotalRetained | ( | SQ_Filter | hFilter, |
float * | pfRetained | ||
) |
Gets the total retained energy (in %) with the previous set detail levels. Only valid when some kind of WAV filter and retained energy by details is set. Must be called between StartFiltering and FinishFiltering.
[in] | hFilter | Handle to the WAV filter type. |
[out] | pfRetained | The total energy retained. |
SQ_ErrorCode SQ_GetEigenvalue | ( | SQ_Filter | hFilter, |
float * | pfEigenvalue | ||
) |
Gets the eigenvalue of the last component calculated. Only valid when OSC filter. Must be called between StartFiltering and FinishFiltering.
[in] | hFilter | Handle to the OSC filter. |
[out] | pfEigenvalue | The eigenvalue. |
SQ_ErrorCode SQ_GetPluginFilterNames | ( | SQ_StringVector * | pvecNames | ) |
Returns an vector of names of the plugin filters.
[out] | pvecNames | A vector of name of the plugin filters. |
SQ_ErrorCode SQ_GetPluginFilterOptions | ( | SQ_Filter | hFilter, |
const char * | szPluginName, | ||
char * | pszOptions, | ||
int | iBufferLen | ||
) |
Returns the options for a plugin filter.
[in] | hFilter | Handle to the filter. |
[in] | szPluginName | The name of the plugin filter to receive options from. |
[in,out] | pszOptions | An XML formatted string with the options for the specified plugin. |
[in] | iBufferLen | The lenght of the buffer to recieve the options. |
SQ_ErrorCode SQ_GetRemainingSS | ( | SQ_Filter | hFilter, |
float * | pfRemainingSS | ||
) |
Gets the remaining SS in percent of the last component calculated. Only valid when OSC filter. Must be called between StartFiltering and FinishFiltering.
[in] | hFilter | Handle to the OSC filter. |
[out] | pfRemainingSS | The returned remaining SS in percent. |
SQ_ErrorCode SQ_NextFilterComponent | ( | SQ_Filter | hFilter | ) |
Calculates the next component. Only valid when OSC filter, which by default starts with one component. Must be called between StartFiltering and FinishFiltering.
[in] | hFilter | Handle to the OSC filter. |
SQ_ErrorCode SQ_ReleaseFilterHandle | ( | SQ_Filter | hFilter | ) |
Releases the filter handle.
[in] | hFilter | Handle to the filter. |
SQ_ErrorCode SQ_RemoveFilterComponent | ( | SQ_Filter | hFilter | ) |
Removes the last component. Only valid when OSC filter, which by default starts with one component. Must be called between StartFiltering and FinishFiltering.
[in] | hFilter | Handle to the OSC filter. |
SQ_ErrorCode SQ_SetChainOrder | ( | SQ_Filter | hFilter, |
SQ_FilterType | eFilter | ||
) |
Sets the filtering order. Must be called directly after CreateSpectralFilter. A chained filter can be a combination of the following filter types:
[in] | hFilter | Handle to the filter. |
[in] | eFilter | The filter type. |
SQ_ErrorCode SQ_SetChainOrderPlugin | ( | SQ_Filter | hFilter, |
const char * | szPluginFilter | ||
) |
Sets the filtering order. Must be called directly after CreateSpectralFilter.
[in] | hFilter | Handle to the filter. |
[in] | szPluginFilter | The name of the plugin filter, UTF-8 encoded. |
SQ_ErrorCode SQ_SetData | ( | SQ_Filter | hFilter, |
SQ_IntVector * | oXVarNums, | ||
SQ_IntVector * | oYVarNums, | ||
SQ_IntVector * | oObsNums | ||
) |
Sets x,y and observation data that should be used when filtering. Must be called before StartFiltering.
[in] | hFilter | Handle to the filter. |
[in] | oXVarNums | The vector of x variables in dataset to include for filtering. The indices must be in ascending order. |
[in] | oYVarNums | The vector of y variables in dataset to include for filtering. The indices must be in ascending order. |
[in] | oObsNums | The vector of observations in dataset to include for filtering. The observations must be in ascending order. |
SQ_ErrorCode SQ_SetDataset | ( | SQ_Filter | hFilter, |
int | iDatasetNumber | ||
) |
Sets the dataset to use for a WDTS filter. Only valid when a WDTS filter. Must be called before StartFiltering and SetData.
[in] | hFilter | Handle to the WDTS filter. |
[in] | iDatasetNumber | The number of the dataset to use. |
SQ_ErrorCode SQ_SetDatasetName | ( | SQ_Filter | hFilter, |
const char * | strName | ||
) |
Set the name of the filtered dataset.
[in] | hFilter | Handle to the filter. |
[in] | strName | The name of the dataset to create. |
SQ_ErrorCode SQ_SetDeltaX | ( | SQ_Filter | hFilter, |
float | fDeltaX | ||
) |
Sets the distance between each point. Only valid when derivate filter. Must be called before StartFiltering.
[in] | hFilter | Handle to the filter. |
[in] | fDeltaX | The distance between the points. |
SQ_ErrorCode SQ_SetDerivateOrder | ( | SQ_Filter | hFilter, |
SQ_FilterDerivateOrder | eDerivateOrder | ||
) |
Sets the derivate order. Only valid when derivate filter. Must be called before StartFiltering.
[in] | hFilter | Handle to the derivate filter. |
[in] | eDerivateOrder | The derivate order. |
SQ_ErrorCode SQ_SetDetailLevelDecimation | ( | SQ_Filter | hFilter, |
int | iDecNum | ||
) |
Sets the decimation number, which will exclude some observations. Only valid when a WDTS filter and when energy retained by details is chosen.
[in] | hFilter | Handle to the WAV filter type. |
[in] | iDecNum | The decimation number. 1 means include all observations. 2 means include every second. 4 means include every fourth and so on. |
SQ_ErrorCode SQ_SetDetailLevelIndexes | ( | SQ_Filter | hFilter, |
SQ_IntVector | nVecDetailLevels | ||
) |
Sets the detail level indexes to be used. Only valid when some kind of WAV filter and retained energy by details is set. Must be called between StartFiltering and FinishFiltering.
[in] | hFilter | Handle to the WAV filter type. |
[in] | nVecDetailLevels | The vector of indexes to be used. |
SQ_ErrorCode SQ_SetDetrendMode | ( | SQ_Filter | hFilter, |
SQ_FilterDetrendMode | eMode | ||
) |
Sets the detrend mode for the wavelet filter. Only valid when some kind of WAV filter. Must be called before StartFiltering.
[in] | hFilter | Handle to the WAV filter. |
[in] | eMode | The detrend mode. |
SQ_ErrorCode SQ_SetEnergyRetainedByDetailLevel | ( | SQ_Filter | hFilter | ) |
Sets the filter to use energy retained by detail level. Only valid when some kind of WAV filter. Must be called before StartFiltering.
[in] | hFilter | Handle to the WAV filter. |
SQ_ErrorCode SQ_SetEnergyRetainedByVariance | ( | SQ_Filter | hFilter, |
SQ_FilterCompressionMethod | eMethod | ||
) |
Sets the filter to use energy retained by variance. Only valid when some kind of WAV filter. Must be called before StartFiltering.
[in] | hFilter | Handle to the WAV filter. |
[in] | eMethod | The compression method to use. |
SQ_ErrorCode SQ_SetEWMAType | ( | SQ_Filter | hFilter, |
SQ_EWMAType | eEWMAType | ||
) |
Sets the type of EWMA calculation Only valid when EWMAfilter. Must be called before StartFiltering.
[in] | hFilter | Handle to the derivate filter. |
[in] | eEWMAType | The type of EWMA calculation filter or predictive, before SIMCA-Q 14.1 only predictive was available. |
SQ_ErrorCode SQ_SetLambdaValue | ( | SQ_Filter | hFilter, |
float | fLambda | ||
) |
Sets the lambda value Only valid when EWMAfilter. Must be called before StartFiltering.
[in] | hFilter | Handle to the derivate filter. |
[in] | fLambda | The lambda value, between 0 and 1. |
SQ_ErrorCode SQ_SetPluginFilterOptions | ( | SQ_Filter | hFilter, |
const char * | szPluginName, | ||
const char * | szOptions | ||
) |
Sets the options for a plugin filter.
[in] | hFilter | Handle to the filter. |
[in] | szPluginName | The name of the plugin filter to receive options from. |
[in] | szOptions | An XML formatted string with the options for the specified plugin. |
SQ_ErrorCode SQ_SetPolynomialOrder | ( | SQ_Filter | hFilter, |
SQ_FilterPolynomialOrder | eOrder, | ||
SQ_Bool | bDerivate | ||
) |
Sets the polynomial order. Only valid when derivate or Salvitzky-Golay filter. Must be called before StartFiltering.
[in] | hFilter | Handle to the derivate filter. |
[in] | eOrder | The polynomial order. |
[in] | bDerivate | True if it's a derivate filter, otherwise it's a Savitzky-Golay filter |
SQ_ErrorCode SQ_SetScale | ( | SQ_Filter | hFilter, |
SQ_IntVector | oVarNums, | ||
int | iVarNums, | ||
SQ_FilterScalingType | eScale | ||
) |
Sets scale for the variables set with SetData. Must be called before StartFiltering. Default for X is Center. Default for Y is Unit Variance. Valid if OSC, WOSC or OSCW filter.
[in] | hFilter | Handle to the filter. |
[in] | oVarNums | The vector of variables in dataset to transform according to the TransformInfo. |
[in] | iVarNums | The number of variables in the vector. Note: The vector size may be larger. Scaling will be done for the iVarNums first variables in the vector. |
[in] | eScale | The ScalingType that describes the scaling to apply. |
SQ_ErrorCode SQ_SetSubModelPoints | ( | SQ_Filter | hFilter, |
int | iSubModelPoints, | ||
SQ_Bool | bDerivate | ||
) |
Sets the number of points in each sub-model. Only valid when derivate or Salvitzky-Golay filter. Must be called before StartFiltering.
[in] | hFilter | Handle to the derivate filter. |
[in] | iSubModelPoints | The number of sub-model points. Must be odd and at least 5, but not larger than or equal to the number of variables selected. |
[in] | bDerivate | True if it's a derivate filter, otherwise it's a Savitzky-Golay filter |
SQ_ErrorCode SQ_SetTargetVariable | ( | SQ_Filter | hFilter, |
int | iTargetVariable | ||
) |
Sets the target variable for a WDTS filter. Only valid when a WDTS filter.
[in] | hFilter | Handle to the WAV filter type. |
[in] | iTargetVariable | The target variable index. This index must also be set in SetData. |
SQ_ErrorCode SQ_SetTransformation | ( | SQ_Filter | hFilter, |
SQ_IntVector | oVarNums, | ||
int | iVarNums, | ||
SQ_WSTransformInfo | oTransInfo | ||
) |
Sets transformation for the variables set with SetData. Default transformation is None. Must be called before StartFiltering. Valid if OSC, WCS, WOSC or OSCW filter.
[in] | hFilter | Handle to the filter. |
[in] | oVarNums | The vector of variables in dataset to transform according to the TransformInfo. |
[in] | iVarNums | The number of variables in the vector. Note: The vector size may be larger. Transformation will be done for the iVarNums first variables in the vector. |
[in] | oTransInfo | The TransformInfo that describes the transformation to apply. |
SQ_ErrorCode SQ_SetVarianceCoeffs | ( | SQ_Filter | hFilter, |
int | iCoeffs, | ||
float * | pfRetained | ||
) |
Sets the number of coefficients to use. Only valid when some kind of WAV filter and retained energy by variance is set. Must be called between StartFiltering and FinishFiltering.
[in] | hFilter | Handle to the WAV type filter. |
[in] | iCoeffs | The number of coefficients. |
[out] | pfRetained | The total retained energy when using iCoeffs coefficients. |
SQ_ErrorCode SQ_SetVarianceUsePadding | ( | SQ_Filter | hFilter, |
SQ_Bool | bPadding | ||
) |
Sets option to use padding on a WCS filter when retained energy by variance and compression method is DWT. Only valid when WCS filter, retained energy by variance and compression is DWT. When compression is best basis, padding is always used. Must be called before StartFiltering. Padding means "pad to the power of 2", see the documentation for more information.
[in] | hFilter | Handle to the WAV type filter. |
[in] | bPadding | True if padding should be used, false if not. |
SQ_ErrorCode SQ_SetWaveletFunction | ( | SQ_Filter | hFilter, |
SQ_FilterWaveletFunction | eFunction, | ||
int | iOrder | ||
) |
Sets the wavelet function and corresponding wavelet order to be used. Only valid when some kind of WAV filter. Must be called before StartFiltering.
[in] | hFilter | Handle to the WAV filter. |
[in] | eFunction | The wavelet function. |
[in] | iOrder | The wavelet order. If Beylkin or Biorthogonal{4,5,6} is used as function this argument is ignored. See the documentation of valid orders for each of the wavelet functions. |
SQ_ErrorCode SQ_StartFiltering | ( | SQ_Filter | hFilter | ) |
Starts the filtering process. If OSC, a first component is automatically calculated.
[in] | hFilter | Handle to the filter. |
Copyright (C) Sartorius Stedim Data Analytics AB - Generated by Doxygen