# Interpolating or smoothing list plot

I am currently trying to interpret my FTIR data. But due to a lot of background noise, my spectrum is quite spiky and fluctuating at some points. I want to try to smoothen my function to make the peaks in the spectrum more apparent.

My code looks like this:

ListLinePlot[{q2, q1}, ScalingFunctions -> {"Reverse", Identity},
PlotRange -> {{3100, 2700}, Automatic},
PlotLegends -> {"UV1", "PURE1"}, ImageSize -> Full,
GridLines -> {{2870, 2960, 2925, 2850}, {}}, Black,
Bold, FontSize -> 16], Style["Absorbance", Black, Bold, FontSize -> 16]},
TicksStyle -> Directive[FontSize -> 14]]


Giving the following plot:

So I would like to make it more smooth. Any ideas on how to do this? I've tried to find something, but I only came across Interpolating, but that did not really work because my data set is not just a list of numbers.

• Interpolation accepts input data in various forms (input does not have to be just a list of numbers). If your q1 and q2 are lists of pairs you can use this form of Interpolation. If you post a small portion of your actual data (for example, q1[[;;10]] and q2[[;;10]]), it will make it easier for people to help you. – kglr Jul 4 '17 at 17:29
• Perhaps convolving your data with a suitable kernel (Gaussian perhaps) could help. – Tucker Jul 4 '17 at 17:32
• Note that smoothing can make some peaks less apparent. Do you have a definition for what constitutes a peak over and above the noise? Maybe something as simple as using the functions MovingAverage or MovingMedian or FindPeaks will suit your needs. – JimB Jul 4 '17 at 17:45
• – Michael E2 Jul 4 '17 at 23:58

I think LowpassFilter should do what you want. (I can't comment yet)
data = Table[{x, Sin[x] + RandomReal[{-0.1, 0.1}]}, {x, 0, 2 \[Pi], 0.01}];