nqrduck_spectrometer.base_spectrometer_model#

The base class for all spectrometer models.

Classes

BaseSpectrometerModel(*args, **kwargs)

The base class for all spectrometer models.

class nqrduck_spectrometer.base_spectrometer_model.BaseSpectrometerModel(*args: Any, **kwargs: Any)#

The base class for all spectrometer models.

It contains the settings and pulse parameters of the spectrometer.

Parameters:

module (Module) – The module that the spectrometer is connected to

settings#

The settings of the spectrometer

Type:

OrderedDict

pulse_parameter_options#

The pulse parameter options of the spectrometer

Type:

OrderedDict

class PulseParameter(name: str)#

A pulse parameter is a value that can be different for each event in a pulse sequence.

E.g. the transmit pulse power or the phase of the transmit pulse.

Parameters:

name (str) – The name of the pulse parameter

name#

The name of the pulse parameter

Type:

str

options#

The options of the pulse parameter

Type:

OrderedDict

add_option(option: Option) None#

Adds an option to the pulse parameter.

Parameters:

option (Option) – The option to add

get_option_by_name(name: str) Option#

Gets an option by its name.

Parameters:

name (str) – The name of the option

Returns:

The option with the specified name

Return type:

Option

Raises:

ValueError – If no option with the specified name is found

get_options() list#

Gets the options of the pulse parameter.

Returns:

The options of the pulse parameter

Return type:

list

get_pixmap() PyQt6.QtGui.QPixmap#

Gets the pixmap of the pulse parameter.

Implment this method in the derived class.

Returns:

The pixmap of the pulse parameter

Return type:

QPixmap

add_pulse_parameter_option(name: str, pulse_parameter_class: PulseParameter) None#

Adds a pulse parameter option to the spectrometer.

Parameters:
  • name (str) – The name of the pulse parameter

  • pulse_parameter_class (PulseParameter) – The pulse parameter class

add_setting(setting: Setting, category: str) None#

Adds a setting to the spectrometer.

Parameters:
  • setting (Setting) – The setting to add

  • category (str) – The category of the setting

property averages#

The number of averages for the spectrometer.

clear_default_settings() None#

Clear the default settings of the spectrometer.

get_setting_by_name(name: str) Setting#

Gets a setting by its name.

Parameters:

name (str) – The name of the setting

Returns:

The setting with the specified name

Return type:

Setting

Raises:

ValueError – If no setting with the specified name is found

load_default_settings() None#

Load the default settings of the spectrometer.

set_default_settings() None#

Sets the default settings of the spectrometer.

property target_frequency#

The target frequency of the spectrometer in Hz. This is the frequency where the magnetic resonance experiment is performed.