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.

3.13.8 Waveforms<br />

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

sawtooth(t[, width]) Returns a periodic sawtooth waveform with period 2*pi<br />

square(t[, duty]) Returns a periodic square-wave waveform with period 2*pi<br />

gausspulse(t[, fc, bw, bwr, tpr, retquad, ...]) Return a gaussian modulated sinusoid: exp(-a t^2) exp(1j*2*pi*fc)<br />

chirp(t[, f0, t1, f1, method, phi, qshape]) Frequency-swept cosine generator.<br />

sawtooth(t, width=1)<br />

Returns a periodic sawtooth waveform with period 2*pi which rises from -1 to 1 on the interval 0 to width*2*pi<br />

and drops from 1 to -1 on the interval width*2*pi to 2*pi width must be in the interval [0,1]<br />

square(t, duty=0.5)<br />

Returns a periodic square-wave waveform with period 2*pi which is +1 from 0 to 2*pi*duty and -1 from<br />

2*pi*duty to 2*pi duty must be in the interval [0,1]<br />

gausspulse(t, fc=1000, bw=0.5, bwr=-6, tpr=-60, retquad=0, retenv=0)<br />

Return a gaussian modulated sinusoid: exp(-a t^2) exp(1j*2*pi*fc)<br />

If retquad is non-zero, then return the real and imaginary parts<br />

(inphase and quadrature)<br />

If retenv is non-zero, then return the envelope (unmodulated signal). Otherwise, return the real part of the<br />

modulated sinusoid.<br />

Inputs:<br />

t – Input array. fc – Center frequency (Hz). bw – Fractional bandwidth in frequency domain of<br />

pulse (Hz). bwr – Reference level at which fractional bandwidth is calculated (dB). tpr – If t is<br />

‘cutoff’, then the function returns the cutoff time for when the<br />

pulse amplitude falls below tpr (in dB).<br />

retquad – Return the quadrature (imaginary) as well as the real part of the signal retenv – Return<br />

the envelope of th signal.<br />

chirp(t, f0=0, t1=1, f1=100, method=’linear’, phi=0, qshape=None)<br />

Frequency-swept cosine generator.<br />

Parameters<br />

t : ndarray<br />

Times at which to evaluate the waveform.<br />

f0 : float or ndarray, optional<br />

Frequency (in Hz) of the waveform at time 0. If f0 is an ndarray, it specifies the<br />

frequency change as a polynomial in t (see Notes below).<br />

t1 : float, optional<br />

Time at which f1 is specified.<br />

f1 : float, optional<br />

Frequency (in Hz) of the waveform at time t1.<br />

method : {‘linear’, ‘quadratic’, ‘logarithmic’}, optional<br />

Kind of frequency sweep.<br />

phi : float<br />

Phase offset, in degrees.<br />

qshape : {‘convex’, ‘concave’}<br />

3.13. Signal processing (<strong>scipy</strong>.signal) 345

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

Saved successfully!

Ooh no, something went wrong!