Ejemplo n.º 1
0
s.digichg('field',0)

freedt=float(report['UVLIGHTSHIFT']['freedt'])
pulse  = float(report['UVLIGHTSHIFT']['pulse'])
s.wait(freedt)
s.digichg('uvaom1',0)
s.wait(pulse)
s.digichg('uvaom1',0)
s.wait(tof-freedt-pulse)

#TAKE PICTURES
#probe = 'motswitch'
probe = 'probe'
#OPEN SHUTTERS
if probe == 'probe':
    s=andor.OpenShuttersProbe(s)
elif light == 'motswitch':
    s=andor.OpenShuttersFluor(s)
#PICTURE OF ATOMS
s=basler.BaslerPicture(s,preexp,texp,postexp,probe)
#PICTURE OF BACKGROUND
s.wait(noatoms)
s=basler.BaslerPicture(s,preexp,texp,postexp,probe)

#TAKE PICTURES
#~ light = 'probe'
#~ #light = 'motswitch'
#~ kinetics = gen.bstr('Kinetics',report)
#~ print 'kinetics = ' + str(kinetics)
#~ if kinetics == True:
    #~ s,SERIESDT = andor.KineticSeries4(s,exp,light,noatoms)
Ejemplo n.º 2
0
def Manta2_SmartBackground(s,
                           exp,
                           light,
                           noatoms,
                           bglist,
                           bgdictPRETOF=None,
                           enforcelight=1):
    #Takes a kinetic series of 4 exposures:  atoms, noatoms, atomsref, noatomsref

    #print s.digital_chgs_str(1000,100000.,['cameratrig','probe','odtttl','prshutter'])

    t0 = s.tcur

    #OPEN SHUTTERS
    if light == 'probe':
        s = andor.OpenShuttersProbe(s)
    elif light == 'motswitch':
        s = andor.OpenShuttersFluor(s)

    #print s.digital_chgs_str(1000,100000.,['cameratrig','probe','odtttl','prshutter'])

    bgdict = {}
    for ch in bglist:
        bgdict[ch] = s.digistatus(ch)

    #PICTURE OF ATOMS
    if enforcelight == 0:
        print "USE ARB FOR PICTURES? = YES"
        s.wait(-0.006)
        s.digichg(light, 1)
        s.wait(+0.006)
        s.digichg(light, 0)
    else:
        print "USE ARB FOR PICTURES? = NO"
    s = MantaPicture(s, exp, light, enforcelight)

    #print s.digital_chgs_str(1000,100000.,['cameratrig','probe','odtttl','prshutter'])

    #SHUT DOWN TRAP, THEN TURN BACK ON FOR SAME BACKGROUND
    #minimum time for no atoms is given by max trigger period in Andor settings

    s.wait(noatoms)
    s.digichg('quick2', 0)
    s.digichg('field', 0)
    s.digichg('odtttl', 0)
    s.digichg('irttl1', 0)
    s.digichg('irttl2', 0)
    s.digichg('irttl3', 0)
    s.digichg('greenttl1', 0)
    s.digichg('greenttl2', 0)
    s.digichg('greenttl3', 0)
    s.wait(noatoms)

    if bgdictPRETOF is not None:
        #RESTORE LIGHTS FOR BACKGROUND - PRETOF
        for key in bgdictPRETOF.keys():
            if key is not 'tof':
                s.digichg(key, bgdictPRETOF[key])
        s.wait(noatoms)

        tof = bgdictPRETOF['tof']
        if tof > 0:
            s.wait(-tof)
            for key in bgdict.keys():
                s.digichg(key, bgdict[key])
            s.wait(tof)
    else:
        #RESTORE LIGHTS FOR BACKGROUND
        for key in bgdict.keys():
            s.digichg(key, bgdict[key])
        s.wait(noatoms)

    #PICTURE OF BACKGROUND
    if enforcelight == 0:
        print "USE ARB FOR PICTURES? = YES"
        s.wait(-0.006)
        s.digichg(light, 1)
        s.wait(+0.006)
        s.digichg(light, 0)
    else:
        print "USE ARB FOR PICTURES? = NO"
    s = MantaPicture(s, exp, light, enforcelight)

    s.wait(noatoms * 1)
    s.digichg('odtttl', 0)
    s.digichg('irttl1', 0)
    s.digichg('irttl2', 0)
    s.digichg('irttl3', 0)
    s.digichg('greenttl1', 0)
    s.digichg('greenttl2', 0)
    s.digichg('greenttl3', 0)

    tf = s.tcur
    return s, tf - t0