Note
Go to the end to download the full example code.
Baseline Removal#
This example shows how to remove a baseline from a 1D signal using the pybaselines library.
Create a signal
import hyperspy.api as hs
s = hs.data.two_gaussians()
Remove baseline using remove_baseline():
0%| | 0/33 [00:00<?, ?it/s]
3%|▎ | 1/33 [00:02<01:06, 2.07s/it]
39%|███▉ | 13/33 [00:03<00:05, 3.95it/s]
64%|██████▎ | 21/33 [00:04<00:01, 6.91it/s]
100%|██████████| 33/33 [00:04<00:00, 8.04it/s]
Plot the signal and its baseline:
Total running time of the script: (0 minutes 5.142 seconds)

