コード例 #1
0
def autoshutoffkymo(): #both force and photon counts
    greenphoton = timeline["Photon count"]["Green"]
    confocal.start_scan("RPA Kymo")
    
    f1=trap2.current_force
    print("initial force: " + str(round(f1,2)))

    n=0; photonbin=20
    while 1:
        pause(1/78125)
        n+=1
        photonbin += greenphoton.latest_value
        if n%(3000) == 0:
            f2 = trap2.current_force
            print("periodic check #"+str(round(n/3000)))
            print("  photon count: " + str(photonbin))
            print("  force: " + str(round(f2,2)))
            if (photonbin < greencutoff) or (f2 < 0.5*f1):
                pause(7)
                break
            else: 
                photonbin=0
    confocal.abort_scan()
    excitation_lasers.green = 0
    print("!!!!!!!!! IT'S DONE !!!!!!!!!")
コード例 #2
0
from bluelake import Trap, stage, fluidics, pause, power, timeline, reset_force, confocal

reset_force()
timeline.mark_begin("FD1")

while Distancebeads.latest_value < 25:
    trap1.move_by(dx=3, speed=8)
    confocal.start_scan()  # start the active configuration

    # wait for scan to finish
    pause(1)
    while confocal.is_scanning:
        pause(1)

timeline.mark_end()

print("Done!")
コード例 #3
0
ファイル: Rep-imaging.py プロジェクト: ccarcam1/JHU_c-trap
# MAIN ======================================
hangtime = 5  #how long it stays stretched
imagetime = 400  #how long to image for
proteintime = 3  #waiting for protein to bind

excitation_lasers.green = 0
trap = Trap("1", "XY")
# stretching
print("stretching for " + str(hangtime) + " sec")
trap.move_to(waypoint="more streatch", speed=5)
timeprogression(hangtime, 5)
trap.move_to(waypoint="measure point", speed=5)
print("stretch done")

print("just hanging out for a bit for protein binding (" + str(proteintime) +
      " sec)")
timeprogression(proteintime, 5)
#turn on laser
excitation_lasers.green = 30

#start imaging
confocal.start_scan("Rep kymo")
print("Scan started: " + str(imagetime) + "sec")
timeprogression(imagetime, 10)

# stop imaging
confocal.abort_scan()
#turn off laser
excitation_lasers.green = 0
print("!!!! Scan ended !!!!")
コード例 #4
0
from bluelake import confocal, excitation_lasers, pause

print(excitation_lasers.red)  # get current value in %
excitation_lasers.red = 40  # set value in %

confocal.start_scan()  # start the active configuration
confocal.start_scan("Preset name")  # start a specific preset

# wait for scan to finish (not required)
pause(1)
while confocal.is_scanning:
    pause(1)

# or abort scan
confocal.abort_scan()
コード例 #5
0
ファイル: frap.py プロジェクト: lumicks/bluelake-scripting
def increment_frap_count():
    """Add or increment a FRAP counter for the timeline markers"""
    if not hasattr(bluelake, "frap_count"):
        bluelake.frap_count = 0
    bluelake.frap_count += 1


increment_frap_count()
timeline.mark_begin(f"FRAP {bluelake.frap_count}")

# Scan 1: Before using this script you must save a scan preset and name it
#         "reference" (or anything else that matches the `start_scan()` below).
excitation_lasers.blue = 15  # % power
# and/or: `excitation_lasers.red = 20`  # % power
confocal.start_scan("reference")
wait_for_scan()

# Scan 2: As above, this starts a scan preset called "bleach". You must save
#         this preset in the UI before starting the script.
excitation_lasers.blue = 90  # % power
confocal.start_scan("bleach")
wait_for_scan()

# Scan 3: The previous two were single-frame scans, but this one is usually
#         multi-frame (again, set this in the UI and save it). It can also
#         be useful to increase the "Image time" in the UI. Effectively,
#         this adds a pause between frames in order to avoid bleaching if
#         the recovery is slow.
excitation_lasers.blue = 15  # % power
confocal.start_scan("image")
コード例 #6
0
from bluelake import pause, confocal

iterations = 20
preset_name = "single_kymo"

for i in range(iterations):
    confocal.start_scan(preset_name)
    pause(1)

コード例 #7
0
ファイル: SSB-imaging.py プロジェクト: ccarcam1/JHU_c-trap
# MAIN ======================================
hangtime = 5  #how long it stays stretched
imagetime = 500  #how long to image for
proteintime = 5  #waiting for protein to bind

excitation_lasers.green = 0
trap = Trap("1", "XY")
# stretching
print("stretching for " + str(hangtime) + " sec")
trap.move_to(waypoint="more streatch", speed=5)
timeprogression(hangtime, 5)
trap.move_to(waypoint="measure point", speed=5)
print("stretch done")

print("just hanging out for a bit for protein binding (" + str(proteintime) +
      " sec)")
timeprogression(proteintime, 5)
#turn on laser
excitation_lasers.green = 20

#start imaging
confocal.start_scan("SSB kymo")
print("Scan started: " + str(imagetime) + "sec")
timeprogression(imagetime, 10)

# stop imaging
confocal.abort_scan()
#turn off laser
excitation_lasers.green = 0
print("!!!! Scan ended !!!!")