ShiftSamples¶
- class baseband_tasks.sampling.ShiftSamples(ih, shift, *, samples_per_frame=None)[source] [edit on github]¶
Bases:
PaddedTaskBaseShift channels in a stream by integer numbers of samples.
The shifts are interpreted as additive to the sample times, i.e., positive shifts imply that a stream will appear delayed in time.
Note that no resampling is done; for shifting by non-integer numbers of samples, use
ShiftAndResample.- Parameters:
- ihtask or
basebandstream reader Input data stream, with time as the first axis.
- shiftint or float array-like, or
Quantity Amount by which to shift samples along the stream. Normally integer, but can also be float or quantity with units of time, in which case the shifts will be rounded to the nearest integer. Should broadcast to the sample shape. For instance, to shift along the one-but-last axis with length
N, the shape of shift should be(N, 1).- samples_per_frameint
Number of shifted samples which should be produced in one go. The number of input samples used will be larger to avoid wrapping. If not given, the minimum length that gives at least 75% efficiency and ensures efficient fast fourier transforms.
- ihtask or
See also
ShiftAndResampleshift channels by fractional samples and resample
Resampleresample a stream to a new grid, without time shifts
Methods Summary
task(data)Methods Documentation
- task(data)[source] [edit on github]¶