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() CLsqFit:DoRejection( bEnable ) CLsqFit:DoRejection( bEnable, nChannel ) bEnable is an optional argument value that specifies whether to enable or disable data rejection. Set it true to enable bad data rejection or false to disable it. nChannel an optional argument that specifies the channel. If omitted, the data rejection state is set for all channels. If neither bEnable or nChannel is specified, then data rejection is enabled for all channels. |
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 to the fit |
|
|
-- 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
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.