IQConfiguration

Provides methods to configure the IQ measurement.

class nirfmxspecan.iq_configuration.IQConfiguration(signal_obj)[source]

Bases: object

Provides methods to configure the IQ measurement.

configure_acquisition(selector_string, sample_rate, number_of_records, acquisition_time, pretrigger_time)[source]

Configures the acquisition settings for the I/Q measurement.

Parameters:
  • selector_string (string) – Pass an empty string. The signal name that is passed when creating the signal configuration is used.

  • sample_rate (float) – This parameter specifies the acquisition sample rate, in samples per second (S/s). The default value is 50 MS/s.

  • number_of_records (int) – This parameter specifies the number of records to acquire. The default value is 1.

  • acquisition_time (float) – This parameter specifies the acquisition time, in seconds, for the I/Q measurement. The default value is 0.001.

  • pretrigger_time (float) – This parameter specifies the pretrigger time, in seconds, for the I/Q measurement. The default value is 0.

Returns:

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

Return type:

int

configure_bandwidth(selector_string, bandwidth_auto, bandwidth)[source]

Configures the bandwidth for the I/Q measurement.

Parameters:
  • selector_string (string) – Pass an empty string. The signal name that is passed when creating the signal configuration is used.

  • bandwidth_auto (enums.IQBandwidthAuto, int) –

    This parameter specifies whether the measurement computes the minimum acquisition bandwidth. The default value is True.

    Name (Value)

    Description

    False (0)

    The measurement uses the value of the Bandwidth parameter as the minimum acquisition bandwidth.

    True (1)

    The measurement uses 0.8 * sample rate as the minimum signal bandwidth.

  • bandwidth (float) – This parameter specifies the minimum acquisition bandwidth, in Hz, when you set the Bandwidth Auto parameter to False. The default value is 1 MHz.

Returns:

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

Return type:

int

get_acquisition_time(selector_string)[source]

Gets the acquisition time for the I/Q measurement. This value is expressed in seconds.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is 0.001.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Specifies the acquisition time for the I/Q measurement. This value is expressed in seconds.

error_code (int):

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

Return type:

Tuple (attr_val, error_code)

get_bandwidth(selector_string)[source]

Gets the minimum acquisition bandwidth when you set the BANDWIDTH_AUTO attribute to False. This value is expressed in Hz.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is 1 MHz.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Specifies the minimum acquisition bandwidth when you set the BANDWIDTH_AUTO attribute to False. This value is expressed in Hz.

error_code (int):

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

Return type:

Tuple (attr_val, error_code)

get_bandwidth_auto(selector_string)[source]

Gets whether the measurement computes the minimum acquisition bandwidth.

The default value is True.

Name (Value)

Description

False (0)

The measurement uses the value of the IQ Bandwidth attribute as the minimum acquisition bandwidth.

True (1)

The measurement uses 0.8 * sample rate as the minimum signal bandwidth.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (enums.IQBandwidthAuto):

Specifies whether the measurement computes the minimum acquisition bandwidth.

error_code (int):

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

Return type:

Tuple (attr_val, error_code)

get_delete_record_on_fetch(selector_string)[source]

Gets whether the measurement deletes the fetched record.

The default value is True.

Name (Value)

Description

False (0)

The measurement does not delete the fetched record.

True (1)

The measurement deletes the fetched record.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (enums.IQDeleteRecordOnFetch):

Specifies whether the measurement deletes the fetched record.

error_code (int):

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

Return type:

Tuple (attr_val, error_code)

get_measurement_enabled(selector_string)[source]

Gets whether to enable the I/Q measurement.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is FALSE.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (bool):

Specifies whether to enable the I/Q measurement.

error_code (int):

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

Return type:

Tuple (attr_val, error_code)

get_measurement_mode(selector_string)[source]

Gets the mode for performing the IQ measurement.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is Normal.

Name (Value)

Description

Normal (0)

Performs the measurement in the normal RFmx execution mode and supports all the RFmx features such as overlapped measurements.

RawIQ (1)

Reduces the overhead introduced by this measurement by not copying and storing the data in RFmx. In this mode IQ data needs to be retrieved using RFmxInstr Fetch Raw IQ method instead of RFmxSpecAn IQ Fetch Data method. RFmxInstr Fetch Raw IQ directly fetches the data from the hardware.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (enums.IQMeasurementMode):

Specifies the mode for performing the IQ measurement.

error_code (int):

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

Return type:

Tuple (attr_val, error_code)

get_number_of_records(selector_string)[source]

Gets the number of records to acquire.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is 1.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (int):

Specifies the number of records to acquire.

error_code (int):

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

Return type:

Tuple (attr_val, error_code)

get_pretrigger_time(selector_string)[source]

Gets the pretrigger time for the I/Q measurement. This value is expressed in seconds.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is 0.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Specifies the pretrigger time for the I/Q measurement. This value is expressed in seconds.

error_code (int):

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

Return type:

Tuple (attr_val, error_code)

get_sample_rate(selector_string)[source]

Gets the acquisition sample rate. This value is expressed in samples per second (S/s).

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is 50 MS/s.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Specifies the acquisition sample rate. This value is expressed in samples per second (S/s).

error_code (int):

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

Return type:

Tuple (attr_val, error_code)

set_acquisition_time(selector_string, value)[source]

Sets the acquisition time for the I/Q measurement. This value is expressed in seconds.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is 0.001.

Parameters:
  • selector_string (string) – Pass an empty string.

  • value (float) – Specifies the acquisition time for the I/Q measurement. This value is expressed in seconds.

Returns:

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

Return type:

int

set_bandwidth(selector_string, value)[source]

Sets the minimum acquisition bandwidth when you set the BANDWIDTH_AUTO attribute to False. This value is expressed in Hz.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is 1 MHz.

Parameters:
  • selector_string (string) – Pass an empty string.

  • value (float) – Specifies the minimum acquisition bandwidth when you set the BANDWIDTH_AUTO attribute to False. This value is expressed in Hz.

Returns:

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

Return type:

int

set_bandwidth_auto(selector_string, value)[source]

Sets whether the measurement computes the minimum acquisition bandwidth.

The default value is True.

Name (Value)

Description

False (0)

The measurement uses the value of the IQ Bandwidth attribute as the minimum acquisition bandwidth.

True (1)

The measurement uses 0.8 * sample rate as the minimum signal bandwidth.

Parameters:
  • selector_string (string) – Pass an empty string.

  • value (enums.IQBandwidthAuto, int) – Specifies whether the measurement computes the minimum acquisition bandwidth.

Returns:

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

Return type:

int

set_delete_record_on_fetch(selector_string, value)[source]

Sets whether the measurement deletes the fetched record.

The default value is True.

Name (Value)

Description

False (0)

The measurement does not delete the fetched record.

True (1)

The measurement deletes the fetched record.

Parameters:
  • selector_string (string) – Pass an empty string.

  • value (enums.IQDeleteRecordOnFetch, int) – Specifies whether the measurement deletes the fetched record.

Returns:

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

Return type:

int

set_measurement_enabled(selector_string, value)[source]

Sets whether to enable the I/Q measurement.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is FALSE.

Parameters:
  • selector_string (string) – Pass an empty string.

  • value (bool) – Specifies whether to enable the I/Q measurement.

Returns:

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

Return type:

int

set_measurement_mode(selector_string, value)[source]

Sets the mode for performing the IQ measurement.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is Normal.

Name (Value)

Description

Normal (0)

Performs the measurement in the normal RFmx execution mode and supports all the RFmx features such as overlapped measurements.

RawIQ (1)

Reduces the overhead introduced by this measurement by not copying and storing the data in RFmx. In this mode IQ data needs to be retrieved using RFmxInstr Fetch Raw IQ method instead of RFmxSpecAn IQ Fetch Data method. RFmxInstr Fetch Raw IQ directly fetches the data from the hardware.

Parameters:
  • selector_string (string) – Pass an empty string.

  • value (enums.IQMeasurementMode, int) – Specifies the mode for performing the IQ measurement.

Returns:

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

Return type:

int

set_number_of_records(selector_string, value)[source]

Sets the number of records to acquire.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is 1.

Parameters:
  • selector_string (string) – Pass an empty string.

  • value (int) – Specifies the number of records to acquire.

Returns:

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

Return type:

int

set_pretrigger_time(selector_string, value)[source]

Sets the pretrigger time for the I/Q measurement. This value is expressed in seconds.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is 0.

Parameters:
  • selector_string (string) – Pass an empty string.

  • value (float) – Specifies the pretrigger time for the I/Q measurement. This value is expressed in seconds.

Returns:

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

Return type:

int

set_sample_rate(selector_string, value)[source]

Sets the acquisition sample rate. This value is expressed in samples per second (S/s).

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is 50 MS/s.

Parameters:
  • selector_string (string) – Pass an empty string.

  • value (float) – Specifies the acquisition sample rate. This value is expressed in samples per second (S/s).

Returns:

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

Return type:

int