pulsarbat.snippet#
- pulsarbat.snippet(z, /, t, n)[source]#
Extracts a snippet of a signal in time.
If
t
corresponds to non-integer number of samples from the start ofz
, time-shifting via FFT (by applying a phase gradient in the Fourier domain) is used. This usually only makes sense ifz
is aBasebandSignal
. For non-baseband signals, the output might not be meaningful.- Parameters:
- z
Signal
Input signal.
- t
int
,float
,Quantity
, orTime
Start location of snippet. Given as either a number of samples (int or float) or a Quantity (units of time) relative to the start of the signal, or a Time object specifying the start time of the snippet.
- n
int
Length of snippet in number of samples. Must be an integer.
- z
- Returns:
Signal
Snippet of
z
starting att
with lengthn
.
Notes
Since an FFT is used, it is efficient to provide a signal with a fast FFT length via
pulsarbat.fast_len()
.