15.12.2012 Views

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SciPy Reference Guide, Release 0.8.dev<br />

Notes<br />

zf : array (optional)<br />

If zi is None, this is not returned, otherwise, zf holds the final filter delay values.<br />

The filter function is implemented as a direct II transposed structure. This means that the filter implements<br />

a[0]*y[n] = b[0]*x[n] + b[1]*x[n-1] + ... + b[nb]*x[n-nb]<br />

- a[1]*y[n-1] - ... - a[na]*y[n-na]<br />

using the following difference equations:<br />

y[m] = b[0]*x[m] + z[0,m-1]<br />

z[0,m] = b[1]*x[m] + z[1,m-1] - a[1]*y[m]<br />

...<br />

z[n-3,m] = b[n-2]*x[m] + z[n-2,m-1] - a[n-2]*y[m]<br />

z[n-2,m] = b[n-1]*x[m] - a[n-1]*y[m]<br />

where m is the output sample number and n=max(len(a),len(b)) is the model order.<br />

The rational transfer function describing this filter in the z-transform domain is:<br />

-1 -nb<br />

b[0] + b[1]z + ... + b[nb] z<br />

Y(z) = ---------------------------------- X(z)<br />

-1 -na<br />

a[0] + a[1]z + ... + a[na] z<br />

lfiltic(b, a, y, x=None)<br />

Construct initial conditions for lfilter<br />

Given a linear filter (b,a) and initial conditions on the output y and the input x, return the inital conditions on the<br />

state vector zi which is used by lfilter to generate the output given the input.<br />

If M=len(b)-1 and N=len(a)-1. Then, the initial conditions are given in the vectors x and y as:<br />

x = {x[-1],x[-2],...,x[-M]}<br />

y = {y[-1],y[-2],...,y[-N]}<br />

If x is not given, its inital conditions are assumed zero. If either vector is too short, then zeros are added to<br />

achieve the proper length.<br />

The output vector zi contains:<br />

zi = {z_0[-1], z_1[-1], ..., z_K-1[-1]} where K=max(M,N).<br />

deconvolve(signal, divisor)<br />

Deconvolves divisor out of signal.<br />

hilbert(x, N=None, axis=-1)<br />

Compute the analytic signal.<br />

The transformation is done along the last axis by default.<br />

Parameters<br />

x : array-like<br />

Signal data<br />

N : int, optional<br />

332 Chapter 3. Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!