Qudi
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
confocal_logic.ConfocalLogic Class Reference

This is the Logic class for confocal scanning. More...

Inheritance diagram for confocal_logic.ConfocalLogic:
Inheritance graph
[legend]
Collaboration diagram for confocal_logic.ConfocalLogic:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, config, kwargs)
 
def on_activate (self)
 Initialisation performed during activation of the module.
 
def on_deactivate (self)
 Reverse steps of activation. More...
 
def switch_hardware (self, to_on=False)
 Switches the Hardware off or on. More...
 
def set_clock_frequency (self, clock_frequency)
 Sets the frequency of the clock. More...
 
def start_scanning (self, zscan=False, tag='logic')
 Starts scanning. More...
 
def continue_scanning (self, zscan, tag='logic')
 Continue scanning. More...
 
def stop_scanning (self)
 Stops the scan. More...
 
def initialize_image (self)
 Initalization of the image. More...
 
def start_scanner (self)
 Setting up the scanner device and starts the scanning procedure. More...
 
def continue_scanner (self)
 Continue the scanning procedure. More...
 
def kill_scanner (self)
 Closing the scanner device. More...
 
def set_position (self, tag, x=None, y=None, z=None, a=None)
 Forwarding the desired new position from the GUI to the scanning device. More...
 
def get_position (self)
 Get position from scanning device. More...
 
def get_scanner_axes (self)
 Get axes from scanning device. More...
 
def get_scanner_count_channels (self)
 Get lis of counting channels from scanning device. More...
 
def save_xy_data (self, colorscale_range=None, percentile_range=None)
 Save the current confocal xy data to file. More...
 
def save_depth_data (self, colorscale_range=None, percentile_range=None)
 Save the current confocal depth data to file. More...
 
def draw_figure (self, data, image_extent, scan_axis=None, cbar_range=None, percentile_range=None, crosshair_pos=None)
 Create a 2-D color map figure of the scan image. More...
 
def set_tilt_point1 (self)
 Tilt correction ########################################. More...
 
def set_tilt_point2 (self)
 Gets the second reference point for tilt correction. More...
 
def set_tilt_point3 (self)
 Gets the third reference point for tilt correction. More...
 
def calc_tilt_correction (self)
 Calculates the values for the tilt correction. More...
 
def set_tilt_correction (self, enabled)
 Set tilt correction in tilt interfuse. More...
 
def history_forward (self)
 Move forward in confocal image history.
 
def history_back (self)
 Move backwards in confocal image history.
 

Public Attributes

 threadlock
 
 stopRequested
 
 depth_scan_dir_is_xz
 
 depth_img_is_xz
 
 permanent_scan
 
 x_range
 
 y_range
 
 z_range
 
 history
 
 history_index
 
 depth_image
 
 xy_image
 
 point1
 
 point2
 
 point3
 

Static Public Attributes

 confocalscanner1 = Connector(interface='ConfocalScannerInterface')
 
 savelogic = Connector(interface='SaveLogic')
 
 return_slowness = StatusVar(default=50)
 
 max_history_length = StatusVar(default=10)
 
 signal_start_scanning = QtCore.Signal(str)
 
 signal_continue_scanning = QtCore.Signal(str)
 
 signal_stop_scanning = QtCore.Signal()
 
 signal_scan_lines_next = QtCore.Signal()
 
 signal_xy_image_updated = QtCore.Signal()
 
 signal_depth_image_updated = QtCore.Signal()
 
 signal_change_position = QtCore.Signal(str)
 
 signal_xy_data_saved = QtCore.Signal()
 
 signal_depth_data_saved = QtCore.Signal()
 
 signal_tilt_correction_active = QtCore.Signal(bool)
 
 signal_tilt_correction_update = QtCore.Signal()
 
 signal_draw_figure_completed = QtCore.Signal()
 
 signal_position_changed = QtCore.Signal()
 
 sigImageXYInitialized = QtCore.Signal()
 
 sigImageDepthInitialized = QtCore.Signal()
 
 signal_history_event = QtCore.Signal()
 

Detailed Description

This is the Logic class for confocal scanning.

Member Function Documentation

◆ calc_tilt_correction()

def confocal_logic.ConfocalLogic.calc_tilt_correction (   self)

Calculates the values for the tilt correction.

◆ continue_scanner()

def confocal_logic.ConfocalLogic.continue_scanner (   self)

Continue the scanning procedure.

Returns
int: error code (0:OK, -1:error)

◆ continue_scanning()

def confocal_logic.ConfocalLogic.continue_scanning (   self,
  zscan,
  tag = 'logic' 
)

Continue scanning.

Returns
int: error code (0:OK, -1:error)

◆ draw_figure()

def confocal_logic.ConfocalLogic.draw_figure (   self,
  data,
  image_extent,
  scan_axis = None,
  cbar_range = None,
  percentile_range = None,
  crosshair_pos = None 
)

Create a 2-D color map figure of the scan image.

Parameters

◆ get_position()

def confocal_logic.ConfocalLogic.get_position (   self)

Get position from scanning device.

Returns
list: with three entries x, y and z denoting the current position in meters

◆ get_scanner_axes()

def confocal_logic.ConfocalLogic.get_scanner_axes (   self)

Get axes from scanning device.

Returns
list(str): names of scanner axes

◆ get_scanner_count_channels()

def confocal_logic.ConfocalLogic.get_scanner_count_channels (   self)

Get lis of counting channels from scanning device.

Returns
list(str): names of counter channels

◆ initialize_image()

def confocal_logic.ConfocalLogic.initialize_image (   self)

Initalization of the image.

Returns
int: error code (0:OK, -1:error)

◆ kill_scanner()

def confocal_logic.ConfocalLogic.kill_scanner (   self)

Closing the scanner device.

Returns
int: error code (0:OK, -1:error)

◆ on_deactivate()

def confocal_logic.ConfocalLogic.on_deactivate (   self)

Reverse steps of activation.

Returns
int: error code (0:OK, -1:error)

◆ save_depth_data()

def confocal_logic.ConfocalLogic.save_depth_data (   self,
  colorscale_range = None,
  percentile_range = None 
)

Save the current confocal depth data to file.

Two files are created. The first is the imagedata, which has a text-matrix of count values corresponding to the pixel matrix of the image. Only count-values are saved here.

The second file saves the full raw data with x, y, z, and counts at every pixel.

◆ save_xy_data()

def confocal_logic.ConfocalLogic.save_xy_data (   self,
  colorscale_range = None,
  percentile_range = None 
)

Save the current confocal xy data to file.

Two files are created. The first is the imagedata, which has a text-matrix of count values corresponding to the pixel matrix of the image. Only count-values are saved here.

The second file saves the full raw data with x, y, z, and counts at every pixel.

A figure is also saved.

Parameters

◆ set_clock_frequency()

def confocal_logic.ConfocalLogic.set_clock_frequency (   self,
  clock_frequency 
)

Sets the frequency of the clock.

Parameters
intclock_frequency: desired frequency of the clock
Returns
int: error code (0:OK, -1:error)

◆ set_position()

def confocal_logic.ConfocalLogic.set_position (   self,
  tag,
  x = None,
  y = None,
  z = None,
  a = None 
)

Forwarding the desired new position from the GUI to the scanning device.

Parameters
stringtag: TODO
floatx: if defined, changes to postion in x-direction (microns)
floaty: if defined, changes to postion in y-direction (microns)
floatz: if defined, changes to postion in z-direction (microns)
floata: if defined, changes to postion in a-direction (microns)
Returns
int: error code (0:OK, -1:error)

◆ set_tilt_correction()

def confocal_logic.ConfocalLogic.set_tilt_correction (   self,
  enabled 
)

Set tilt correction in tilt interfuse.

Parameters
boolenabled: whether we want to use tilt correction

◆ set_tilt_point1()

def confocal_logic.ConfocalLogic.set_tilt_point1 (   self)

Tilt correction ########################################.

Gets the first reference point for tilt correction.

◆ set_tilt_point2()

def confocal_logic.ConfocalLogic.set_tilt_point2 (   self)

Gets the second reference point for tilt correction.

◆ set_tilt_point3()

def confocal_logic.ConfocalLogic.set_tilt_point3 (   self)

Gets the third reference point for tilt correction.

◆ start_scanner()

def confocal_logic.ConfocalLogic.start_scanner (   self)

Setting up the scanner device and starts the scanning procedure.

Returns
int: error code (0:OK, -1:error)

◆ start_scanning()

def confocal_logic.ConfocalLogic.start_scanning (   self,
  zscan = False,
  tag = 'logic' 
)

Starts scanning.

Parameters
boolzscan: zscan if true, xyscan if false
Returns
int: error code (0:OK, -1:error)

◆ stop_scanning()

def confocal_logic.ConfocalLogic.stop_scanning (   self)

Stops the scan.

Returns
int: error code (0:OK, -1:error)

◆ switch_hardware()

def confocal_logic.ConfocalLogic.switch_hardware (   self,
  to_on = False 
)

Switches the Hardware off or on.

Parameters
to_onTrue switches on, False switched off
Returns
int: error code (0:OK, -1:error)

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