- qspec. propagate_fit ( f , x , popt , pcov , sample_size=1000000 )[source]
-
Propagate the uncertainties of fitted parameters through the function
fusing Monte-Carlo sampling.- Parameters:
-
- fCallable
The function
f(x, *popt)to compute.fneeds to be vectorized.- xarray_like
The input values.
- poptarray_like
An array of the fitted parameters, e.g., from
scipy.optimize.curve_fit.- pcovarray_like
A 2d-array of the estimated covariances of
popt.- sample_sizeint
The number of random variates used for the calculation. The default is 1,000,000.
- Returns: