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. |
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.
list_of_time_arrays | a list of 1d arrays |
Definition at line 20 of file data_process.py.
def hrl_lib.data_process.filter | ( | alist, | |
indices | |||
) |
filter a list given indices
alist | a list |
indices | indices in that list to select |
Definition at line 8 of file data_process.py.
def hrl_lib.data_process.gradient | ( | t, | |
x | |||
) |
def hrl_lib.data_process.histogram | ( | index_list_list, | |
elements_list_list, | |||
bin_size, | |||
min_index = None , |
|||
max_index = None |
|||
) |
index_list_list | a list of list of indices to histogram by |
elements_list_list | a list of list of elements to place in histogram bins |
bin_size | size of bins in index_list_list units |
min_index | optional argument for mininum index to create histogram over |
max_index | optional 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
x | 1xn mat x to interpolate from |
y | 1xn mat y to interpolate from |
xquery | 1xn 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.
x | the original signal |
y | the smoothed signal function |
window_len | size of the window to calculate variances over |
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
x | the input signal |
window_len | the dimension of the smoothing window; should be an odd integer |
window | the type of window from 'flat', 'hanning', 'hamming', 'bartlett', 'blackman' flat window will produce a moving average smoothing. |
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.
x | the original signal |
y | the smoothed signal function |
window_len | size of the window to calculate variances over |
Definition at line 191 of file data_process.py.