@@ -0,0 +1,2865 @@
+# ######################################################################%0A# Copyright (c) 2014, Brookhaven Science Associates, Brookhaven        #%0A# National Laboratory. All rights reserved.                            #%0A#                                                                      #%0A# Redistribution and use in source and binary forms, with or without   #%0A# modification, are permitted provided that the following conditions   #%0A# are met:                                                             #%0A#                                                                      #%0A# * Redistributions of source code must retain the above copyright     #%0A#   notice, this list of conditions and the following disclaimer.      #%0A#                                                                      #%0A# * Redistributions in binary form must reproduce the above copyright  #%0A#   notice this list of conditions and the following disclaimer in     #%0A#   the documentation and/or other materials provided with the         #%0A#   distribution.                                                      #%0A#                                                                      #%0A# * Neither the name of the Brookhaven Science Associates, Brookhaven  #%0A#   National Laboratory nor the names of its contributors may be used  #%0A#   to endorse or promote products derived from this software without  #%0A#   specific prior written permission.                                 #%0A#                                                                      #%0A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS  #%0A# %22AS IS%22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT    #%0A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS    #%0A# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE       #%0A# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,           #%0A# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES   #%0A# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR   #%0A# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)   #%0A# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,  #%0A# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OTHERWISE) ARISING   #%0A# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE   #%0A# POSSIBILITY OF SUCH DAMAGE.                                          #%0A########################################################################%0Aimport numpy as np%0Afrom numpy.testing import assert_array_almost_equal%0Afrom scipy.signal import savgol_filter%0Afrom skbeam.core.smoothing import sgolay2d%0A%0A%0Adef test_SG():%0A    x = np.array(%5B2, 2, 2, 5, 2, 1, 0, 1, 4, 9, 2, 2, 2%5D)%0A    x2d = np.vstack(%5Bx%5D*2)%0A    smooth_sp = savgol_filter(x, 3, 1)%0A    smooth_sk = sgolay2d(x2d, 3, 1)%0A%0A    assert_array_almost_equal(smooth_sp, smooth_sk)%0A

Add test of smoothing module