Skip to content
Mattia D. edited this page Oct 2, 2024 · 5 revisions

brighteyes_mcs

brighteyes_mcs.gui.main_window

main_window.py: BrightEyes-MCS - MainWindow.

PluginSignals Objects

class PluginSignals(QObject)

Class for defining custom signals for the plugins

MainWindow Objects

class MainWindow(QMainWindow)

Main window class for the BrightEyes-MCS application.

Attributes:

  • http_server_thread FastAPIServerThread - Thread for the HTTP server.
  • guiReadyFlag bool - Flag indicating if the GUI is ready.
  • init_ready bool - Flag indicating if the initialization is ready.
  • splash QSplashScreen - Splash screen for the application.

httpServerCheckBoxChanged

@Slot()
def httpServerCheckBoxChanged()

Slot for the HTTP server checkbox changed event

httpApiServer_start

def httpApiServer_start()

Starts the FastAPI HTTP server

httpApiServer_stop

def httpApiServer_stop()

Stops the FastAPI HTTP server

configuration_helper_init

def configuration_helper_init()

Return a dictionary with the configuration helper for the GUI elements They are used both for configuration saving and loading, and macros.

setupAnalogOutputGUI

def setupAnalogOutputGUI()

Build the Analog Output GUI menu

analogOutChanged

@Slot()
def analogOutChanged()

Slot for the Analog Output changed event

laserChanged

@Slot()
def laserChanged()

Slot for the Laser changed event

table_keyPressEvent

@Slot()
def table_keyPressEvent(event)

Slot for the table key pressed

traceReset

@Slot()
def traceReset()

Slot for the trace reset event It resets the time trace

FCSReset

@Slot()
def FCSReset()

Slot for the FCS reset event.

table_markers_keyPressEvent

@Slot()
def table_markers_keyPressEvent(event)

Slot for the table of the markers when a key pressed It handles the delete key

traceClicked

@Slot()
def traceClicked(event)

Slot for the time trace clicked event

cmd_path_ttm

@Slot()
def cmd_path_ttm()

Slot for the TTM path command

cmd_path_destinationfolder

@Slot()
def cmd_path_destinationfolder()

Slot for the data destination folder command

numberChannelsChanged

@Slot()
def numberChannelsChanged()

Slot for the number of channels changed event

cmd_filename

@Slot()
def cmd_filename()

Slot for selecting the filename

cmd_moveToSelectedRowMarker

@Slot()
def cmd_moveToSelectedRowMarker()

Slot for moving to the selected row marker

moveToSelectedColumnFCS

def moveToSelectedColumnFCS(k)

Set the GUI configuration to the selected column in the Macro/FCS table

cmd_moveToSelectedColumnFCS

@Slot()
def cmd_moveToSelectedColumnFCS(k=None)

Set the GUI configuration to the current column in the Macro/FCS table

prova

@Slot()
def prova(ev)

dummy button

getTabWinMinimization

@Slot()
def getTabWinMinimization(widget, event)

Slot for the tab window minimization event

tabDoubleClick

@Slot()
def tabDoubleClick(number)

Slot for the tab double click event: it moves the tab to a new window

guiReadyEvent

def guiReadyEvent()

Slot for the GUI ready event, normally called when the GUI is ready to be used

showEvent

@Slot()
def showEvent(event)

Overridden showEvent method for generating the GUI ready event

ask_to_save_cfg_as_permanent

def ask_to_save_cfg_as_permanent(file_cfg_nicer)

Message box to ask if the configuration file should be saved as permanent

bit_file_clicked

@Slot()
def bit_file_clicked()

Slot for the selecting the bitfile of the 1st FPGA

bit_file_clicked2

@Slot()
def bit_file_clicked2()

Slot for the selecting the bitfile of the 2nd FPGA

checkDefaultCfg

def checkDefaultCfg(default_name="cfg/current_system")

Check if the default configuration file exists

setNewDefaultCfg

def setNewDefaultCfg(default_cfg, default_name="cfg/current_system")

Set a new default configuration file

getGUI_data

def getGUI_data()

Get the GUI data and return it as a dictionary

setGUI_data

def setGUI_data(configuration={})

Set the GUI data from a dictionary (it can be also a partial configuration)

delete_list_file

@Slot()
def delete_list_file()

delete the selected files in the list

copy_list_file

@Slot()
def copy_list_file()

Actually is "cut" the files ready to be "paste" in some folder

cmd_load_plugin

@Slot()
def cmd_load_plugin()

Load the selected plugin

cmd_close_plugin

@Slot()
def cmd_close_plugin()

Close the selected plugin

cmd_update_plugin_list

@Slot()
def cmd_update_plugin_list()

Update the plugin list

axesRangeChanged

@Slot()
def axesRangeChanged(ev=None)

Slot for the axes range changed event, when the range of the axes of the Image Preview is changed

closeEvent

@Slot()
def closeEvent(event)

Overridden closeEvent method for closing the application

bitfile_check

def bitfile_check(path)

Check if the bitfile exists

connectFPGA

def connectFPGA()

Connect to the FPGA(s)

setRegistersDict

def setRegistersDict(myconf)

Set the registers dictionary which is mapped to the FPGA

panoramaButton

@Slot()
def panoramaButton()

Slot for the panorama button event It copy the current image to the panorama image place

AutoRange_im_widget

def AutoRange_im_widget()

Auto range the image widget

updateRoiPanaorama

def updateRoiPanaorama()

update the panorama ROI

roiModified

def roiModified(event)

roiModified event - DUMMY

setSelectedChannel

def setSelectedChannel(ch)

set the selected channel

about

@Slot()
def about()

Show the about dialog box with license

imageMoved

def imageMoved(event)

image moved event

imageClicked

def imageClicked(event)

image clicked event. if the CTRL key is pressed, it will add a marker else it will center the image on the clicked point

drawMarkers

def drawMarkers()

draw the markers on the image

fingerprintClicked

def fingerprintClicked(event)

fingerprint clicked event

update_fingerprint_mask

def update_fingerprint_mask()

update the fingerprint mask

radio_ttm_local

@Slot()
def radio_ttm_local()

activate or disactivate the checkbox TTM in local mode

radio_ttm_remote

@Slot()
def radio_ttm_remote()

activate or disactivate the checkbox TTM in remote mode

selectedAutoscaleImg

@Slot()
def selectedAutoscaleImg()

Slot for the autoscale image checkbox

selectedAutoscaleFingerprint

@Slot()
def selectedAutoscaleFingerprint()

Slot for the autoscale fingerprint checkbox

microimageType

@Slot()
def microimageType(num)

Slot for the microimage type selection

updateTables

@Slot()
def updateTables()

Update the Status tables

test1

@Slot()
def test1()

dummy button clicked event for test

test2

@Slot()
def test2()

dummy button clicked event for test

test3

@Slot()
def test3()

dummy button clicked event for test

test4

@Slot()
def test4()

dummy button clicked event for test

test5

@Slot()
def test5()

dummy button clicked event for test

test6

@Slot()
def test6()

dummy button clicked event for test

test7

@Slot()
def test7()

dummy button clicked event for test

test8

@Slot()
def test8()

dummy button clicked event for test

define_circular

def define_circular(circular_points)

define the points for the circular scan

test9

@Slot()
def test9()

dummy button clicked event for test

circularMotionActivateChanged

@Slot()
def circularMotionActivateChanged()

activate or disactivate the circular motion

load_circular

def load_circular(ARRAY_SIZE=32)

load the circular scan position to the FPGA registers

addcurrentconfmacro

@Slot()
def addcurrentconfmacro()

Slot for the add current configuration to the table for macros

addcurrentconfmacrofcs

@Slot()
def addcurrentconfmacrofcs()

Slot for the add current configuration to the table for macros activating FCS preview and forcing to zero the range

copyPositionsMarkers

@Slot()
def copyPositionsMarkers()

copy the markers to the table for macros

copyPositionsMarkersFCS

@Slot()
def copyPositionsMarkersFCS()

copy the markers to the table for macros activating FCS preview and forcing to zero the range

startBatchFCS

@Slot()
def startBatchFCS()

start the batch event

batchFCS

@Slot()
def batchFCS()

the actual loop for the batch event

stopBatchFCS

@Slot()
def stopBatchFCS()

stop the batch event

timerConfigurationViewer_tick

@Slot()
def timerConfigurationViewer_tick()

timer tick event for the configuration viewer it set the status bar with the CPU and RAM usage

markersViewTable

@Slot()
def markersViewTable()

update the markers table

timerPreviewImg_tick

@Slot()
def timerPreviewImg_tick()

timer tick event for the preview image continuosly update the preview image

draw_fingerprint

def draw_fingerprint(data_finger_print, saturation_data)

openConsoleWidget

def openConsoleWidget()

open the console widget

microimage_analysis

def microimage_analysis(data_finger_print)

microimage analysis in live, useful for alligment

temporalSettingsChanged

@Slot()
def temporalSettingsChanged()

checkBoxLockRatioChanged

@Slot()
def checkBoxLockRatioChanged()

lock the ratio of the ROI

loadPreset

@Slot()
def loadPreset()

load the preset configuration

savePreset

@Slot()
def savePreset()

save the preset configuration

calibrationFactorChanged

@Slot()
def calibrationFactorChanged()

calibration factor changed event

offset_V_Changed

@Slot()
def offset_V_Changed()

offset in Volts changed event

offset_um_Changed

@Slot()
def offset_um_Changed(force=False)

offset in um changed event

updatePixelValueChanged

@Slot()
def updatePixelValueChanged(number=None)

update the number of pixel, line, frame changed event

rangeValueChanged

@Slot()
def rangeValueChanged(number=None)

the range in um is changed event

offset_um_update

@Slot()
def offset_um_update(force=False)

called when the offset in um is changed

spatialSettingsChanged

@Slot()
def spatialSettingsChanged(force=False)

spatial settings changed event

positionSettingsChanged

@Slot()
def positionSettingsChanged(force=False)

position settings changed event

positionSettingsChanged_apply

def positionSettingsChanged_apply(force=False)

actuation of the position settings changed event

DFD_clicked

@Slot()
def DFD_clicked()

activate the DFD mode

updateMaxMinVoltages

@Slot()
def updateMaxMinVoltages()

event when the max and min voltages are changed

plotSettingsChanged

@Slot()
def plotSettingsChanged()

previewButtonClicked

@Slot()
def previewButtonClicked()

preview button clicked event

startButtonClicked

@Slot()
def startButtonClicked()

start button clicked event

stopButtonClicked

@Slot()
def stopButtonClicked()

stop button clicked event

startAcquisition

def startAcquisition(activate_preview=False, do_run=True)

the actual start acquisition function

test_analog_digital

@Slot()
def test_analog_digital()

experimental mixed analog and digital mode

trace_parameters_changed

@Slot()
def trace_parameters_changed()

trace parameters changed event

configure_analog

def configure_analog()

configure the dictionary for the analog input

activateShowPreview

def activateShowPreview(enable)

activate the preview mode

activateFIFOflag

def activateFIFOflag()

activate the FIFO flag

grabPanorama

@Slot()
def grabPanorama()

grab the panorama image

updatePreviewConfiguration

def updatePreviewConfiguration()

update the preview configuration - channel selection

defineFilename

def defineFilename(with_folder=True)

helper for define the filename of the data output

start

@Slot()
def start()

start the acquisition

ttm_activate_change_state

@Slot()
def ttm_activate_change_state()

activate or deactivate the TTM

ttm_remote_is_up

def ttm_remote_is_up()

check if the TTM is up

checkAlerts

@Slot()
def checkAlerts()

check the GUI alerts i.e. potential wrong parameters

previewLoop

def previewLoop()

the actual preview loop

finalizeAcquisition

def finalizeAcquisition()

finalize the acquisition: save the data, add metadata, etc.

cmd_filename_ttm

@Slot()
def cmd_filename_ttm()

call the dialog for setting the filename for the TTM data receiver

analog_before_stop

def analog_before_stop()

set the analog output to 0V before stopping the acquisition

stopAcquisition

def stopAcquisition()

stop the acquisition

stop

@Slot()
def stop()

stop the acquisition clicked event

sendCmdRun

def sendCmdRun()

send the run command to the FPGA

sendCmdStop

def sendCmdStop()

send the stop command to the FPGA

getPreviewImage

def getPreviewImage(projection="xy", rgb=False)

get the preview image

getPreviewFlatData

def getPreviewFlatData()

get the preview flat data

getCurrentPreviewImage

def getCurrentPreviewImage(preview_img=None)

get the current preview image

plotPreviewImage

def plotPreviewImage(img=None)

plot the preview image

plotCurrentImage

def plotCurrentImage()

plot the current image

selectChannelSum

@Slot()
def selectChannelSum()

select the sum channel

SaveConfigurationCmd

@Slot()
def SaveConfigurationCmd()

save the configuration clicked event

SaveConfiguration

@Slot()
def SaveConfiguration()

save the configuration to a .cfg file

LoadConfigurationCmd

@Slot()
def LoadConfigurationCmd()

load the configuration clicked event

LoadConfiguration

@Slot()
def LoadConfiguration(filecfg="")

load the configuration from a .cfg file

script_plot_fingerprint

def script_plot_fingerprint(fingerprint)

plot the fingerprint, handle for scripts

script_plot_shiftvector

def script_plot_shiftvector(sv=None)

plot the shift vector, handle for scripts

NumpyEncoder Objects

class NumpyEncoder(json.JSONEncoder)

helper class for encoding numpy arrays to json

brighteyes_mcs.gui.main_window_design

brighteyes_mcs.gui.scispinbox

Author: Luca Bega. Istituto Italiano di Tecnologia

brighteyes_mcs.gui.ttm_widget

brighteyes_mcs.gui.ttm_widget_design

brighteyes_mcs.gui.ttm_widget_test

brighteyes_mcs.gui.console_widget

ConsoleWidget Objects

class ConsoleWidget(RichJupyterWidget)

push_vars

def push_vars(variableDict)

Given a dictionary containing name / value pairs, push those variables to the Jupyter console widget

clear

def clear()

Clears the terminal

print_text

def print_text(text)

Prints some plain text to the console

execute_command

def execute_command(command, hidden=False)

Execute a command in the frame of the console widget

brighteyes_mcs.gui.dfd_widget

showFLIM

def showFLIM(intensity,
             lifetime,
             bounds_Tau=None,
             bounds_Int=None,
             satFactor=0.657,
             outOfBoundsHue=0.8,
             invertColormap=False,
             fig=None)

Display together the lifetime and intensity images with a proper colormap. Referring to the HSV color model: Intensity values are mapped in Value Lifetime values are mapped in Hue If the lifetime of a pixel is outside the interval [minInt, maxInt], that pixel is rendered with Hue outOfBoundsHue (default: violet)

Input parameters intensityIm: Pixel values are photon counts. lifetimeIm: Pixel values are lifetime values.

bounds_Tau minTau: minimum lifetime value of the colorbar maxTau: maximum lifetime value of the colorbar bounds_Int minInt: minimum intensity value of the colorbar maxInt: maximum intensity value of the colorbar invertColormap: (False) outOfBoundsHue: Hue to render the out of bounds pixels (0.8) satFactor: The span of the Hue space (0.657)

Last Modified May 2022 by Alessandro Zunino Based on the MATLAB function written by Giorgio Tortarolo

brighteyes_mcs.gui.dfd_widget_design

brighteyes_mcs.gui.dict_to_tree

TreeModel Objects

class TreeModel(QAbstractItemModel)

index

def index(row, column, index=QModelIndex())

Returns the index of the item in the model specified by the given row, column and parent index

parent

def parent(index)

Returns the parent of the model item with the given index If the item has no parent, an invalid QModelIndex is returned

rowCount

def rowCount(index=QModelIndex())

Returns the number of rows under the given parent When the parent is valid it means that rowCount is returning the number of children of parent

columnCount

def columnCount(index=QModelIndex())

Returns the number of columns for the children of the given parent

data

def data(index, role=Qt.DisplayRole)

Returns the data stored under the given role for the item referred to by the index

headerData

def headerData(section, orientation, role=Qt.DisplayRole)

Returns the data for the given role and section in the header with the specified orientation

brighteyes_mcs.gui

brighteyes_mcs.libs.cython

brighteyes_mcs.libs.fpga_handle

brighteyes_mcs.libs.h5manager

brighteyes_mcs.libs.mp_shared_array

MemorySharedNumpyArray Objects

class MemorySharedNumpyArray(object)

A shared array (based on multiprocessing Array). Also, you can get a Numpy handle to the shared array with the get_numpy_handle() method. If you need the locking etc. capabilities of the mp.Array, you can access the data attribute directly.

Attributes:

  • data mp.Array - the shared array
  • sampling - information about the physical spacing between elements (e.g. pixel size). The information will be the same for all array views. Make sure that when slicing, the dimensionality is appropriate.
  • id str - a unique identifier (tag) for an array instance. Makes dealing with array views a little bit more straightforward
  • np_shape tuple - the shape of the array
  • size int - the size of the flattened array
  • np.dtype str - the Numpy dtype string

__init__

def __init__(dtype, shape, sampling=0, lock=True)

Arguments:

  • dtype str - a Numpy data type string ('uint32' etc.). You can also use the constants defined in Numpy (np.uint32 etc.)
  • shape tuple - the shape of the array (e.g. (20, 50, 200))
  • sampling - sampling info, e.g. tuple of pixel spacings in an image

Arguments:

  • lock - Apply a process lock.

get_numpy_handle

def get_numpy_handle(reshape=True)

Return a Numpy array handle to the shared array.

Returns:

  • np.ndarray - the array reshaped to the original shape definition

brighteyes_mcs.libs.multithread_caller_helper

Worker Objects

class Worker(QRunnable)

Worker thread

Inherits from QRunnable to handler worker thread setup, signals and wrap-up.

Arguments:

  • callback (function): The function callback to run on this worker thread. Supplied args and kwargs will be passed through to the runner.
  • args: Arguments to pass to the callback function
  • kwargs: Keywords to pass to the callback function

run

@Slot()
def run()

Initialise the runner function with passed args, kwargs.

brighteyes_mcs.libs.plugin_loader

PluginsManager Objects

class PluginsManager()

Manages the plugins for the main window application.

Attributes:

  • main_window QMainWindow - The main window of the application.
  • plugin_instances dict - Dictionary to store plugin instances.
  • trigger_register dict - Dictionary to store registered triggers.

__init__

def __init__(main_window)

Initialize the PluginsManager.

Arguments:

  • main_window QMainWindow - The main window of the application.

signal_emitted

@Slot()
def signal_emitted(string)

Slot to handle emitted signals.

Arguments:

  • string str - The emitted signal string.

plugin_list

def plugin_list()

Get the list of available plugins.

Returns:

  • list - List of available plugins.

plugin_loader

def plugin_loader(plugin_name)

Load a plugin by name.

Arguments:

  • plugin_name str - The name of the plugin to load.

instances

def instances()

Get the instances of loaded plugins.

Returns:

  • dict - Dictionary of plugin instances.

addTab

def addTab(widget, caption)

Add a tab to the main window.

Arguments:

  • widget QWidget - The widget to add as a tab.
  • caption str - The caption for the tab.

register_trigger

def register_trigger(trigger_name, func)

Register a trigger with a function.

Arguments:

  • trigger_name str - The name of the trigger.
  • func callable - The function to call when the trigger is emitted.

brighteyes_mcs.libs.print_dec

print_dec

def print_dec(*objects, sep=" ", end="\n", file=sys.stdout, flush=False)

A print "decorated": it add information about line and the file in which this command is called

brighteyes_mcs.libs.processes.acquisition_loop_process

brighteyes_mcs.libs.processes.data_pre_process

DataPreProcess Objects

class DataPreProcess(mp.Process)

__init__

def __init__(queue_in,
             dict_of_shared_loc,
             last_preprocessed_len,
             dict_of_queue_array_out,
             dict_of_dtype_queue_array_out,
             len_buffer=0,
             debug=False,
             use_rust_fifo=True)

Arguments:

  • queue_in: this is the queue from the fpgahandleprocess each elements contains ["FIFONAME", data]
  • dict_of_shared_loc: {'FIFONAME':shared_loc_fifo,...}
  • dict_of_queue_array_out: {'FIFONAME':shared_queue_array_out,...}
  • dict_of_dtype_queue_array_out: {'FIFONAME':dtype_shared_queue_array_out,...}

brighteyes_mcs.libs.processes.fpga_handle_process_fifo_new

brighteyes_mcs.libs.processes

brighteyes_mcs.libs.restapi

NumpyEncoder Objects

class NumpyEncoder(json.JSONEncoder)

Custom JSON encoder for NumPy arrays

FastAPIServerThread Objects

class FastAPIServerThread(threading.Thread)

Thread class for running the FastAPI server

__init__

def __init__(main_window, host="127.0.0.1", port=8000)

Constructor for the FastAPIServerThread class that initializes the FastAPI app and the server configuration parameters (host and port)

run

def run()

Method to run the FastAPI server

stop

def stop()

Method to stop the FastAPI server

brighteyes_mcs.libs.rust_fifo_reader

brighteyes_mcs.libs.spad_fcs_manager

SpadFcsManager Objects

class SpadFcsManager(QObject)

Manages the SPAD FCS (Single-Photon Avalanche Diode Fluorescence Correlation Spectroscopy) operations, including FPGA connections, data acquisition, and processing.

Attributes:

  • channels int - Number of channels.
  • dim_detector int - Dimension of the detector.
  • niAddr str - NI address.
  • bitfile str - Path to the bitfile.
  • timeout_fifos float - Timeout for the FIFOs.
  • fpga_handle FpgaHandle - Handle for the FPGA.
  • shared_arrays_ready bool - Flag indicating if shared arrays are ready.
  • mp_manager multiprocessing.Manager - Manager for multiprocessing.
  • ultra_dict_inst dict - Dictionary for ultra configuration.
  • shared_dict dict - Shared dictionary for multiprocessing.
  • default_configuration dict - Default configuration for the registers.
  • requested_depth int - Requested depth for acquisition.
  • actual_depth int - Actual depth for acquisition.
  • timebins_per_pixel int - Number of time bins per pixel.
  • time_resolution float - Time resolution.
  • dim_x int - Number of pixels in x dimension.
  • dim_y int - Number of pixels in y dimension.
  • dim_z int - Number of frames.
  • dim_rep int - Number of repetitions.
  • previewProcess AcquisitionLoopProcess - Process for previewing data.
  • expected_raw_data int - Expected raw data.
  • expected_raw_data_per_frame int - Expected raw data per frame.
  • registers_configuration dict - Configuration of the registers.
  • shared_memory_buffer MemorySharedNumpyArray - Shared memory buffer.
  • shared_image_xy MemorySharedNumpyArray - Shared image in xy plane.
  • shared_fingerprint MemorySharedNumpyArray - Shared fingerprint data.
  • shared_fingerprint_mask MemorySharedNumpyArray - Shared fingerprint mask.
  • is_connected bool - Flag indicating if connected to FPGA.
  • fifo_chuck_size int - Size of the FIFO chuck.
  • acquisition_done_event multiprocessing.Event - Event for acquisition done.
  • acquisition_almost_done_event multiprocessing.Event - Event for acquisition almost done.
  • acquisition_run_event multiprocessing.Event - Event for acquisition run.
  • acquisition_stop_event multiprocessing.Event - Event for acquisition stop.
  • activate_preview_event multiprocessing.Event - Event for activating preview.
  • autocorrelation_maxx int - Maximum value for autocorrelation.
  • trace_bins int - Number of trace bins.
  • trace_sample_per_bins int - Number of samples per trace bin.
  • preview_buffer_size_in_words int - Size of the preview buffer in words.
  • len_fifo_prebuffer int - Length of the FIFO prebuffer.
  • activated_fifos_list list - List of activated FIFOs.
  • DFD_Activate bool - Flag for DFD activation.
  • snake_walk bool - Flag for snake walk mode.
  • use_rust_fifo bool - Flag for using Rust FIFO.
  • debug bool - Debug flag.

__init__

def __init__(filename="bitfiles/MyBitfileUSB.lvbitx",
             address="RIO0",
             channels=25)

Constructor of the class of SpaFCSManager

__del__

def __del__()

Destructor of the class

set_channels

def set_channels(ch)

Set the number of channels

activateShowPreview

def activateShowPreview(enable)

Activate the preview flag

setActivatedFifo

def setActivatedFifo(fifos_list)

Set the activated FIFOs

acquisition_stop

def acquisition_stop()

Stop the acquisition

acquisition_run

def acquisition_run()

Run the acquisition

acquisition_done_reset

def acquisition_done_reset()

Reset the acquisition done event

acquisition_almost_done_reset

def acquisition_almost_done_reset()

Reset the acquisition almost done event

acquisition_is_done

def acquisition_is_done()

Check if the acquisition is done

acquisition_is_almost_done

def acquisition_is_almost_done()

Check if the acquisition is almost done

set_activate_preview

def set_activate_preview(active=True)

Activate the preview

set_activate_DFD

def set_activate_DFD(activate=True)

Activate the DFD mode

set_activate_snake_walk

def set_activate_snake_walk(activate=True)

Set the snake walk (bidirectional scanning)

set_bit_file

def set_bit_file(bitfile="")

Set the bit file for the 1st FPGA

set_ni_addr

def set_ni_addr(niAddr="")

Set the NI address for the 1st FPGA

set_bit_file_second_fpga

def set_bit_file_second_fpga(bitfile="")

Set the bit file for the 2nd FPGA

set_ni_addr_second_fpga

def set_ni_addr_second_fpga(niAddr="")

Set the NI address for the 2nd FPGA

set_preview_buffer_size_in_words

def set_preview_buffer_size_in_words(preview_buffer_size_in_words)

Set the preview buffer size in words

set_len_fifo_prebuffer

def set_len_fifo_prebuffer(len_fifo_prebuffer)

Set the length of the FIFO prebuffer

set_timeout_fifos

def set_timeout_fifos(timeout)

Set the timeout for the FIFOs

connect

def connect(initial_registers={}, list_fifos=[])

Connect to the FPGA using FPGA handle class

set_filename_h5

def set_filename_h5(filename)

Set the filename for the HDF5 file

set_fingerprint_mask

def set_fingerprint_mask(fingerprint_mask)

Set the fingerprint mask

set_use_rust_fifo

def set_use_rust_fifo(value=True)

Set the use of rust FIFO

run

def run()

Run the FPGA, start the data process, the preview process and run the FPGA handle class

previewProcess_isAlive

def previewProcess_isAlive()

Preview process is alive

dataProcess_isAlive

def dataProcess_isAlive()

dataProcess is alive

freeMemory

def freeMemory()

Free the memory

setRegistersDict

def setRegistersDict(myconf)

Set the registers dictionary

readRegistersDict

def readRegistersDict()

Read the registers dictionary

update_chuck

def update_chuck()

Update the chuck size

getCurrentPreviewElement

def getCurrentPreviewElement(fifo_name="FIFO")

Get the current preview element

getCurrentAcquistionElement

def getCurrentAcquistionElement(fifo_name="FIFO")

Get the current acquisition element

getLastPreprocessedLen

def getLastPreprocessedLen(fifo_name="FIFO")

Get the last preprocessed length

getExpectedFifoElements

def getExpectedFifoElements()

Get the expected FIFO elements

getExpectedFifoElementsPerFrame

def getExpectedFifoElementsPerFrame()

Get the expected FIFO elements per frame

stopFPGA

def stopFPGA()

stop the FPGA

stopAcquisition

def stopAcquisition()

Stop the acquisition

stopPreview

def stopPreview()

Stop the preview

get_current_z

def get_current_z()

Get the current z

get_current_rep

def get_current_rep()

Get the current repetition

get_total_photon

def get_total_photon()

Get the number of total photon

get_number_of_threads_h5

def get_number_of_threads_h5()

Get the number of threads

reset

def reset()

Reset the FPGA

getFingerprint

def getFingerprint()

Get the fingerprint

getFingerprintCumulative

def getFingerprintCumulative()

Get the fingerprint cumulative

getFingerprintCumulativeLast10000

def getFingerprintCumulativeLast10000()

Get the fingerprint cumulative last 10000 data packets

getFingerprintCumulativeLastFrame

def getFingerprintCumulativeLastFrame()

Get the fingerprint cumulative last frame

getFingerprintSaturation

def getFingerprintSaturation()

Get the fingerprint saturation

getImage

def getImage()

Get the image

setSelectedChannel

def setSelectedChannel(ch)

Set the selected channel

set_autocorrelation_maxx

def set_autocorrelation_maxx(value=20)

Set the autocorrelation maxx

set_trace_bins

def set_trace_bins(trace_bins=30000)

Set the trace bins

set_trace_sample_per_bins

def set_trace_sample_per_bins(trace_sample_per_bins=10000)

Set the trace sample per bins

getAutocorrelation

def getAutocorrelation()

Get the autocorrelation

getTrace

def getTrace()

Get the trace

getPreviewImage

def getPreviewImage(projection="xy", rgb=False)

Get the preview image with at selected projection

getPreviewFlatData

def getPreviewFlatData(frame=0, channel=10)

Get the preview flat data

get_registers_configuration

def get_registers_configuration()

Get the registers configuration

update_shared_dict

def update_shared_dict(ndict={})

Update the shared dictionary

read_shared_dict

def read_shared_dict()

Read the shared dictionary

get_FIFO_status

def get_FIFO_status()

Get the status of the FIFO

trace_reset

def trace_reset()

Reset the trace process

FCS_reset

def FCS_reset()

Reset the FCS process

brighteyes_mcs.libs.table_manager

brighteyes_mcs.libs.ttm

brighteyes_mcs.libs

brighteyes_mcs.plugins.ao_system.cobolt_ctl

brighteyes_mcs.plugins.ao_system.load_plugin

The load_plugin.py is the default loader of the plugin that can be modified in order to implement the plugin. Remind to add from .load_plugin import load_plugin in the init.py

brighteyes_mcs.plugins.ao_system

brighteyes_mcs.plugins.myplugin.gui.plugin_gui

brighteyes_mcs.plugins.myplugin.load_plugin

The load_plugin.py is the default loader of the plugin that can be modified in order to implement the plugin. Remind to add from .load_plugin import load_plugin in the init.py The parameter plugin_manager allows to QWidget to the plugins plugin_manager.addTab(context["widget"], "myplugin")

brighteyes_mcs.plugins.myplugin.plugin_form

myForm Objects

class myForm(Ui_Form)

An example of implementation of the QWidget used by the plugin

brighteyes_mcs.plugins.myplugin

brighteyes_mcs.plugins.script_launcher.gui.plugin_gui

brighteyes_mcs.plugins.script_launcher.load_plugin

The load_plugin.py is the default loader of the plugin that can be modified in order to implement the plugin. Remind to add from .load_plugin import load_plugin in the init.py The parameter plugin_manager allows to QWidget to the plugins plugin_manager.addTab(context["widget"], "myplugin")

brighteyes_mcs.plugins.script_launcher.plugin_form

An example of implementation of the QWidget used by the plugin This script is can run also as stand-alone form.

myForm Objects

class myForm(Ui_Form, QWidget)

An example of implementation of the QWidget used by the plugin

brighteyes_mcs.plugins.script_launcher

brighteyes_mcs.plugins

brighteyes_mcs.__main__

scripts

scripts.ffs_analysis_script

Script that can be launched directly on the ScriptLauncher. Calculate and shows the FSC correlation of the last data acquired.

chunksize

s

corRes

'resolution' of the correlation function: the higher this number, the more lag times are used

start

start index to fit the data, set to 15-30 to remove the afterpulse component at short lag times

fitarray

parameters to fit

minBound

minimum values for the parameters

maxBound

maximum values for the parameters

SF

shape factor, i.e. z0/w0 with z0 the height of the PSF and w0 the width (1/e^2 radius of the intensity)

startValues

start values for the fit

plotInfo

used for the color of the output plot

startValues

start values for the fit

startValues

start values for the fit

w0

from circFCS 2021-11-25

scripts.grid_calibration

Script that can be launched directly on the ScriptLauncher. This script can be used with by using a grid sample It calculates the distances between the grid cell, and it is useful to perform calculate the calibration factor of the positioner (galvo mirror)

calib_x

um/V

calib_y

um/V

calib_Vx

px/V

calib_Vy

px/V

pad_width

2000

T

um

scripts.shift_vectors

Script that can be launched directly on the ScriptLauncher. This script calculate and shows the shift vector of the last ascquired image.

dset

np.squeeze(data)

compile_cython

build_cython_with_vs

def build_cython_with_vs()

Builds the Cython part of the code using Visual Studio (MSVC).

build_cython_with_msys2

def build_cython_with_msys2(msys2_path)

Builds the Cython part of the code using MSYS2 (mingw32).

create_links

path

This is where the shortcut will be created

target

directory to which the shortcut is created

path

This is where the shortcut will be created

download_firmware

Clone this wiki locally