Functions
hrl_lib::data_process Namespace Reference

Functions

def equalize_times
 Given a list of 1d time arrays, find the sequence that started first and subtract all sequences from its first time recording.
def filter
 filter a list given indices
def gradient
 calc dx/dt
def histogram
def histogram_get_bin_numb
 Given a histogram with params, calculate.
def interpolate_1d
 1D interpolation
def signal_list_variance
 TODO docs Returns the variance of the series x given mean function y over a window of size window_len.
def signal_smooth
 smooth the data using a window with requested size.
def signal_variance
 Returns the variance of the series x given mean function y over a window of size window_len.

Function Documentation

def hrl_lib.data_process.equalize_times (   list_of_time_arrays)

Given a list of 1d time arrays, find the sequence that started first and subtract all sequences from its first time recording.

Parameters:
list_of_time_arraysa list of 1d arrays
Returns:
list_of_time_arrays adjusted so that time arrays would start at 0

Definition at line 20 of file data_process.py.

def hrl_lib.data_process.filter (   alist,
  indices 
)

filter a list given indices

Parameters:
alista list
indicesindices in that list to select

Definition at line 8 of file data_process.py.

def hrl_lib.data_process.gradient (   t,
  x 
)

calc dx/dt

Parameters:
tmatrix 1xn
xmatrix mxn

Definition at line 44 of file data_process.py.

def hrl_lib.data_process.histogram (   index_list_list,
  elements_list_list,
  bin_size,
  min_index = None,
  max_index = None 
)
Parameters:
index_list_lista list of list of indices to histogram by
elements_list_lista list of list of elements to place in histogram bins
bin_sizesize of bins in index_list_list units
min_indexoptional argument for mininum index to create histogram over
max_indexoptional argument for maximum index to create histogram over

Definition at line 101 of file data_process.py.

def hrl_lib.data_process.histogram_get_bin_numb (   n,
  min_index,
  bin_size,
  nbins 
)

Given a histogram with params, calculate.

Definition at line 87 of file data_process.py.

def hrl_lib.data_process.interpolate_1d (   x,
  y,
  xquery 
)

1D interpolation

Parameters:
x1xn mat x to interpolate from
y1xn mat y to interpolate from
xquery1xn mat of query x's

Definition at line 60 of file data_process.py.

def hrl_lib.data_process.signal_list_variance (   x_list,
  means,
  window_len = 10,
  num_samples = 30,
  resample = 1 
)

TODO docs Returns the variance of the series x given mean function y over a window of size window_len.

Parameters:
xthe original signal
ythe smoothed signal function
window_lensize of the window to calculate variances over
Returns:
the variance function

Definition at line 218 of file data_process.py.

def hrl_lib.data_process.signal_smooth (   x,
  window_len = 11,
  window = 'hamming' 
)

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.

output: the smoothed signal

example:

t=linspace(-2,2,0.1) x=sin(t)+randn(len(t))*0.1 y=smooth(x)

see also:

numpy.hanning, numpy.hamming, numpy.bartlett, numpy.blackman, numpy.convolve scipy.signal.lfilter

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

Parameters:
xthe input signal
window_lenthe dimension of the smoothing window; should be an odd integer
windowthe type of window from 'flat', 'hanning', 'hamming', 'bartlett', 'blackman' flat window will produce a moving average smoothing.
Returns:
the smoothed signal function

Definition at line 156 of file data_process.py.

def hrl_lib.data_process.signal_variance (   x,
  y,
  window_len = 10 
)

Returns the variance of the series x given mean function y over a window of size window_len.

Parameters:
xthe original signal
ythe smoothed signal function
window_lensize of the window to calculate variances over
Returns:
the variance function

Definition at line 191 of file data_process.py.



hrl_lib
Author(s): Cressel Anderson, Travis Deyle, Advait Jain, Hai Nguyen, Advisor: Prof. Charlie Kemp, Lab: Healthcare Robotics Lab at Georgia Tech
autogenerated on Wed Nov 27 2013 11:34:06