-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
13,000 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| #!/usr/bin/env python | ||
| from atmcd import * | ||
|
|
||
| print("Camera Information Example") | ||
|
|
||
| numberOfImages=10 | ||
|
|
||
| print("Intialising Camera") | ||
| sdkObject = atmcd() #load the atmcd library | ||
| (ret) = sdkObject.Initialize("/usr/local/etc/andor") #initialise camera | ||
| print("Initialize returned",ret) | ||
|
|
||
| if atmcd.DRV_SUCCESS==ret: | ||
|
|
||
| (ret, iSerialNumber) = sdkObject.GetCameraSerialNumber() | ||
| print("Serial No : ",iSerialNumber) | ||
|
|
||
| (ret, headModel) = sdkObject.GetHeadModel() | ||
| print("Head Model : ",headModel) | ||
|
|
||
| (ret, caps) = sdkObject.GetCapabilities() | ||
| if caps.ulCameraType == atmcd.AC_CAMERATYPE_PDA : | ||
| print("Camera Type : AC_CAMERATYPE_PDA") | ||
| if caps.ulCameraType == atmcd.AC_CAMERATYPE_IXON : | ||
| print("Camera Type : AC_CAMERATYPE_IXON") | ||
| if caps.ulCameraType == atmcd.AC_CAMERATYPE_ICCD: | ||
| print("Camera Type : AC_CAMERATYPE_ICCD") | ||
|
|
||
| if caps.ulCameraType == atmcd.AC_CAMERATYPE_EMCCD: | ||
| print("Camera Type : AC_CAMERATYPE_EMCCD") | ||
|
|
||
| if caps.ulCameraType == atmcd.AC_CAMERATYPE_CCD: | ||
| print("Camera Type : AC_CAMERATYPE_CCD") | ||
|
|
||
| if caps.ulCameraType == atmcd.AC_CAMERATYPE_ISTAR: | ||
| print("Camera Type : AC_CAMERATYPE_ISTAR") | ||
|
|
||
| if caps.ulCameraType == atmcd.AC_CAMERATYPE_VIDEO: | ||
| print("Camera Type : AC_CAMERATYPE_VIDEO") | ||
|
|
||
| if caps.ulCameraType == atmcd.AC_CAMERATYPE_NEWTON: | ||
| print("Camera Type : AC_CAMERATYPE_NEWTON") | ||
|
|
||
| if caps.ulCameraType == atmcd.AC_CAMERATYPE_SURCAM: | ||
| print("Camera Type : AC_CAMERATYPE_SURCAM") | ||
|
|
||
| if caps.ulCameraType == atmcd.AC_CAMERATYPE_USBICCD: | ||
| print("Camera Type : AC_CAMERATYPE_USBICCD") | ||
|
|
||
| if caps.ulCameraType == atmcd.AC_CAMERATYPE_LUCA: | ||
| print("Camera Type : AC_CAMERATYPE_LUCA") | ||
|
|
||
| if caps.ulCameraType == atmcd.AC_CAMERATYPE_RESERVED: | ||
| print("Camera Type : AC_CAMERATYPE_RESERVED") | ||
|
|
||
| if caps.ulCameraType == atmcd.AC_CAMERATYPE_IKON: | ||
| print("Camera Type : AC_CAMERATYPE_IKON") | ||
|
|
||
| if caps.ulCameraType == atmcd.AC_CAMERATYPE_INGAAS: | ||
| print("Camera Type : AC_CAMERATYPE_INGAAS") | ||
|
|
||
| if caps.ulCameraType == atmcd.AC_CAMERATYPE_CLARA: | ||
| print("Camera Type : AC_CAMERATYPE_CLARA") | ||
|
|
||
| if caps.ulCameraType == atmcd.AC_CAMERATYPE_USBISTAR: | ||
| print("Camera Type : AC_CAMERATYPE_USBISTAR") | ||
|
|
||
| if caps.ulCameraType == atmcd.AC_CAMERATYPE_IXONULTRA: | ||
| print("Camera Type : AC_CAMERATYPE_IXONULTRA") | ||
|
|
||
|
|
||
|
|
||
| #Clean up | ||
| (ret) = sdkObject.ShutDown() | ||
| print("Shutdown returned",ret) | ||
|
|
||
| else: | ||
| print("Cannot continue, could not initialise camera") | ||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| #!/usr/bin/env python | ||
| from atmcd import * | ||
|
|
||
| print("FVB Example") | ||
|
|
||
| print("Intialising Camera") | ||
| sdkObject = atmcd() #load the atmcd library | ||
| (ret) = sdkObject.Initialize("/usr/local/etc/andor") #initialise camera | ||
| print("Initialize returned",ret) | ||
|
|
||
| if atmcd.DRV_SUCCESS==ret: | ||
|
|
||
| (ret, iSerialNumber) = sdkObject.GetCameraSerialNumber() | ||
| print("GetCameraSerialNumber returned:",ret,"Serial No:",iSerialNumber) | ||
|
|
||
| #configure the acquisition | ||
| (ret) = sdkObject.CoolerON() | ||
| print("Function CoolerON returned",ret) | ||
|
|
||
| (ret) = sdkObject.SetAcquisitionMode(1) | ||
| print("Function SetAcquisitionMode returned",ret,"mode = Single Scan") | ||
|
|
||
| (ret) = sdkObject.SetReadMode(0) | ||
| print("Function SetReadMode returned",ret,"mode = FVB") | ||
|
|
||
| (ret) = sdkObject.SetTriggerMode(0) | ||
| print("Function SetTriggerMode returned",ret,"mode = Internal") | ||
|
|
||
| (ret, xpixels, ypixels) = sdkObject.GetDetector() | ||
| print("Function GetDetector returned",ret,"xpixels =",xpixels,"ypixels =",ypixels) | ||
|
|
||
| (ret) = sdkObject.SetImage(1, 1, 1, xpixels, 1, ypixels) | ||
| print("Function SetImage returned",ret,"hbin = 1 vbin = 1 hstart = 1 hend =",xpixels,"vstart = 1 vend =",ypixels) | ||
|
|
||
| (ret) = sdkObject.SetExposureTime(0.01) | ||
| print("Function SetExposureTime returned",ret,"time = 0.01s") | ||
|
|
||
| (ret, fminExposure, fAccumulate, fKinetic) = sdkObject.GetAcquisitionTimings() | ||
| print("Function GetAcquisitionTimings returned",ret,"exposure =",fminExposure,"accumulate =",fAccumulate,"kinetic =",fKinetic) | ||
|
|
||
| (ret) = sdkObject.PrepareAcquisition() | ||
| print("Function PrepareAcquisition returned",ret) | ||
|
|
||
| #Perform Acquisition | ||
| (ret) = sdkObject.StartAcquisition() | ||
| print("Function StartAcquisition returned",ret) | ||
|
|
||
| (ret) = sdkObject.WaitForAcquisition() | ||
| print("Function WaitForAcquisition returned",ret) | ||
|
|
||
| imageSize = xpixels | ||
| (ret, fullFrameBuffer) = sdkObject.GetMostRecentImage(imageSize) | ||
| print("Function GetMostRecentImage returned",ret,"first pixel =",fullFrameBuffer[0],"size =",imageSize) | ||
|
|
||
| #Clean up | ||
| (ret) = sdkObject.ShutDown() | ||
| print("Shutdown returned",ret) | ||
|
|
||
| else: | ||
| print("Cannot continue, could not initialise camera") | ||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| #!/usr/bin/env python | ||
| from atmcd import * | ||
|
|
||
| print("Kinetic Series Example") | ||
|
|
||
| numberOfImages=10 | ||
|
|
||
| print("Intialising Camera") | ||
| sdkObject = atmcd() #load the atmcd library | ||
| (ret) = sdkObject.Initialize("/usr/local/etc/andor") #initialise camera | ||
| print("Initialize returned",ret) | ||
|
|
||
| if atmcd.DRV_SUCCESS==ret: | ||
|
|
||
| (ret, iSerialNumber) = sdkObject.GetCameraSerialNumber() | ||
| print("GetCameraSerialNumber returned:",ret,"Serial No:",iSerialNumber) | ||
|
|
||
| #configure the acquisition | ||
| (ret) = sdkObject.CoolerON() | ||
| print("Function CoolerON returned",ret) | ||
|
|
||
| (ret) = sdkObject.SetAcquisitionMode(3) | ||
| print("Function SetAcquisitionMode returned",ret,"mode = Kinetic Series") | ||
|
|
||
| (ret) = sdkObject.SetNumberKinetics(numberOfImages); | ||
| print("Function SetNumberKinetics returned",ret,"numberOfImages =",numberOfImages) | ||
|
|
||
| (ret) = sdkObject.SetReadMode(4) | ||
| print("Function SetReadMode returned",ret,"mode = Image") | ||
|
|
||
| (ret) = sdkObject.SetTriggerMode(0) | ||
| print("Function SetTriggerMode returned",ret,"mode = Internal") | ||
|
|
||
| (ret, xpixels, ypixels) = sdkObject.GetDetector() | ||
| print("Function GetDetector returned",ret,"xpixels =",xpixels,"ypixels =",ypixels) | ||
|
|
||
| (ret) = sdkObject.SetImage(1, 1, 1, xpixels, 1, ypixels) | ||
| print("Function SetImage returned",ret,"hbin = 1 vbin = 1 hstart = 1 hend =",xpixels,"vstart = 1 vend =",ypixels) | ||
|
|
||
| (ret) = sdkObject.SetExposureTime(0.01) | ||
| print("Function SetExposureTime returned",ret,"time = 0.01s") | ||
|
|
||
| (ret, fminExposure, fAccumulate, fKinetic) = sdkObject.GetAcquisitionTimings() | ||
| print("Function GetAcquisitionTimings returned",ret,"exposure =",fminExposure,"accumulate =",fAccumulate,"kinetic =",fKinetic) | ||
|
|
||
| (ret) = sdkObject.PrepareAcquisition() | ||
| print("Function PrepareAcquisition returned",ret) | ||
|
|
||
| #Perform Acquisition | ||
| (ret) = sdkObject.StartAcquisition() | ||
| print("Function StartAcquisition returned",ret) | ||
|
|
||
| imageSize = xpixels*ypixels | ||
|
|
||
| for currentImage in range(numberOfImages): | ||
|
|
||
| print("Acquiring image",currentImage) | ||
|
|
||
| (ret) = sdkObject.WaitForAcquisition() | ||
| print("Function WaitForAcquisition returned",ret) | ||
|
|
||
| (ret, fullFrameBuffer) = sdkObject.GetMostRecentImage(imageSize) | ||
| print("Function GetMostRecentImage returned",ret,"first pixel =",fullFrameBuffer[0],"size =",imageSize) | ||
|
|
||
| #Clean up | ||
| (ret) = sdkObject.ShutDown() | ||
| print("Shutdown returned",ret) | ||
|
|
||
| else: | ||
| print("Cannot continue, could not initialise camera") | ||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| Python Wrapper Readme | ||
|
|
||
| The python module which wraps the SDK2 is atmcd.py | ||
|
|
||
| There are 4 examples: | ||
| * CameraInformation.py - Prints basic information about the camera | ||
| * SingleScan.py - Performs a Single image acquisition | ||
| * KineticSeries.py - Performs a Kinetic Series Acquisition | ||
| * FVB.py - Performs an acqusition with Full Vertical Binning | ||
|
|
||
| If the AndorSDK is installed to a directory that is not the default install location, i.e. not c:\Program Files\Andor SDK on Windows or /usr/local/lib/libandor.so on Linux, please update the __init__ (atmcd.py line 50) function accordingly. | ||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| #!/usr/bin/env python | ||
| from atmcd import * | ||
|
|
||
| print("Single Scan Example") | ||
|
|
||
| print("Intialising Camera") | ||
| sdkObject = atmcd() #load the atmcd library | ||
| (ret) = sdkObject.Initialize("/usr/local/etc/andor") #initialise camera | ||
| print("Initialize returned",ret) | ||
|
|
||
| if atmcd.DRV_SUCCESS==ret: | ||
|
|
||
| (ret, iSerialNumber) = sdkObject.GetCameraSerialNumber() | ||
| print("GetCameraSerialNumber returned:",ret,"Serial No:",iSerialNumber) | ||
|
|
||
| #configure the acquisition | ||
| (ret) = sdkObject.CoolerON() | ||
| print("Function CoolerON returned",ret) | ||
|
|
||
| (ret) = sdkObject.SetAcquisitionMode(1) | ||
| print("Function SetAcquisitionMode returned",ret,"mode = Single Scan") | ||
|
|
||
| (ret) = sdkObject.SetReadMode(4) | ||
| print("Function SetReadMode returned",ret,"mode = Image") | ||
|
|
||
| (ret) = sdkObject.SetTriggerMode(0) | ||
| print("Function SetTriggerMode returned",ret,"mode = Internal") | ||
|
|
||
| (ret, xpixels, ypixels) = sdkObject.GetDetector() | ||
| print("Function GetDetector returned",ret,"xpixels =",xpixels,"ypixels =",ypixels) | ||
|
|
||
| (ret) = sdkObject.SetImage(1, 1, 1, xpixels, 1, ypixels) | ||
| print("Function SetImage returned",ret,"hbin = 1 vbin = 1 hstart = 1 hend =",xpixels,"vstart = 1 vend =",ypixels) | ||
|
|
||
| (ret) = sdkObject.SetExposureTime(0.01) | ||
| print("Function SetExposureTime returned",ret,"time = 0.01s") | ||
|
|
||
| (ret, fminExposure, fAccumulate, fKinetic) = sdkObject.GetAcquisitionTimings() | ||
| print("Function GetAcquisitionTimings returned",ret,"exposure =",fminExposure,"accumulate =",fAccumulate,"kinetic =",fKinetic) | ||
|
|
||
| (ret) = sdkObject.PrepareAcquisition() | ||
| print("Function PrepareAcquisition returned",ret) | ||
|
|
||
| #Perform Acquisition | ||
| (ret) = sdkObject.StartAcquisition() | ||
| print("Function StartAcquisition returned",ret) | ||
|
|
||
| (ret) = sdkObject.WaitForAcquisition() | ||
| print("Function WaitForAcquisition returned",ret) | ||
|
|
||
| imageSize = xpixels*ypixels | ||
| (ret, fullFrameBuffer) = sdkObject.GetMostRecentImage(imageSize) | ||
| print("Function GetMostRecentImage returned",ret,"first pixel =",fullFrameBuffer[0],"size =",imageSize) | ||
|
|
||
| #Clean up | ||
| (ret) = sdkObject.ShutDown() | ||
| print("Shutdown returned",ret) | ||
|
|
||
| else: | ||
| print("Cannot continue, could not initialise camera") | ||
|
|
Binary file not shown.
Oops, something went wrong.