measure_iq()#

InstroSDR.measure_iq(
n_samples: int = 1024,
*,
channels: Sequence[str] | None = None,
**kwargs: Any,
) → Measurement | None[source]#

Acquire one time-aligned IQ block and publish it as paired .i and .q channels.

While a receive stream runs, the block is taken from that stream rather than the device, so it stays contiguous with the surrounding fetches and also publishes backlog and overflow.

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

  • channels (Sequence[str] | None) – Receive channels to read. None means every channel the running stream covers, or ("0",) with no stream running.

  • **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 read returned no samples.

Raises:

ValueError – If n_samples is not positive.