AirspyAlign¶
-
class AirspyAlign : public kotekan::Stage¶
Kotekan stage to measure the time-lag between two real input streams.
Consumes raw
shortsamples from two airspy producers. On REST request the stage captureslag_windowsamples from each input, then in the callback performs zero-padded FFT cross-correlation to estimate the integer sample lag between A and B. The lag, and optionally the full correlation magnitudes, are returned as JSON.- Buffers
in_bufAInput kotekan buffer A.Format: Array of
shortMetadata:
none
in_bufBInput kotekan buffer B.Format: Array of
shortMetadata:
none
- REST endpoints
GET
<unique_name>/cal_lag — returns{"lag": int}GET
<unique_name>/get_correlation — returns{"lag": int, “corr_pos”: […], “corr_neg”: […]}
- Author
Keith Vanderlinde
- Param lag_window:
UInt (default: input frame size in samples). Number of samples to capture.
Public Functions
-
AirspyAlign(kotekan::Config &config, const std::string &unique_name, kotekan::bufferContainer &buffer_container)¶
-
~AirspyAlign() override¶
-
virtual void main_thread() override¶
-
void cal_lag_callback(kotekan::connectionInstance &conn)¶
-
void get_correlation_callback(kotekan::connectionInstance &conn)¶