nqrduck_spectrometer.pulseparameters#

Contains the classes for the pulse parameters of the spectrometer. It includes the functions and the options for the pulse parameters.

Classes

BooleanOption(name, value)

Defines a boolean option for a pulse parameter option.

FunctionOption(name, functions)

Defines a selection option for a pulse parameter option.

Gate(name)

Basic PulseParameter for the Gate.

NumericOption(name, value[, is_float, ...])

Defines a numeric option for a pulse parameter option.

Option(name, value)

Defines options for the pulse parameters which can then be set accordingly.

RXReadout(name)

Basic PulseParameter for the RX Readout.

TXCustomFunction()

TX Custom function.

TXGaussianFunction()

TX Gaussian function.

TXPulse(name)

Basic TX Pulse Parameter.

TXRectFunction()

TX Rectangular function.

TXSincFunction()

TX Sinc function.

class nqrduck_spectrometer.pulseparameters.BooleanOption(name: str, value)#

Defines a boolean option for a pulse parameter option.

set_value(value)#

Sets the value of the option.

class nqrduck_spectrometer.pulseparameters.FunctionOption(name, functions)#

Defines a selection option for a pulse parameter option.

It takes different function objects.

Parameters:
  • name (str) – The name of the option.

  • functions (list) – The functions that can be selected.

name#

The name of the option.

Type:

str

functions#

The functions that can be selected.

Type:

list

classmethod from_json(data)#

Creates a FunctionOption from a json representation.

Parameters:

data (dict) – The json representation of the FunctionOption.

Returns:

The FunctionOption.

Return type:

FunctionOption

get_function_by_name(name)#

Returns the function with the given name.

Parameters:

name (str) – The name of the function.

Returns:

The function with the given name.

Return type:

Function

get_pixmap()#

Returns the pixmap of the function.

set_value(value)#

Sets the value of the option.

Parameters:

value – The value of the option.

to_json()#

Returns a json representation of the option.

Returns:

The json representation of the option.

Return type:

dict

class nqrduck_spectrometer.pulseparameters.Gate(name)#

Basic PulseParameter for the Gate. It includes an option for the Gate state.

Parameters:

name (str) – The name of the pulse parameter.

GATE_STATE#

The Gate state.

Type:

str

get_pixmap()#

Returns the pixmap of the Gate PulseParameter.

Returns:

The pixmap of the Gate PulseParameter depending on the Gate state.

Return type:

QPixmap

class nqrduck_spectrometer.pulseparameters.NumericOption(name: str, value, is_float=True, min_value=None, max_value=None)#

Defines a numeric option for a pulse parameter option.

classmethod from_json(data)#

Creates a NumericOption from a json representation.

Parameters:

data (dict) – The json representation of the NumericOption.

Returns:

The NumericOption.

Return type:

NumericOption

set_value(value)#

Sets the value of the option.

to_json()#

Returns a json representation of the option.

Returns:

The json representation of the option.

Return type:

dict

class nqrduck_spectrometer.pulseparameters.Option(name: str, value)#

Defines options for the pulse parameters which can then be set accordingly.

Options can be of different types, for example boolean, numeric or function.

Parameters:
  • name (str) – The name of the option.

  • value – The value of the option.

name#

The name of the option.

Type:

str

value#

The value of the option.

classmethod from_json(data) Option#

Creates an option from a json representation.

Parameters:

data (dict) – The json representation of the option.

Returns:

The option.

Return type:

Option

set_value()#

Sets the value of the option.

This method has to be implemented in the derived classes.

to_json()#

Returns a json representation of the option.

Returns:

The json representation of the option.

Return type:

dict

class nqrduck_spectrometer.pulseparameters.RXReadout(name)#

Basic PulseParameter for the RX Readout. It includes an option for the RX Readout state.

Parameters:

name (str) – The name of the pulse parameter.

RX#

The RX Readout state.

Type:

str

get_pixmap()#

Returns the pixmap of the RX Readout PulseParameter.

Returns:

The pixmap of the RX Readout PulseParameter depending on the RX Readout state.

Return type:

QPixmap

class nqrduck_spectrometer.pulseparameters.TXCustomFunction#

TX Custom function.

Adds the pixmap of the function to the class.

get_pixmap()#

Returns the pixmaps of the function.

class nqrduck_spectrometer.pulseparameters.TXGaussianFunction#

TX Gaussian function.

Adds the pixmap of the function to the class.

get_pixmap()#

Returns the pixmaps of the function.

class nqrduck_spectrometer.pulseparameters.TXPulse(name: str)#

Basic TX Pulse Parameter. It includes options for the relative amplitude, the phase and the pulse shape.

Parameters:

name (str) – The name of the pulse parameter.

get_pixmap()#

Returns the pixmap of the TX Pulse Parameter.

Returns:

The pixmap of the TX Pulse Parameter depending on the relative amplitude.

Return type:

QPixmap

class nqrduck_spectrometer.pulseparameters.TXRectFunction#

TX Rectangular function.

Adds the pixmap of the function to the class.

get_pixmap()#

Returns the pixmaps of the function.

class nqrduck_spectrometer.pulseparameters.TXSincFunction#

TX Sinc function.

Adds the pixmap of the function to the class.

get_pixmap()#

Returns the pixmaps of the function.