IQResults

Provides methods to fetch and read the IQ measurement results.

class nirfmxspecan.iq_results.IQResults(signal_obj)[source]

Bases: object

Provides methods to fetch and read the IQ measurement results.

fetch_data(selector_string, timeout, record_to_fetch, samples_to_read, data)[source]

Fetches I/Q data from a single record in an acquisition.

Parameters:
  • selector_string (string) –

    This parameter specifies a Selector String comprising of result name.

    Example:

    ”result::r1”

    You can use the build_result_string() method to build the selector string.

  • timeout (float) – This parameter specifies the timeout, in seconds, for fetching the specified measurement. Set this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the method waits until the measurement is complete. The default value is 10.

  • record_to_fetch (int) – This parameter specifies the record to retrieve. Record numbers are zero-based. The default value is 0.

  • samples_to_read (int) – This parameter specifies the number of samples to fetch. A value of -1 specifies that RFmx fetches all samples. The default value is -1.

  • data (numpy.complex64) – This parameter returns the complex-value time domain data array. The real and imaginary parts of this complex data array correspond to the in-phase (I) and quadrature-phase (Q) data, respectively. To calculate the instantaneous power of a sampled I/Q point, use the equation (I 2+ Q 2) / 2*R*, where R is the input impedance in ohms. For RFmx, R = 50 ohms.

Returns:

t0 (float):

This parameter returns the start time of the first sample. The timestamp corresponds to the difference, in seconds, between the first sample returned and the Reference Trigger location.

dt (float):

This parameter returns the time interval between data points in the acquired signal. The I/Q data sample rate is the reciprocal of this value.

error_code (int):

Returns the status code of this method. The status code either indicates success or describes a warning condition.

Return type:

Tuple (t0, dt, error_code)

get_records_done(selector_string)[source]

Fetches the number of records that RFmx has acquired.

Parameters:

selector_string (string) –

This parameter specifies a Selector String comprising of result name.

Example:

”result::r1”

You can use the build_result_string() method to build the selector string.

Returns:

records_done (int):

This parameter returns the number of records that RFmx has acquired.

error_code (int):

Returns the status code of this method. The status code either indicates success or describes a warning condition.

Return type:

Tuple (records_done, error_code)