#~ s.wait(-fstatedt)

#RELEASE FROM MOT
s.digichg('motswitch', 0)
s.digichg('motshutter', 1)
s.digichg('field', 0)

s.wait(tof)

#TAKE PICTURES
light = 'probe'
trap_on_picture = 1
#light = 'motswitch'
kinetics = gen.bstr('Kinetics', report)
print '...kinetics = ' + str(kinetics)
if kinetics == True:
    s, SERIESDT = andor.KineticSeries4(s, exp, light, noatoms, trap_on_picture)
else:
    s, SERIESDT = andor.FKSeries2(s, stepsize, exp, light, noatoms,
                                  trap_on_picture)

#After taking a picture sequence returns at time of the last probe strobe
#Wait 30ms to get past the end
s.wait(30.0)
s = gen.shutdown(s)
s.digichg('odtttl', 0)

s.save('L:/software/apparatus3/seq/seqstxt/expseq.txt')
s.clear_disk()

print '...Compilation = %.2f seconds\n' % (time.time() - t0)
s.wait(20.0)

#LOAD ODT
s, duration = uvcooling.run(s, 'ANDOR')

#RELEASE
s = gen.releaseMOT(s)
s.wait(tof)

#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)
    s.wait(-SERIESDT)
    s, BASLERDT = basler.Basler_AndorKineticSeries4(s, preexp, postexp, exp,
                                                    light, noatoms)
    s.wait(SERIESDT - BASLERDT)
else:
    s, SERIESDT = andor.FKSeries4(s, stepsize, exp, light, noatoms)
    s.wait(-SERIESDT)
    s, BASLERDT = basler.Basler_FKSeries2(s, preexp, postexp, exp, light,
                                          noatoms)
    s.wait(SERIESDT - BASLERDT)

#After taking a picture sequence returns at time of the last probe strobe
#Wait 30ms to get past the end
s.wait(30.0)
s = gen.shutdown(s)
s.digichg('odtttl',0)
s.wait(ODT.odttof)


#TAKE PICTURES
light = 'probe'
#light = 'motswitch'
#light = 'bragg'
if ODT.odttof <= 0.0:
    trap_on_picture = 1
else:
    trap_on_picture = 0
kinetics = gen.bstr('Kinetics',report)
print '...kinetics = ' + str(kinetics)
if kinetics == True:
	s,SERIESDT = andor.KineticSeries4(s,ANDOR.exp,light,ANDOR.noatoms, trap_on_picture)
	if EVAP.andor2 == 1:
		s.wait(-SERIESDT)
		s,SERIESDT = andor.KineticSeries4(s,ANDOR.exp,light,ANDOR.noatoms, trap_on_picture,trigger="cameratrig2")
else:
	if EVAP.andor2 == 1:
		sys.exit("Warning! The part of code with andor2 and kinetcs off has not been done.")
	s,SERIESDT = andor.FKSeries2(s,SEQ.stepsize,ANDOR.exp,light,ANDOR.noatoms, trap_on_picture)

#After taking a picture sequence returns at time of the last probe strobe
#Wait 30ms to get past the end
s.wait(30.0)
s=gen.shutdown(s)
s.digichg('odtttl',0)
s.digichg('odt7595',0)
Beispiel #4
0
s.tcur = imagetime
s = basler.BaslerPicture(s, preexp, texp, postexp, light)
#PICTURE OF BACKGROUND
s.wait(noatoms)
s.wait(noatoms)
s.wait(noatoms)
s = basler.BaslerPicture(s, preexp, texp, postexp, light)
print "Current time after BASLER = ", s.tcur

if 'andor' in cameras:
    s.tcur = imagetime
    print "Current time before Andor1 = ", s.tcur
    trap_on_picture = 1
    s, SERIESDT = andor.KineticSeries4(s,
                                       ANDOR.exp,
                                       light,
                                       noatoms,
                                       trap_on_picture,
                                       mock=True)
    print "Current time after Andor1 =", s.tcur

#After taking a picture sequence returns at time of the last probe strobe
#Wait 50ms to get past the end
s.wait(50.0)
s = gen.shutdown(s)
import seqconf
s.save(seqconf.seqtxtout())
s.save(__file__.split('.')[0] + '.txt')
s.save(__file__.split('.')[0] + '.txt')
s.clear_disk()

print '...Compilation = %.2f seconds\n' % (time.time() - t0)
#########################################
## PICTURES
#########################################
#TAKE PICTURES
trap_on_picture = 0

#####light = this is 'probe', 'motswitch' or 'bragg'
#####camera = this is 'andor' or 'manta'
if lbf.light == 'bragg':
    s = manta.OpenShutterBragg(s,lbf.shutterdelay)

if lbf.camera == 'andor':
	kinetics = gen.bstr('Kinetics',report)
	print '...kinetics = ' + str(kinetics)
	if kinetics == True:
		s,SERIESDT = andor.KineticSeries4(s,Andor.exp, lbf.light,Andor.noatoms, trap_on_picture)
	else:
		s,SERIESDT = andor.FKSeries2(s,stepsize,Andor.exp, lbf.light,Andor.noatoms, trap_on_picture)
		
elif lbf.camera == 'manta':
	#PICTURE OF ATOMS
	s=manta.MantaPicture(s, Manta.exp, lbf.light, 1)
	s.wait(Manta.noatoms)
	#RELEASE FROM ODT AND LATTICE
	odton_picture = 0
	print "...ODTTTL for the picture = ", odton_picture
	latticeon_picture = 0 if lbf.latticeoff <= 0. else 1
	s.digichg('quick2',0)
	s.digichg('odtttl',0)
	s.digichg('odt7595',0)
	s.digichg('ipgttl',0)