def get_control(config_path='/users/blissadm/local/Andor3/andor/bitflow', camera_number = '0', destride_active=True, **keys) : #properties are passed here as string global _Andor3Camera global _Andor3Interface if _Andor3Camera is None: print '\n\nStarting and configuring the Andor3 camera ...' _Andor3Camera = Andor3Acq.Camera(config_path, int(camera_number)) _Andor3Interface = Andor3Acq.Interface(_Andor3Camera, destride_active) print '\n\nAndor3 Camera #%s (%s:%s) is started'%(camera_number,_Andor3Camera.getDetectorType(),_Andor3Camera.getDetectorModel()) return Core.CtControl(_Andor3Interface)
### INSTALL_DIR=/usr/local/Lima make install import os, sys, time ## os.environ['LD_LIBRARY_PATH']="/usr/local/Lima/Lima/lib" print("* The general setup :") print("\n** The environement of the pocess is now : ") print(os.environ) print("\n** Now, importing Lima (Core and Andor3 :") #sys.path.insert(1, os.environ['LD_LIBRARY_PATH'] + "/../..") print("\twith sys.path = " + ":".join(sys.path)) from Lima import Core, Andor3 print("\n** Constructing the camera and the other related object :") cam = Andor3.Camera("/usr/local/andor/bitflow", 0) cam_int = Andor3.Interface(cam) cam_ctr = Core.CtControl(cam_int) print("\n** Removing all files that could interfer with acquisition :") os.system("rm -fv /mnt/DataHub3/iGEM/20170903/camera/testing*.tiff") print("\n** Taking care of the saving format : 1st serie is wihtOUT saving") cam_sav = cam_ctr.saving() cam_sav.setDirectory("/mnt/DataHub3/iGEM/20170903/camera") cam_sav.setPrefix("testing") cam_sav.setSavingMode(Core.CtSaving.Manual) print(cam_sav.getParameters()) print("** Testing the ROI : 100, 100, 2360, 1960 (in HardOnly mode)")
### This script should be run after : ### export LD_LIBRARY_PATH="/usr/local/Lima/Lima/lib" import os, sys, time from Lima import Core from Lima import Andor3 print("* The general setup :") print("\n** The environement of the pocess is now : ") print(os.environ) print("\n** Now, importing Lima (Core and Andor3 :") print("\twith sys.path = " + ":".join(sys.path)) print("\n** Constructing the camera and the other related object :") cam = Andor3.Camera("/usr/local/bf", 0) cam_int = Andor3.Interface(cam) cam_ctr = Core.CtControl(cam_int) print("\n** Removing all files that could interfer with acquisition :") os.system("rm -fv /mnt/DataHub3/iGEM/20170903/camera/testing*.tiff") print("\n** Taking care of the saving format : 1st serie is wihtOUT saving") cam_sav = cam_ctr.saving() cam_sav.setDirectory("/mnt/DataHub3/iGEM/20170903/camera") cam_sav.setPrefix("testing") cam_sav.setSavingMode(Core.CtSaving.Manual) # Manual: No automatic saving, you should call CtSaving::writeFrame print(cam_sav.getParameters()) print("** Testing the ROI : 100, 100, 2360, 1960 (in HardOnly mode)")