CAtImaPy main code
The central object of the code is the mainWin object of class MainWindow described below and defined in CAtImaPy.py file.
The main attributes of mainWin object are :
the
uiobject of classUI.Ui_MainWindowhosting the graphical user interface (GUI). The code of this class is located in UI folder, loaded as a module and described in section GUI code.the
Cameraobject of base classCameraClasscontrolling a camera. The code of this class is located in Cameras folder, loaded as a module and described in section Cameras code. Refer to section Camera drivers for details on writing specific code implementation for your camera(s) model(s).the
Imagingobject of classImagingClassused to acquire, analyze, plot and save series of measurements. The code of this class is located in Imagings folder, loaded as a module and described in section Imagings code. TheImagingobject contains the information over a measurement and is saved in string and pickle formats in ‘.txt’ and ‘.imo’ files respectively.
The Scripts folder hosts pieces of codes that can be executed like a method of mainWin with self referring to it.
The folder contains two examples and it could also host your own code, if you need this feature.
MainWindow class
- class CAtImaPy.MainWindow[source]
Bases:
QMainWindowMainWindow class that hold the ui and the main code
- __init__()[source]
Initialize MainWindow object that hold the ui and the main code
- Returns:
MainWindow object
- camera_connector()[source]
Initialize Camera object handling the camera, connect and configure camera ready for acquistion, create corresponding Imaging object.
- changeDirectory(dirname)[source]
Change the folder where data will be saved in, and also save a copy of current UI values in this folder.
- Args :
dirname (str) : Absolute path to directory.
- connectUiVariables(objectsToConnect=['mainWin'])[source]
Connect automatically UI variables : (Double)SpinBoxes, CheckBoxes, ComboBoxes to object variables or functions (if ui name ends by ‘Func’)
- Keyword Arguments:
objectsToConnect (list[str]) – list of objects (variables of mainWin) to load the variables in. The ui objectName should be of the form ‘<object name>__<object variable name>’ . If ‘mainWin’ is passed, then load all variables without ‘__’ as variables of mainWin. Default is [‘mainWin’].
- display_configured_cameras_list()[source]
Print in UI the main parameters of the cameras configured in Cameras.Config.camerasConfigs
- loadImagingvaluesToUI()[source]
Load the values of the imaging object to the UI. Only used when loading old results.
- loadUiValues(objectsToConnect=['mainWin'])[source]
Load automatically values to UI variables : (Double)SpinBoxes, CheckBoxes, ComboBoxes
- logPersistent_load()[source]
Load automatically values to UI variables from previous session. Values are saved in persistentData file.
- logPersistent_save()[source]
Save values of UI variables from future sessions. Values are saved in persistentData file.
- on_pushButton_exposure_auto_av_clicked()[source]
Action of pushButton Average auto adjust in tab Exposure and Gain.
- on_pushButton_exposure_auto_max_clicked()[source]
Action of pushButton Maximum auto adjust in tab Exposure and Gain.
- on_pushButton_exposure_gain_set_clicked()[source]
Action of pushButton Set Exposure and Gain in tab Exposure and Gain.
- on_pushButton_imaging_start_measurement_clicked()[source]
Action of pushButton Start measurement in tab Imaging.
- on_pushButton_load_imagingObject_clicked()[source]
Action of pushButton Load Imaging Results in tab Save/Load.
- on_pushButton_print_imaging_object_as_dict_clicked()[source]
Action of pushButton Print in tab Analysis results.
- on_pushButton_reloadRunScript_clicked()[source]
Action of pushButton Reload and Run Script in tab Scripting.
- on_pushButton_save_choose_dir_clicked()[source]
Action of pushButton Choose Directory in tab Save/Load.
- on_pushButton_save_imagingObject_clicked()[source]
Action of pushButton Save Imaging Results in tab Save/Load.
- on_pushButton_start_LT_measurement_clicked()[source]
Action of pushButton Start Lifetime measurement in tab Lifetime.
- on_pushButton_start_temp_measurement_clicked()[source]
Action of pushButton Start Temperature measurement in tab Temperature.
- print_dict(d, indentation=0)[source]
Make a pretty string representation of the content of a dictionary.
- save_imaging()[source]
Save imaging results (imaging object and pictures of graphs) and increment filename.