Note
Go to the end to download the full example code.
Plot Residual#
Fit an affine function and plot the residual.
import numpy as np
import hyperspy.api as hs
Create a signal:
Add noise:
s.add_poissonian_noise(random_state=0)
Create model:
Fit for all navigation positions:
0%| | 0/10 [00:00<?, ?it/s]
100%|██████████| 10/10 [00:00<00:00, 1328.99it/s]
Plot the fitted model with residual:
m.plot(plot_residual=True)
sphinx_gallery_thumbnail_number = 2
Total running time of the script: (0 minutes 0.516 seconds)

