pyccapt.control.apt package
Submodules
pyccapt.control.apt.apt_exp_control module
- class pyccapt.control.apt.apt_exp_control.APT_Exp_Control(variables, conf, experiment_finished_event, x_plot, y_plot, t_plot, main_v_dc_plot)[source]
Bases:
objectThis class is responsible for controlling the experiment.
- clear_up()[source]
Clear class variables, deinitialize high voltage and pulser, and reset variables.
This method performs the cleanup operations at the end of the experiment. It turns off the high voltage, pulser, and signal generator, resets global variables, and performs other cleanup tasks.
- Parameters:
None
- Returns:
None
- initialize_detector_process()[source]
Initialize the detector process based on the configured settings.
This method initializes the necessary queues and processes for data acquisition based on the configured settings.
- Parameters:
None
- Returns:
None
- main_ex_loop()[source]
Execute main experiment loop.
This method contains all methods that iteratively run to control the experiment. It reads the number of detected ions, calculates the error of the desired rate, and regulates the high voltage and pulser accordingly.
- Parameters:
None
- Returns:
None
- pyccapt.control.apt.apt_exp_control.run_experiment(variables, conf, experiment_finished_event, x_plot, y_plot, t_plot, main_v_dc_plot)[source]
Run the main experiment.
- Parameters:
variables – Global variables
conf – Configuration dictionary
experiment_finished_event – Event to signal the end of the experiment
x_plot – Array to store x data
y_plot – Array to store y data
t_plot – Array to store t data
main_v_dc_plot – Array to store main_v_dc data
- Returns:
None
pyccapt.control.apt.apt_exp_control_func module
- pyccapt.control.apt.apt_exp_control_func.command_v_dc(com_port_v_dc, cmd)[source]
Send commands to the high voltage parameter: v_dc.
This method sends commands to the V_dc source over the COM port and reads the response.
- pyccapt.control.apt.apt_exp_control_func.command_v_p(com_port_v_p, cmd)[source]
Send commands to the pulser.
This method sends commands to the pulser over the COM port and reads the response.
- pyccapt.control.apt.apt_exp_control_func.initialization_signal_generator(variables, log_apt)[source]
Initialize the signal generator.
- Parameters:
signal_generator – The class object of the SignalGenerator class.
variables – The class object of the Variables class.
log_apt – The logger object.
- Returns:
The boolean flag to indicate if the initialization is successful.
- Return type:
initialization_error
- pyccapt.control.apt.apt_exp_control_func.initialization_v_dc(com_port_v_dc, log_apt, variables)[source]
Initialize the high voltage.
- Parameters:
com_port_v_dc – The COM port object for the high voltage.
log_apt – The logger object.
variables – The class object of the Variables class.
- Returns:
The boolean flag to indicate if the initialization is successful.
- Return type:
initialization_error
- pyccapt.control.apt.apt_exp_control_func.initialization_v_p(com_port_v_p, log_apt, variables)[source]
Initialize the pulser.
- Parameters:
com_port_v_p – The COM port object for the pulser.
log_apt – The logger object.
variables – The class object of the Variables class.
- Returns:
The boolean flag to indicate if the initialization is successful.
- Return type:
initialization_error