xboa
Main Page
Namespaces
Classes
Files
File List
xboa
algorithms
smoothing
_hanning_smoothing.py
Go to the documentation of this file.
1
import
copy
2
3
class
HanningSmoothing
(object):
4
def
__init__
(self):
5
pass
6
7
def
smooth
(self, data):
8
omega = math.pi*len(data)
9
data_out = copy.deepcopy(data)
10
for
i_index, item
in
enumerate(data):
11
x_smoothed = data[index]
12
for
j_index, item
in
enumerate(data):
13
x_smoothed += data[j_index]*cos(omega*(j_index-i_index))**2.
14
data_out[index] = x_smoothed
15
return
data_out
xboa.algorithms.smoothing._hanning_smoothing.HanningSmoothing
Definition:
_hanning_smoothing.py:3
xboa.algorithms.smoothing._hanning_smoothing.HanningSmoothing.__init__
def __init__
Definition:
_hanning_smoothing.py:4
xboa.algorithms.smoothing._hanning_smoothing.HanningSmoothing.smooth
def smooth
Definition:
_hanning_smoothing.py:7
Generated on Fri Mar 6 2015 10:37:20 for xboa by
1.8.6