Ejemplo n.º 1
0
def movetoch4():
    fluidics.stop_flow()
    stage.move_to("J1")
    stage.move_to("Ch1")
    setpressure(0.1)
    fluidics.open(1, 2, 3, 4, 6)
    reset_force()
    print("setup should be ready to go")
Ejemplo n.º 2
0
def thelooploop():  #return 1 if done
    chk = 0
    while chk == 0:
        print("starting loop loop")
        chk = themainloop()
        if chk == 1:
            chk = false_positive()
        else:
            target_traps = traps[:2]
            target_traps[1].clear()
            target_traps[0].clear()

    #hopefully caught something, move to buffer channel and reset all
    stage.move_to("buffer")
    gohome()
    fluidics.stop_flow()
    reset_force()
    print("in the buffer channel with all reset")

    #0 for no ssDNA, 1 for good, 2 for failed to pull
    if makessDNA == 1:
        print("time to try for ssDNA")
        s = 0
        while s != 1:
            s = ssDNAstretch()
            if s == 0:
                setpressure(0.3)
                fluidics.open(3, 6)
                target_traps = traps[:2]
                target_traps[1].clear()
                target_traps[0].clear()
                fluidics.close(3, 6)
                return s
            if s == 2:
                continue
    else:
        return 1
        while fluidics.pressure < pres:
            fluidics.increase_pressure()
            pause(0.1)  #important!
    else:
        while fluidics.pressure > pres:
            fluidics.decrease_pressure()
            pause(0.1)  #important!


def timeprogression(time, numsteps):
    stepsize = round(time / numsteps, 2)
    for i in range(1, numsteps + 1):
        pause(stepsize)
        print(" " + str(round(i * stepsize * 100 / time)) +
              "% of time has elapsed (" + str(round(i * stepsize / 60)) +
              " min)")


#MAIN ------------------------------------------
print("starting high pressure")
setpressure(1.4)
fluidics.open(1, 2, 3, 4, 5, 6)
timeprogression(60 * 3, 3)

print("high done, starting low pressure")
setpressure(0.4)
timeprogression(60 * 27, 14)

fluidics.stop_flow()
print("   should be done and vented")