cana.spectools.uncertainties¶
Tools for estimating parameters uncertainty.
Functions
rebin_error_estimate(spec, func, n[, param]) |
Estimate error by a monte-carlo with spectra resampling from the rebining. |
rebin_resampling(spec[, binsize]) |
Resample the spectra considering the error from the rebinned spectrum. |
rms_error_estimate(spec, func, n[, param]) |
Estimate error by a monte-carlo with spectra resampling from the rms. |
rms_resampling(spec) |
Resample the spectra considering the reflectance rms. |
spec_resample(spec, rms) |
Auxiliary method for resampling the spectrum. |
Classes
SpecError([n, method, param]) |
Monte-Carlo method for estimating the Spectrum parameters errors. |
-
class
cana.spectools.uncertainties.SpecError(n=100, method='rms', param=None)[source]¶ Monte-Carlo method for estimating the Spectrum parameters errors.
All resampling methods assume a gaussian error for the reflectances.
Methods
rms: Estimates the rms of the spectrum and resample the reflectances considering the rms as the errors in the reflectances values removal: Resample the spectrum by randomly removing a percentage of the points. rebin: Rebin the Spectrum and takes the bin deviation as the error for resampling the reflectance values.
-
cana.spectools.uncertainties.rebin_error_estimate(spec, func, n, param=5, **kwargs)[source]¶ Estimate error by a monte-carlo with spectra resampling from the rebining.
Parameters: - spec: Spectrum
The Spectrum object.
- func: method
The method for estimating a parameter from the spectrum.
- n: integer
Number of iterations for Monte-Carlo model. Default 1000.
- param: integer
Binsize for the rebining
-
cana.spectools.uncertainties.rebin_resampling(spec, binsize=5)[source]¶ Resample the spectra considering the error from the rebinned spectrum.
Parameters: - spec: spectrum
The spectrum object
- bisize: int
The size of the bin
Returns: - The resampled binned Spectrum
-
cana.spectools.uncertainties.rms_error_estimate(spec, func, n, param=None, **kwargs)[source]¶ Estimate error by a monte-carlo with spectra resampling from the rms.
Parameters: - spec: Spectrum
The Spectrum object.
- func: method
The method for estimating a parameter from the spectrum.
- n: integer
Number of iterations for Monte-Carlo model. Default 1000.
- param: None
Not necessary