Qudi
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
magnet_gui.MagnetGui Class Reference

Main GUI for the magnet. More...

Inheritance diagram for magnet_gui.MagnetGui:
Inheritance graph
[legend]
Collaboration diagram for magnet_gui.MagnetGui:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, config, kwargs)
 
def on_activate (self)
 Definition and initialisation of the GUI.
 
def trig_wrapper_normal_mode (self)
 
def trig_wrapper_z_mode (self)
 
def on_deactivate (self)
 Deactivate the module properly.
 
def show (self)
 Make window visible and put it above all other windows. More...
 
def set_default_view_main_window (self)
 Establish the default dock Widget configuration. More...
 
def open_magnet_settings (self)
 This method opens the settings menu. More...
 
def update_magnet_settings (self)
 Apply the set configuration in the Settings Window. More...
 
def keep_former_magnet_settings (self)
 
def move_rel (self, axis_label, direction)
 Move relative by the axis with given label an direction. More...
 
def move_abs (self, param_dict=None)
 Perform an absolute movement. More...
 
def get_ref_curr_pos_ScienDSpinBox (self, label)
 Get the reference to the double spin box for the passed label. More...
 
def get_ref_move_rel_ScienDSpinBox (self, label)
 Get the reference to the double spin box for the passed label. More...
 
def get_ref_move_abs_ScienDSpinBox (self, label)
 Get the reference to the double spin box for the passed label. More...
 
def get_ref_move_abs_Slider (self, label)
 Get the reference to the slider for the passed label. More...
 
def move_rel_para_changed (self)
 Pass the current GUI value to the logic. More...
 
def align_2d_axis0_name_changed (self)
 Pass the current GUI value to the logic. More...
 
def align_2d_axis0_range_changed (self)
 Pass the current GUI value to the logic. More...
 
def align_2d_axis0_step_changed (self)
 Pass the current GUI value to the logic. More...
 
def align_2d_axis0_vel_changed (self)
 Pass the current GUI value to the logic. More...
 
def align_2d_axis1_name_changed (self)
 Pass the current GUI value to the logic. More...
 
def align_2d_axis1_range_changed (self)
 Pass the current GUI value to the logic. More...
 
def align_2d_axis1_step_changed (self)
 Pass the current GUI value to the logic. More...
 
def align_2d_axis1_vel_changed (self)
 Pass the current GUI value to the logic. More...
 
def optimize_pos_freq_changed (self)
 Pass the current GUI value to the logic. More...
 
def fluorescence_integration_time_changed (self)
 Pass the current GUI value to the logic. More...
 
def stop_movement (self)
 Invokes an immediate stop of the hardware. More...
 
def update_pos (self, param_list=None)
 Update the current position. More...
 
def run_stop_2d_alignment (self, is_checked)
 Manage what happens if 2d magnet scan is started/stopped. More...
 
def start_2d_alignment_clicked (self)
 Start the 2d alignment. More...
 
def continue_stop_2d_alignment (self, is_checked)
 Manage what happens if 2d magnet scan is continued/stopped. More...
 
def continue_2d_alignment_clicked (self)
 
def abort_2d_alignment_clicked (self)
 Stops the current Fluorescence alignment. More...
 
def save_2d_plots_and_data (self)
 Save the sum plot, the scan marix plot and the scan data.
 
def set_measurement_type (self)
 According to the selected Radiobox a measurement type will be chosen. More...
 
def update_from_roi_magnet (self, roi)
 The user manually moved the XY ROI, adjust all other GUI elements accordingly. More...
 
def update_roi_from_abs_movement (self)
 User changed magnetic field through absolute movement, therefore the roi has to be adjusted. More...
 
def update_move_rel_para (self, dict)
 The GUT is updated taking dict into account. More...
 
def update_roi_from_range (self)
 User changed scan range and therefore the rectangular should be adjusted. More...
 
def update_align_2d_axis0_name (self, axisname)
 The GUT is updated taking axisname into account. More...
 
def update_align_2d_axis0_range (self, range)
 The GUT is updated taking range into account. More...
 
def update_align_2d_axis0_step (self, step)
 The GUT is updated taking step into account. More...
 
def update_align_2d_axis0_vel (self, vel)
 The GUT is updated taking vel into account. More...
 
def update_align_2d_axis1_name (self, axisname)
 The GUT is updated taking axisname into account. More...
 
def update_align_2d_axis1_range (self, range)
 The GUT is updated taking range into account. More...
 
def update_align_2d_axis1_step (self, step)
 The GUT is updated taking step into account. More...
 
def update_align_2d_axis1_vel (self, vel)
 The GUT is updated taking vel into account. More...
 
def update_optimize_pos_freq (self, freq)
 The GUT is updated taking freq into account. More...
 
def update_fluorescence_integration_time (self, time)
 The GUT is updated taking time into account. More...
 

Public Attributes

 roi_magnet
 
 hline_magnet
 
 vline_magnet
 
 measurement_type
 

Static Public Attributes

 magnetlogic1 = Connector(interface='MagnetLogic')
 declare connectors
 
 savelogic = Connector(interface='SaveLogic')
 

Detailed Description

Main GUI for the magnet.

Member Function Documentation

◆ abort_2d_alignment_clicked()

def magnet_gui.MagnetGui.abort_2d_alignment_clicked (   self)

Stops the current Fluorescence alignment.

◆ align_2d_axis0_name_changed()

def magnet_gui.MagnetGui.align_2d_axis0_name_changed (   self)

Pass the current GUI value to the logic.

Returns
str: Passed axis name

◆ align_2d_axis0_range_changed()

def magnet_gui.MagnetGui.align_2d_axis0_range_changed (   self)

Pass the current GUI value to the logic.

Returns
float: Passed range

◆ align_2d_axis0_step_changed()

def magnet_gui.MagnetGui.align_2d_axis0_step_changed (   self)

Pass the current GUI value to the logic.

Returns
float: Passed step

◆ align_2d_axis0_vel_changed()

def magnet_gui.MagnetGui.align_2d_axis0_vel_changed (   self)

Pass the current GUI value to the logic.

Returns
float: Passed velocity

◆ align_2d_axis1_name_changed()

def magnet_gui.MagnetGui.align_2d_axis1_name_changed (   self)

Pass the current GUI value to the logic.

Returns
str: Passed axis name

◆ align_2d_axis1_range_changed()

def magnet_gui.MagnetGui.align_2d_axis1_range_changed (   self)

Pass the current GUI value to the logic.

Returns
float: Passed range

◆ align_2d_axis1_step_changed()

def magnet_gui.MagnetGui.align_2d_axis1_step_changed (   self)

Pass the current GUI value to the logic.

Returns
float: Passed step size

◆ align_2d_axis1_vel_changed()

def magnet_gui.MagnetGui.align_2d_axis1_vel_changed (   self)

Pass the current GUI value to the logic.

Returns
float: Passed velocity

◆ continue_stop_2d_alignment()

def magnet_gui.MagnetGui.continue_stop_2d_alignment (   self,
  is_checked 
)

Manage what happens if 2d magnet scan is continued/stopped.

Parameters
boolis_checked: state if the current scan, True = continue, False = stopped

◆ fluorescence_integration_time_changed()

def magnet_gui.MagnetGui.fluorescence_integration_time_changed (   self)

Pass the current GUI value to the logic.

Returns
float: Passed integration time

◆ get_ref_curr_pos_ScienDSpinBox()

def magnet_gui.MagnetGui.get_ref_curr_pos_ScienDSpinBox (   self,
  label 
)

Get the reference to the double spin box for the passed label.

◆ get_ref_move_abs_ScienDSpinBox()

def magnet_gui.MagnetGui.get_ref_move_abs_ScienDSpinBox (   self,
  label 
)

Get the reference to the double spin box for the passed label.

◆ get_ref_move_abs_Slider()

def magnet_gui.MagnetGui.get_ref_move_abs_Slider (   self,
  label 
)

Get the reference to the slider for the passed label.

◆ get_ref_move_rel_ScienDSpinBox()

def magnet_gui.MagnetGui.get_ref_move_rel_ScienDSpinBox (   self,
  label 
)

Get the reference to the double spin box for the passed label.

◆ move_abs()

def magnet_gui.MagnetGui.move_abs (   self,
  param_dict = None 
)

Perform an absolute movement.

Parameters
param_dictwith {<axis_label>:<position>}, can of course contain many entries of the same kind.

Basically all the axis can be controlled at the same time.

◆ move_rel()

def magnet_gui.MagnetGui.move_rel (   self,
  axis_label,
  direction 
)

Move relative by the axis with given label an direction.

Parameters
straxis_label: tells which axis should move.
intdirection: either 1 or -1 depending on the relative movement.

That method get called from methods, which are created on the fly at runtime during the activation of that module (basically from the methods with the generic name move_rel_axis_{0}_p or move_rel_axis_{0}_m with the appropriate label).

◆ move_rel_para_changed()

def magnet_gui.MagnetGui.move_rel_para_changed (   self)

Pass the current GUI value to the logic.

Returns
dict: Passed move relative parameter

◆ open_magnet_settings()

def magnet_gui.MagnetGui.open_magnet_settings (   self)

This method opens the settings menu.

◆ optimize_pos_freq_changed()

def magnet_gui.MagnetGui.optimize_pos_freq_changed (   self)

Pass the current GUI value to the logic.

Returns
float: Passed frequency

◆ run_stop_2d_alignment()

def magnet_gui.MagnetGui.run_stop_2d_alignment (   self,
  is_checked 
)

Manage what happens if 2d magnet scan is started/stopped.

Parameters
boolis_checked: state if the current scan, True = started, False = stopped

◆ set_default_view_main_window()

def magnet_gui.MagnetGui.set_default_view_main_window (   self)

Establish the default dock Widget configuration.

◆ set_measurement_type()

def magnet_gui.MagnetGui.set_measurement_type (   self)

According to the selected Radiobox a measurement type will be chosen.

◆ show()

def magnet_gui.MagnetGui.show (   self)

Make window visible and put it above all other windows.

◆ start_2d_alignment_clicked()

def magnet_gui.MagnetGui.start_2d_alignment_clicked (   self)

Start the 2d alignment.

◆ stop_movement()

def magnet_gui.MagnetGui.stop_movement (   self)

Invokes an immediate stop of the hardware.

MAKE SURE THAT THE HARDWARE CAN BE CALLED DURING AN ACTION! If the parameter _interactive_mode is set to False no stop can be done since the device would anyway not respond to a method call.

◆ update_align_2d_axis0_name()

def magnet_gui.MagnetGui.update_align_2d_axis0_name (   self,
  axisname 
)

The GUT is updated taking axisname into account.

Thereby no signal is triggered!

   @params str: Axis name to update

   @return str: Axis name to update

◆ update_align_2d_axis0_range()

def magnet_gui.MagnetGui.update_align_2d_axis0_range (   self,
  range 
)

The GUT is updated taking range into account.

Thereby no signal is triggered!

   @params float: Range to update

   @return float: Range to update

◆ update_align_2d_axis0_step()

def magnet_gui.MagnetGui.update_align_2d_axis0_step (   self,
  step 
)

The GUT is updated taking step into account.

Thereby no signal is triggered!

   @params float: Step to update in m

   @return float: Step to update in m

◆ update_align_2d_axis0_vel()

def magnet_gui.MagnetGui.update_align_2d_axis0_vel (   self,
  vel 
)

The GUT is updated taking vel into account.

Thereby no signal is triggered!

   @params float: Velocity to update

   @return float: Velocity to update

◆ update_align_2d_axis1_name()

def magnet_gui.MagnetGui.update_align_2d_axis1_name (   self,
  axisname 
)

The GUT is updated taking axisname into account.

Thereby no signal is triggered!

   @params str: Axis name to update

   @return str: Axis name to update

◆ update_align_2d_axis1_range()

def magnet_gui.MagnetGui.update_align_2d_axis1_range (   self,
  range 
)

The GUT is updated taking range into account.

Thereby no signal is triggered!

   @params float: Range to update

   @return float: Range to update

◆ update_align_2d_axis1_step()

def magnet_gui.MagnetGui.update_align_2d_axis1_step (   self,
  step 
)

The GUT is updated taking step into account.

Thereby no signal is triggered!

   @params float: Step to update in m

   @return float: Step to update in m

◆ update_align_2d_axis1_vel()

def magnet_gui.MagnetGui.update_align_2d_axis1_vel (   self,
  vel 
)

The GUT is updated taking vel into account.

Thereby no signal is triggered!

   @params float: Velocity to update

   @return float: Velocity to update

◆ update_fluorescence_integration_time()

def magnet_gui.MagnetGui.update_fluorescence_integration_time (   self,
  time 
)

The GUT is updated taking time into account.

Thereby no signal is triggered!

   @params float: Integration time to update

   @return float: Integration time to update

◆ update_from_roi_magnet()

def magnet_gui.MagnetGui.update_from_roi_magnet (   self,
  roi 
)

The user manually moved the XY ROI, adjust all other GUI elements accordingly.

object roi: PyQtGraph ROI object

◆ update_magnet_settings()

def magnet_gui.MagnetGui.update_magnet_settings (   self)

Apply the set configuration in the Settings Window.

◆ update_move_rel_para()

def magnet_gui.MagnetGui.update_move_rel_para (   self,
  dict 
)

The GUT is updated taking dict into account.

Thereby no signal is triggered!

   @params dictionary: Dictionary containing the values to update

   @return dictionary: Dictionary containing the values to update

◆ update_optimize_pos_freq()

def magnet_gui.MagnetGui.update_optimize_pos_freq (   self,
  freq 
)

The GUT is updated taking freq into account.

Thereby no signal is triggered!

   @params float: Frequency to update

   @return float: Frequency to update

◆ update_pos()

def magnet_gui.MagnetGui.update_pos (   self,
  param_list = None 
)

Update the current position.

Parameters
listparam_list: optional, if specific positions needed to be updated.

If no value is passed, the current position is retrieved from the logic and the display is changed.

◆ update_roi_from_abs_movement()

def magnet_gui.MagnetGui.update_roi_from_abs_movement (   self)

User changed magnetic field through absolute movement, therefore the roi has to be adjusted.

Returns
:

◆ update_roi_from_range()

def magnet_gui.MagnetGui.update_roi_from_range (   self)

User changed scan range and therefore the rectangular should be adjusted.

Returns
:

The documentation for this class was generated from the following file: