PlasmaCalcs.tools.xarray_tools.xarray_sci.xarray_curve_eval
- PlasmaCalcs.tools.xarray_tools.xarray_sci.xarray_curve_eval(params, f, xdata)
- evaluate a curve fit result (params) for this function at these xdata.[EFF] note: well-vectorized f could equivalently do:f(xdata, *params.transpose(‘param’, …))and that would probably be much faster, if it is an available option.
- params: xarray.DataArray or xarray.Dataset
- curve_fit result, or result[‘params’]. Must have ‘param’ dimension.if Dataset, will internally use params[‘params’].
- f: callable like f(x, param1, param2, …)
- function which was fit / to be evaluated.
- xdata: 1D xarray.DataArray
- x values at which to evaluate the fit.