nqrduck_spectrometer_simulator.controller#
The controller module for the simulator spectrometer.
Classes
|
The controller class for the nqrduck simulator module. |
- class nqrduck_spectrometer_simulator.controller.SimulatorController(*args: Any, **kwargs: Any)#
The controller class for the nqrduck simulator module.
- calculate_dwelltime() float#
This method calculates the dwell time based on the settings and the pulse sequence.
- Returns:
The dwell time in seconds.
- Return type:
float
- calculate_simulation_length() float#
This method calculates the simulation length based on the settings and the pulse sequence.
- Returns:
The simulation length in seconds.
- Return type:
float
- get_sample_from_settings() Sample#
This method creates a sample object based on the settings in the model.
- Returns:
The sample object created from the settings.
- Return type:
- get_simulation(sample: Sample, pulse_array: PulseArray) Simulation#
This method creates a simulation object based on the settings and the pulse sequence.
- Parameters:
sample (Sample) โ The sample object created from the settings.
pulse_array (PulseArray) โ The pulse sequence translated to a PulseArray object.
- Returns:
The simulation object created from the settings and the pulse sequence.
- Return type:
- set_averages(value: str) None#
This method is called when the set_averages signal is received from the core.
It sets the averages in the model used for the simulation.
- Parameters:
value (str) โ The value to set the averages to.
- set_frequency(value: str) None#
This method is called when the set_frequency signal is received from the core.
For the simulator this just prints a warning that the simulator is selected.
- Parameters:
value (str) โ The new frequency in MHz.
- start_measurement()#
This method is called when the start_measurement signal is received from the core.
It will becalled if the simulator is the active spectrometer. This will start the simulation based on the settings and the pulse sequence.
- translate_pulse_sequence(dwell_time: float) PulseArray#
This method translates the pulse sequence from the core to a PulseArray object needed for the simulation.
- Parameters:
dwell_time (float) โ The dwell time in seconds.
- Returns:
The pulse sequence translated to a PulseArray object.
- Return type:
- translate_rx_event() tuple#
This method translates the RX event of the pulse sequence to the limr object.
Returns: tuple: A tuple containing the start and stop time of the RX event in ยตs