specparam.analysis.compute_pointwise_error¶
- specparam.analysis.compute_pointwise_error(model, plot_errors=True, return_errors=False, **plt_kwargs)[source]¶
Calculate the frequency by frequency error of a model fit.
- Parameters:
- modelSpectralModel
Object containing the data and model.
- plot_errorsbool, optional, default: True
Whether to plot the errors across frequencies.
- return_errorsbool, optional, default: False
Whether to return the calculated errors.
- **plt_kwargs
Keyword arguments to be passed to the plot function.
- Returns:
- errors1d array
Calculated values of the difference between the data and the model. Only returned if return_errors is True.
- Raises:
- NoDataError
If there is no data available to calculate model error from.
- NoModelError
If there are no model results available to calculate model error from.
Examples using specparam.analysis.compute_pointwise_error
¶
Frequency-by-Frequency Errors
Developmental Data Demo