CLsqFit:SetRejSigmaLow
The SetRejSigmaLow method sets the low sigma clipping parameter for the rejecting outlying data far below the fit. This parameter is a string that specifies a list of k values for iterative k-sigma clipping.
CLsqFit:SetRejSigmaLow( sSigmaLow ) CLsqFit:SetRejSigmaLow( sSigmaLow, nChannel ) |
sSigmaHigh is a string giving the sequence of sigmas used for low value rejection. The default is "2.8,2.8,2.8". The string can specify from 1 to many values.
nChannel an optional parameter which specifies the channel. If omitted, values are set for all channels.
This method configures the low clipping parameter for use when data rejection is enabled by calling DoRejection. Here, "sigma" corresponds to the standard deviation of the fit (see GetSigmaFit). Points having residuals further than k-sigmas below the fit will be discarded and the fit then recomputed in an iterative process. This method specifies the list of k values as the comma-separated string sSigmaLow. The currently assigned value of sSigmaLow may be obtained using GetRejSigmaLow. See Rejecting Outliers from the Fit for a detailed description of this parameter.
If the nChannel parameter is absent, all channels are assigned the same value of sSigmaLow.
The example below fits a line to (x,y) pair data which includes 1 point significantly below the trend. Without data rejection, the bad point is included in the fit and the standard deviation is high. Data rejection is then enabled (with default rejection parameters) and the fit rejects the outlying point, giving a significantly lower standard deviation. Finally, the SetRejSigmaLow method is called with a large value for the low rejection threshold. Although data rejection is still enabled, the outlier is not rejected because it does not exceed the larger rejection threshold.
|
-- create a CLsqFit object |
|
-- set 2 coefficients to fit a line |
|
-- add data points |
|
|
|
|
|
-- significantly below the trend |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Fit the polynomial |
|
-- standard deviation of the fit |
|
-- how many points used in the fit? |
|
-- result: sd(10) = 6.93996 |
|
-- enable data rejection with default parameters |
|
-- re-do the fit using data rejection |
|
-- standard deviation of the fit |
|
-- how many points used in the fit? |
|
-- result: sd(9) = 0.40018 |
|
-- set low clipping to 10 sigmas |
|
-- re-do the fit using data rejection |
|
-- standard deviation of the fit |
|
-- how many points used in the fit? |
|
-- result: sd(10) = 6.93996 |
CLsqFit class, GetRejSigmaLow, SetRejSigmaHigh, SetRejCycles, SetRejDefault, Rejecting Outliers from the Fit
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.