Skip to content

Commit

Permalink
routine
Browse files Browse the repository at this point in the history
  • Loading branch information
hoodjd committed Feb 12, 2021
1 parent 28ef0a5 commit 1c8918c
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 21 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

*.pyc
*.pyc
Binary file modified flir_repo/flir/__pycache__/aqctl_flir.cpython-38.pyc
Binary file not shown.
Binary file modified flir_repo/flir/__pycache__/driver.cpython-38.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion flir_repo/flir/aqctl_flir.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def main():
truthcounter=1
finally:
print("Closing server...")
#dev.close()
# dev.reset()

if __name__ == "__main__":
main()
39 changes: 21 additions & 18 deletions flir_repo/flir/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ def __init__(self):
# try:

# Set camera serial numbers
serial_1 = '20343286'
serial_1 = '20343286' # abs camera
#serial_2 = '20409335'# fluorescence camera

# Get system
self.system = PySpin.System.GetInstance()
Expand Down Expand Up @@ -129,23 +130,25 @@ def await_trigger(self, EXPOSURE_TIME):


def convert_image(self,num_of_im):
try:
# Acquire images
images=[]
for i in range(num_of_im):
image = self.cam_1.GetNextImage()
#print("Picture Successfully taken at: ",time.strftime("%d %b %Y %H:%M:%S", time.localtime()))
images.append(np.array(image.GetData(),dtype="uint16").reshape((image.GetHeight(),image.GetWidth()))) #convert PySpin ImagePtr into numpy array
image.Release()

self.cam_1.EndAcquisition()
return images
except:
try:
self.cam_1.EndAcquisition()
except:
pass
print("Error in convert_image(), try restarting artiq")
# try:
# Acquire images
images=[]
for i in range(num_of_im):
print("Before GetNextImage")
image = self.cam_1.GetNextImage(5000) #timeout (ms) 10000
print("Picture Successfully taken at: ",time.strftime("%d %b %Y %H:%M:%S", time.localtime()))
images.append(np.array(image.GetData(),dtype="uint16").reshape((image.GetHeight(),image.GetWidth()))) #convert PySpin ImagePtr into numpy array
image.Release()
time.sleep(0.01)

self.cam_1.EndAcquisition()
return images
# except:
# try:
# self.cam_1.EndAcquisition()
# except:
# pass
# print("Error in convert_image(), try restarting artiq")


def save_image(self, imagearray):#,image_1, image_2):
Expand Down
Binary file not shown.
4 changes: 2 additions & 2 deletions picomotor_repo/picomotor/picomotor_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

class picomotor:
axis_names = { "MOTz_x": "112", "MOTz_y": "122", "MOTy_x": "232", "MOTy_y": "242", "MOTx_x": "212", "MOTx_y": "222"}
steps_in_turn = { "MOTz_x": [15000, 16000], "MOTz_y":[16000, 16000], "MOTy_x": [16000, 16000], "MOTy_y": [16000, 16000],
"MOTx_x": [16000, 16000], "MOTx_y": [16000, 16000]} # [CW, CCW] number of steps for 1 turn
steps_in_turn = { "MOTz_x": [45650/3, 48500/3], "MOTz_y":[58000/3, 59400/3], "MOTy_x": [90150/3, 69000/3], "MOTy_y": [87400/3, 62500/3],
"MOTx_x": [45300/3, 51000/3], "MOTx_y": [51100/3, 51900/3]} # [CW, CCW] number of steps for 1 turn, using numbers from OneNote 2/8/20 calibration


def __init__(self, COM_port):
Expand Down

0 comments on commit 1c8918c

Please sign in to comment.