CLsqFit:DoRejection
The DoRejection method enables or disables bad data rejection. For multi-channel data, data rejection can be applied to one or all channels. The rejection algorithm uses default rejection parameters unless you change them using one of the SetRej... methods
CLsqFit:DoRejection( bEnable*, nChannel* )
|
Data rejection is performed during the fitting procedure invoked by calling Fit. The data rejection parameters can be set to default values using SetRejDefault or to specific values using SetRejSigmaHigh, SetRejSigmaLow, or SetRejCycles, Unless changed using one of these methods, the rejection algorithm assumes the default parameters.
This example deletes a sample point and enables data rejection. After the fit is run, it lists the number of points used in the fit and the total number of points added to the sample.
|
-- create a CLsqFit object |
|
-- set 2 coefficients to fit a line |
|
-- add a point for x = 3.5, y = 5.15 |
|
-- add a point |
|
-- add a point |
|
-- add more points |
|
-- manually delete the 2nd point |
|
-- enable bad data rejection for all channels |
|
-- Fit the polynomial |
|
-- number of points deleted |
|
-- number of points rejected |
|
-- list number deleted and number rejected |
CLsqFit class, Fit, SetRejSigmaHigh, SetRejSigmaLow, SetRejCycles, GetRejSigmaHigh, GetRejSigmaLow, GetRejCycles, SetRejDefault, Rejecting Outliers from the Fit