Skip to content

Commit

Permalink
routine
Browse files Browse the repository at this point in the history
  • Loading branch information
dpeana committed Nov 21, 2022
1 parent 9ef2ebf commit 6b3dc40
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions andor_repo/andor/andor_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __init__(self):
(ret, self.xpixels, self.ypixels) = self.cam.GetDetector()
self.imageSize = self.xpixels*self.ypixels
(ret) = self.cam.SetImage(1, 1, 1, self.xpixels, 1, self.ypixels)
(ret) = self.cam.SetExposureTime(0.010) # Set exposure time here! WAS 0.010 ms!
(ret) = self.cam.SetExposureTime(0.010) # seoncds, Set exposure time here!
(ret, self.fminExposure, self.fAccumulate, self.fKinetic) = self.cam.GetAcquisitionTimings()

(ret) = self.cam.PrepareAcquisition()
Expand Down Expand Up @@ -121,11 +121,12 @@ def get_specific_image(self, image_number):
image = np.reshape(fullFrameBuffer, (512,512)) #Converts c_long 262k array to 512x512 image numpy array
return image

def get_crop_image(self, cropx_min = 401, cropx_max = 441, cropy_min = 358, cropy_max = 398, image_number = 1, zero = False):
def get_crop_image(self, cropx_min = 419, cropx_max = 459, cropy_min = 358, cropy_max = 398, image_number = 1, zero = False):
(ret, fullFrameBuffer, validfirst, validlast) = self.cam.GetImages(image_number,image_number,self.imageSize)
image = np.reshape(fullFrameBuffer, (512,512))
image = image[cropx_min:cropx_max,cropy_min:cropy_max]*1
# image[17:20,18:21] = image[17:20,18:21] + 10000 # This line is used for visualizing pixels of interest on image in artiq
#[18:21,17:20] for 3x3 array as of 11/16/22
# image[19:20,18:20] = image[19:20,18:20] + 10000 # This line is used for visualizing pixels of interest on image in artiq
if zero == False:
image = image * 1
if zero == True:
Expand Down

0 comments on commit 6b3dc40

Please sign in to comment.