SampleAutocorr

class SampleAutocorr : public kotekan::Stage

Kotekan stage to accumulate the modulus-squared of a complex sample stream into a power spectrum, served on demand via REST.

Consumes complex float pairs from a single input buffer. When a client POSTs to the stage’s /spectrum endpoint with an integration_length value, the stage integrates that many sample-frames worth of |x|^2, then returns the resulting power spectrum as JSON. The stage has no output buffer.

Buffers

  • in_buf Input kotekan buffer, to be consumed from.

    • Format: Array of complex float (interleaved float pairs)

    • Metadata: none

REST endpoints

  • POST <unique_name>/spectrum with {"integration_length": N} returns {"stokes_i": […]} once integration completes.

Author

Keith Vanderlinde

Param spectrum_length:

Int (default 1024). Number of samples in the spectrum.

Param integration_length:

Int (default 1024). Default number of time samples to sum.

Public Functions

SampleAutocorr(kotekan::Config &config, const std::string &unique_name, kotekan::bufferContainer &buffer_container)
~SampleAutocorr() override
virtual void main_thread() override
void rest_callback(kotekan::connectionInstance &conn, nlohmann::json &json_request)