Smoothing of timeSeries data using convolution filters¶
Let’s first create a TimeSeries from sample data.
goes_lc = TimeSeries(GOES_XRS_TIMESERIES).truncate('2011/06/07 06:10', '2011/06/07 07:00')
Now we will extract data values from the TimeSeries and apply a BoxCar filter to get smooth data. Boxcar smoothing is equivalent to taking our signal and using it to make a new signal where each element is the average of w adjacent elements. Here we will use astropy’s convolve function with a “boxcar” kernel of width w = 10.
Plotting original and smoothed timeseries.
Total running time of the script: ( 0 minutes 0.455 seconds)