示例#1
0
def decompression():
    homeNoWait()
    arduino = ArduinoCommunicator('/dev/ttyACM0', 'shear' )
    print("Decompression experiment...")
    exp = experimentGrapper();
    exp.steplength = input ("Steplength: ")
    exp.no_steps = input ("Number of steps: ")
    tiling = input ("Photo-tiles per dimension: ")
    photogrid = photoframe(exp,tiling)
    position = 0
    cstep = 0
    saveSetup(exp);
    ctr=0
    while cstep < exp.no_steps:
        print "Current position: " + str(position)
        brightfield()
        arduino.turn_holder("open")
        take_photo2(photogrid, exp.photoPrefix()+"step"+str(cstep)+"_ti",0, arduino)
        darkfield()
        arduino.turn_holder("right-handed")
        take_photo2(photogrid, exp.photoPrefix()+"step"+str(cstep)+"_di",1, arduino,reverse=1)
        print("Going to new position...")
        arduino.compress(-exp.steplength)
        position = position + exp.steplength
        cstep = cstep+1
        time.sleep(2)
        arduino.agitate(20)
        time.sleep(2)
    os.system("sispmctl -f 3")
    print ("Source light turned off")
    os.system("sudo -u piti_se cp -r "+exp.name+ "/* /mnt/cluster/gamma/piti_se/Data/fna/"+exp+"/")
    raw_input("Press RETURN to move the walls to the initial position...")
    os.system("entangle &")
    raw_input("Please take pictures of the final Volume first")
    os.system("sispmctl -o 1")
    os.system("sispmctl -f all")
    homeNoWait()
    print ("Motor and Stepper power turned off")
示例#2
0
def singleWall():
    homeNoWait()
    arduino = ArduinoCommunicator('/dev/ttyACM0','singleWall')
    print("Single Wall...")
示例#3
0
def directControl():
    homeNoWait()
    arduino = ArduinoCommunicator('/dev/ttyACM0','direct')
    print("Direct Control...")