TimeDelay¶
- class baseband_tasks.sampling.TimeDelay(ih, delay, *, lo, frequency=None, sideband=None)[source] [edit on github]¶
Bases:
baseband_tasks.base.TaskBase
Delay a stream by a given amount, taking care of phase rotations.
The delay is added to the sample times (by adding to the
start_time
of the stream), and the sample phases are rotated as needed if the signal was recorded after mixing with a local oscillator. For an upper sideband, the phases are rotated by\[\phi = - \tau f_{lo}.\]For the lower sideband, the rotation is in the opposite direction.
Note that the input data stream must be complex. For real-valued streams, use
ShiftAndResample
withshift
as the delay, nooffset
, andpad=0
(this works for complex data as well, but is slower as it involves fourier transforms).- Parameters
- ihtask or
baseband
stream reader Input data stream, with time as the first axis.
- delayfloat,
Quantity
Delay to apply to all times. Can be (float) samples, or a quantity with units of time.
- lo
Quantity
, orNone
Local oscillator frequency. For raw data, this can just be
if.frequency
. But for channelized data, the actual frequency needs to be passed in. If data were recorded without mixing (like for CHIME), pass inNone
.- frequency
Quantity
, optional Frequencies for each channel. Should be broadcastable to the sample shape. By default, taken from the underlying stream. (Note that these frequencies are not used in the calculations here.)
- sidebandarray, optional
Whether frequencies are upper (+1) or lower (-1) sideband. Should be broadcastable to the sample shape. By default, taken from the underlying stream. Assumed to be correct for the lo.
- ihtask or
See also
ShiftAndResample
also resample a stream, or delay a real-valued stream
baseband_tasks.base.SetAttribute
change start time without phase delay
Methods Summary
task
(data)Methods Documentation
- task(data)[source] [edit on github]¶