Functions | Variables
modeling_forces::smooth Namespace Reference

Functions

def blur_image
def gauss_kern
def smooth
def smooth_demo

Variables

tuple Z = np.cos((X**2+Y**2)/200.)
tuple Z2 = blur_image(Z, 3)

Detailed Description

cookb_signalsmooth.py

from: http://scipy.org/Cookbook/SignalSmooth

Function Documentation

def modeling_forces.smooth.blur_image (   im,
  n,
  ny = None 
)
blurs the image by convolving with a gaussian kernel of typical
    size n. The optional keyword argument ny allows for a different
    size in the y direction.

Definition at line 83 of file smooth.py.

def modeling_forces.smooth.gauss_kern (   size,
  sizey = None 
)
Returns a normalized 2D gauss kernel array for convolutions 

Definition at line 72 of file smooth.py.

def modeling_forces.smooth.smooth (   x,
  window_len = 10,
  window = 'hanning' 
)
smooth the data using a window with requested size.

This method is based on the convolution of a scaled window with the signal.
The signal is prepared by introducing reflected copies of the signal 
(with the window size) in both ends so that transient parts are minimized
in the begining and end part of the output signal.

input:
    x: the input signal 
    window_len: the dimension of the smoothing window
    window: the type of window from 'flat', 'hanning', 'hamming', 'bartlett', 'blackman'
        flat window will produce a moving average smoothing.

output:
    the smoothed signal
    
example:

import numpy as np    
t = np.linspace(-2,2,0.1)
x = np.sin(t)+np.random.randn(len(t))*0.1
y = smooth(x)

see also: 

numpy.hanning, numpy.hamming, numpy.bartlett, numpy.blackman, numpy.convolve
scipy.signal.lfilter
 
TODO: the window parameter could be the window itself if an array instead of a string   

Definition at line 10 of file smooth.py.

Definition at line 93 of file smooth.py.


Variable Documentation

tuple modeling_forces::smooth::Z = np.cos((X**2+Y**2)/200.)

Definition at line 133 of file smooth.py.

Definition at line 134 of file smooth.py.



2010_biorob_everyday_mechanics
Author(s): Advait Jain, Hai Nguyen, Charles C. Kemp (Healthcare Robotics Lab, Georgia Tech)
autogenerated on Wed Nov 27 2013 11:58:43