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/51 [00:00<?, ?it/s]
2%|▏ | 1/51 [00:02<02:18, 2.77s/it]
25%|██▌ | 13/51 [00:03<00:06, 5.44it/s]
29%|██▉ | 15/51 [00:03<00:06, 5.74it/s]
53%|█████▎ | 27/51 [00:03<00:01, 13.71it/s]
100%|██████████| 51/51 [00:03<00:00, 33.77it/s]
100%|██████████| 51/51 [00:03<00:00, 13.98it/s]
Plot the signal and its baseline:
Total running time of the script: (0 minutes 4.667 seconds)

