#!/usr/bin/python -Wall # ================================================================ # John Kerl # 2008-01-31 # kerl.john.r@gmail.com # ================================================================ # This software is released under the terms of the GNU GPL. # Please see LICENSE.txt in the same directory as this file. # ================================================================ from __future__ import division # 1/2 = 0.5, not 0. import sys import sackmat_m import smoother_m argc = len(sys.argv) if (argc != 3): print >> sys.stderr, "Usage: %s {file name} {window size}" % (sys.argv[0]) sys.exit(1) input = sackmat_m.read_column_vector(float, sys.argv[1]) window_size = int(sys.argv[2]) output = smoother_m.smoother(input, window_size) sackmat_m.print_column_vector(output)