Uncertainty#
An error bar depends on what is allowed to vary: measurement noise, the sampling of the trace, or a calibrated instrument parameter such as the substrate thickness. croak provides estimators for each and reports the result on the retrieved FWHM, optionally at a different beamline point. Variation between solver starts is a convergence diagnostic, not a measurement uncertainty.
Which page do I need?#
I want to… |
Read |
|---|---|
run a bootstrap, choose a method and report the interval |
|
propagate a substrate-thickness calibration through a dispersive retrieval |
|
get a fast analytic estimate without re-retrieving |
|
understand the statistics and their assumptions |
Key concepts#
The parametric bootstrap simulates new traces from the best fit plus a noise model and re-retrieves each; the resampling bootstraps resample delay columns or frequency rows. The thickness method is a systematic: it propagates a measured thickness prior rather than noise. The analytic covariance linearises the fit around its minimum. Independent contributions combine by convolving their sampling distributions, which reduces to addition in quadrature in the Gaussian limit. Coverage calibration on synthetic data tests whether a nominal 68 % interval really covers the truth 68 % of the time.
Main entry points#
estimate_fwhm_uncertainty(): one call for every bootstrap method.NoiseModel,noise_from_residual(): the noise model for the parametric bootstrap.covariance_uncertainty(): the linearised covariance.combine_uncertainties(),coverage_calibration(): combining and calibrating.
The thickness-uncertainty example propagates a measured calibration uncertainty. Then save the analysis with its settings.