Esempio n. 1
0
 def snap_location(self,x="",y="",z="",offset="",path="",):
     if offset:
         self.move_XYstage(x,y)
         self.use_afc(offset)
     else:
         self.move_XYstage(x,y,z)
     self.mmc.snapImage()
     self.img=self.mmc.getImage()
     self.md=self.getFullSystemState()
     if path:
         FileOut.tif_writer(numpy_array=self.img,path=path,md_string=self.md)
Esempio n. 2
0
        scope.move_XYstage(location[0],location[1])
        x1,y1,z1,o1=scope.get_x_y_z_offset()
        scope.mmc.enableContinuousFocus(True)
        scope.mmc.setAutoFocusOffset(Oinit)
        while True:
            if scope.mmc.isContinuousFocusLocked():
                time.sleep(.3)
                break
            time.sleep(.3) ### added to see if it is reporting a lock before it is
        x2,y2,z2,o2=scope.get_x_y_z_offset()
        scope.mmc.enableContinuousFocus(False)
        scope.mmc.snapImage()
        img=scope.mmc.getImage()
        file_name="Test%s_simple_wait_loc%s_t%s" % (test_count,loc_count,i)
        save_loc=os.path.join(save_dir,file_name)
        FileOut.tif_writer(numpy_array=img,path=save_loc)
        locinfo[loc_count-1]+="%s\t%s\t%s\t%s\t%s\t%s\t%s\n" % (i,
                                                                    x2,
                                                                    y2,
                                                                    z1,  
                                                                    z2,
                                                                    o1, 
                                                                    o2)   
    print i
    time.sleep(60)
    
loc_counter=0
for loc in locinfo:
    loc_counter+=1
    save_dir=r"C:\Users\Administrator\Desktop\MicroscopeControl\MicroscopeControl\Tests"
    file_name="Test%s_position%s_info.tsv" % (test_count,loc_counter)