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.

See Also:<br />

Returns<br />

y : ndarray<br />

Axes over which to calculate. Defaults to None, which shifts all axes.<br />

The shifted array.<br />

fftshift<br />

Shift zero-frequency component to the center of the spectrum.<br />

Examples<br />

>>> freqs = np.fft.fftfreq(9, d=1./9).reshape(3, 3)<br />

>>> freqs<br />

array([[ 0., 1., 2.],<br />

[ 3., 4., -4.],<br />

[-3., -2., -1.]])<br />

>>> np.fft.ifftshift(np.fft.fftshift(freqs))<br />

array([[ 0., 1., 2.],<br />

[ 3., 4., -4.],<br />

[-3., -2., -1.]])<br />

rfftfreq(n, d=1.0)<br />

rfftfreq(n, d=1.0) -> f<br />

DFT sample frequencies (for usage with rfft,irfft).<br />

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

The returned float array contains the frequency bins in cycles/unit (with zero at the start) given a window length<br />

n and a sample spacing d:<br />

f = [0,1,1,2,2,...,n/2-1,n/2-1,n/2]/(d*n) if n is even f = [0,1,1,2,2,...,n/2-1,n/2-1,n/2,n/2]/(d*n) if n is<br />

odd<br />

3.3.4 Convolutions (<strong>scipy</strong>.fftpack.convolve)<br />

convolve convolve - Function signature:<br />

convolve_z convolve_z - Function signature:<br />

init_convolution_kernel init_convolution_kernel - Function signature:<br />

destroy_convolve_cache destroy_convolve_cache - Function signature:<br />

convolve<br />

convolve - Function signature:<br />

y = convolve(x,omega,[swap_real_imag,overwrite_x])<br />

Required arguments:<br />

x : input rank-1 array(‘d’) with bounds (n) omega : input rank-1 array(‘d’) with bounds (n)<br />

Optional arguments:<br />

overwrite_x := 0 input int swap_real_imag := 0 input int<br />

Return objects:<br />

y : rank-1 array(‘d’) with bounds (n) and x storage<br />

convolve_z<br />

3.3. Fourier transforms (<strong>scipy</strong>.fftpack) 175

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

Saved successfully!

Ooh no, something went wrong!