fetch_iq()#

InstroSDR.fetch_iq(
n_samples: int = 1024,
*,
publish_spectrum: bool = False,
**kwargs: Any,
) → Measurement | None[source]#

Return the next contiguous block from the running stream and publish it.

Publishes the block as paired .i and .q channels for every channel the stream covers, plus backlog and overflow stream-health channels.

Parameters:
  • n_samples (int) – Samples per channel.

  • publish_spectrum (bool) – Also publish spectrum features computed from this block, without consuming another.

  • **kwargs – Tags added to the published value, on top of the instrument’s default tags.

Returns:

Measurement | None – The published block, or None if the fetch returned no samples.

Raises:

ValueError – If n_samples is not positive.