# Smoothing

In many applications, mass spectrometric data should be smoothed first before further analysis

 1from urllib.request import urlretrieve
2from pyopenms import *
3
4gh = "https://raw.githubusercontent.com/OpenMS/pyopenms-docs/master"
5urlretrieve(
6    gh + "/src/data/peakpicker_tutorial_1_baseline_filtered.mzML",
7    "tutorial.mzML",
8)
9
10exp = MSExperiment()
11gf = GaussFilter()
12param = gf.getParameters()
13param.setValue("gaussian_width", 1.0)  # needs wider width
14gf.setParameters(param)
15

We can now load our data into TOPPView to observe the effect of the smoothing, which becomes apparent when we overlay the two files (drag onto each other) and then zoom into a given mass range using Ctrl-G and select $$4030$$ to $$4045$$: