TimeDelay¶
- class baseband_tasks.sampling.TimeDelay(ih, delay, *, lo, frequency=None, sideband=None)[source] [edit on github]¶
Bases:
TaskBaseDelay a stream by a given amount, taking care of phase rotations.
The delay is added to the sample times (by adding to the
start_timeof 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
ShiftAndResamplewithshiftas the delay, nooffset, andpad=0(this works for complex data as well, but is slower as it involves fourier transforms).- Parameters:
- ihtask or
basebandstream 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
ShiftAndResamplealso resample a stream, or delay a real-valued stream
baseband_tasks.base.SetAttributechange start time without phase delay
Methods Summary
task(data)Methods Documentation
- task(data)[source] [edit on github]¶