nqrduck_broadband.model#

This module contains the BroadbandModel class which is the model for the Broadband module.

Classes

BroadbandModel(*args, **kwargs)

Model class for the Broadband module.

class nqrduck_broadband.model.BroadbandModel(*args: Any, **kwargs: Any)#

Model class for the Broadband module.

FILE_EXTENSION#

The file extension for the broadband module.

Type:

str

MIN_FREQUENCY#

The minimum frequency for the broadband module.

Type:

float

MAX_FREQUENCY#

The maximum frequency for the broadband module.

Type:

float

DEFAULT_FREQUENCY_STEP#

The default frequency step for the broadband module.

Type:

float

Signals:

start_frequency_changed: Signal that the start frequency has changed. stop_frequency_changed: Signal that the stop frequency has changed. frequency_step_changed: Signal that the frequency step has changed. LUT_changed: Signal that the LUT has changed.

class BroadbandMeasurement(*args: Any, **kwargs: Any)#

This class represents a single broadband measurement.

Signals:

received_measurement: Signal that a measurement has been received.

add_measurement(measurement: Measurement) None#

This method adds a single measurement to the broadband measurement.

Args: measurement (Measurement): The measurement object.

add_tune_and_match(magnitude) None#

This method adds the tune and match values to the last completed measurement.

Args: magnitude (float): The magnitude of the tune and match values.

assemble_broadband_spectrum() None#

This method assembles the broadband spectrum from the single frequency measurement data in frequency domain.

property broadband_data_fdx#

This property contains the broadband data and is assembled by the different single_frequency measurements in frequency domain.

property broadband_data_fdy#

This property contains the broadband data and is assembled by the different single_frequency measurements in frequency domain.

find_nearest(array: array, value: float) int#

This method finds the nearest value in an array to a given value.

Parameters:
  • array (np.array) – The array to search in.

  • value (float) – The value to search for.

Returns:

The index of the nearest value in the array.

Return type:

int

classmethod from_json(json: dict)#

Converts the json format to a broadband measurement.

Parameters:

json (dict) – The json format of the broadband measurement.

Returns:

The broadband measurement object.

Return type:

BroadbandMeasurement

get_finished_percentage() float#

Get the percentage of measurements that have been finished.

Returns:

The percentage of measurements that have been finished.

Return type:

float

get_last_completed_measurement() Measurement#

This method returns the last completed measurement.

Returns:

The last completed measurement.

Return type:

Measurement

get_next_measurement_frequency() float#

This method returns the next frequency that has to be measured.

Returns:

The next frequency that has to be measured.

Return type:

float

is_complete() bool#

This method checks if all frequencies have been measured.

Returns:

True if all frequencies have been measured, False otherwise.

Return type:

bool

property single_frequency_measurements: dict#

This property contains the dict of all frequencies that have to be measured.

to_json()#

Converts the broadband measurement to a json-compatible format.

Returns:

The json-compatible format of the broadband measurement.

Return type:

dict

property LUT#

The LUT for the broadband measurement.

property current_broadband_measurement#

The current broadband measurement.

property frequency_step#

The frequency step for the broadband measurement.

frequency_step_changed#

alias of float

property start_frequency#

The start frequency for the broadband measurement.

start_frequency_changed#

alias of float

property stop_frequency#

The stop frequency for the broadband measurement.

stop_frequency_changed#

alias of float