Exemplo n.º 1
0
def crossbeam_evap_field(s, toENDBFIELD):
    # Add evaporation ramp to ODT, returns sequence right at the end of evaporation
    free = float(report['EVAP']['free'])
    image = float(report['EVAP']['image'])
    buffer = 10.0  #Time needed to re-latch the trigger for the AOUTS
    if free < buffer + toENDBFIELD:
        print 'Need at list ' + str(
            buffer) + 'ms of free evap before evaporation can be triggered'
        print 'Currently ramps end at %f , and free is %f' % (toENDBFIELD,
                                                              free)
        exit(1)
    s.wait(free)
    bfield, odtpow, ENDEVAP, cpowend, ipganalog = odt_evap_field(image)
    evap_ss = float(report['EVAP']['evapss'])

    # Set LCR preset value in the begining of evap 1 is lattice 0 is dimple
    lcr_preset = float(report['EVAP']['lcr_preset'])
    lcr1 = lattice.lattice_wave('lcr1', lcr_preset, evap_ss)
    lcr2 = lattice.lattice_wave('lcr2', lcr_preset, evap_ss)
    lcr3 = lattice.lattice_wave('lcr3', lcr_preset, evap_ss)
    lcr1.extend(ENDEVAP)
    lcr2.extend(ENDEVAP)
    lcr3.extend(ENDEVAP)

    s.analogwfm_add(evap_ss, [odtpow, ipganalog, bfield, lcr1, lcr2, lcr3])
    #s.analogwfm_add(evap_ss,[odtpow])
    # ENDEVAP should be equal to image
    s.wait(image)
    return s, cpowend
Exemplo n.º 2
0
def crossbeam_evap_field(s, toENDBFIELD):
	# Add evaporation ramp to ODT, returns sequence right at the end of evaporation
	buffer=10.0 #Time needed to re-latch the trigger for the AOUTS
	if EVAP.free < buffer + toENDBFIELD :
		print 'Need at list ' + str(buffer) + 'ms of free evap before evaporation can be triggered'
		print 'Currently ramps end at %f , and free is %f' % (toENDBFIELD,EVAP.free)
		exit(1)
	s.wait(EVAP.free)
	
	bfield, odtpow, ENDEVAP, cpowend, ipganalog = odt_evap_field()
	
	# Set LCR preset value in the begining of evap 1 is lattice 0 is dimple
	lcr1  = lattice.lattice_wave('lcr1', EVAP.lcr_preset, EVAP.evapss)
	lcr2  = lattice.lattice_wave('lcr2', EVAP.lcr_preset, EVAP.evapss)
	lcr3  = lattice.lattice_wave('lcr3', EVAP.lcr_preset, EVAP.evapss)
	lcr1.extend(ENDEVAP)
	lcr2.extend(ENDEVAP)
	lcr3.extend(ENDEVAP)
	
	s.analogwfm_add(EVAP.evapss,[odtpow,ipganalog, bfield,lcr1,lcr2,lcr3])
	
	#Add quick jump to help go to final evaporation field
	if ( EVAP.use_field_ramp == 1 and  EVAP.image > EVAP.fieldrampt0):
		s.wait( EVAP.fieldrampt0 )
		s.wait(-25.0)
		s.digichg('hfquick',1)
		s.digichg('quick',1)
		s.wait(75.0)
		s.digichg('hfquick',0)
		s.digichg('quick',0)
		s.wait(-50.0)
		s.wait(-EVAP.fieldrampt0)
	
	s.wait(EVAP.image)
	return s, cpowend
    def latticepow(ch):
        ss = DIMPLE.analogss
        if 'gr' in ch:
            n = filter(str.isdigit, ch)[0]
            chname = 'greenpow' + n
            correction = DIMPLE.__dict__['gr' + n + 'correct']
        else:
            chname = ch
            correction = 1.0
        #print "Start %s = %f" % (chname, DIMPLE.__dict__[ch])
        if 'gr' in ch:
            w = lattice.lattice_wave(chname,
                                     correction * DIMPLE.__dict__[ch + '2'],
                                     ss)
        else:
            if DIMPLE.allirpow >= 0:
                w = lattice.lattice_wave(chname, correction * DIMPLE.allirpow,
                                         ss)
            else:
                w = lattice.lattice_wave(
                    chname, correction * DIMPLE.__dict__[ch + '2'], ss)

        w.appendhold(bfield.dt() - ZC.zcdt + DIMPLE.tlattice +
                     DIMPLE.lattice_t0)
        #print "Last voltage before tanhRise (%s) =  %f" % (ch,w.last())
        w.tanhRise(correction * DIMPLE.__dict__[ch + '_v0'], DIMPLE.lattice_dt,
                   DIMPLE.ir_tau, DIMPLE.ir_shift)
        w.appendhold(DIMPLE.lattice_hold)
        return w
Exemplo n.º 4
0
def crossbeam_evap_field(s, toENDBFIELD):
	# Add evaporation ramp to ODT, returns sequence right at the end of evaporation
	free = float(report['EVAP']['free'])
	image= float(report['EVAP']['image'])
	buffer=10.0 #Time needed to re-latch the trigger for the AOUTS
	if free < buffer + toENDBFIELD :
		print 'Need at list ' + str(buffer) + 'ms of free evap before evaporation can be triggered'
		print 'Currently ramps end at %f , and free is %f' % (toENDBFIELD,free)
		exit(1)
	s.wait(free)
	bfield, odtpow, ENDEVAP, cpowend, ipganalog = odt_evap_field(image)
	evap_ss = float(report['EVAP']['evapss'])
	
	
	# Set LCR preset value in the begining of evap 1 is lattice 0 is dimple
	lcr_preset = float(report['EVAP']['lcr_preset'])	
	lcr1  = lattice.lattice_wave('lcr1',lcr_preset, evap_ss)
	lcr2  = lattice.lattice_wave('lcr2', lcr_preset, evap_ss)
	lcr3  = lattice.lattice_wave('lcr3', lcr_preset, evap_ss)
	lcr1.extend(ENDEVAP)
	lcr2.extend(ENDEVAP)
	lcr3.extend(ENDEVAP)	
	
	s.analogwfm_add(evap_ss,[odtpow,ipganalog, bfield,lcr1,lcr2,lcr3])
	#s.analogwfm_add(evap_ss,[odtpow])
	# ENDEVAP should be equal to image
	s.wait(image)
	return s, cpowend
Exemplo n.º 5
0
def crossbeam_evap_field_into_lattice(s, toENDBFIELD):
	# Add evaporation ramp to ODT, returns sequence right at the end of evaporation
	buffer=10.0 #Time needed to re-latch the trigger for the AOUTS
	if EVAP.free < buffer + toENDBFIELD :
		print 'Need at list ' + str(buffer) + 'ms of free evap before evaporation can be triggered'
		print 'Currently ramps end at %f , and free is %f' % (toENDBFIELD,EVAP.free)
		exit(1)
	s.wait(EVAP.free)
	bfield, odtpow, ENDEVAP, cpowend, ipganalog = odt_evap_field()
	
	#---Set LCR preset value in the begining of evap 1 is lattice 0 is dimple
	lcr1  = lattice.lattice_wave('lcr1', EVAP.lcr_preset, EVAP.evapss)
	lcr2  = lattice.lattice_wave('lcr2', EVAP.lcr_preset, EVAP.evapss)
	lcr3  = lattice.lattice_wave('lcr3', EVAP.lcr_preset, EVAP.evapss)
	lcr1.extend(ENDEVAP)
	lcr2.extend(ENDEVAP)
	lcr3.extend(ENDEVAP)
	
	#---Ramp up IR, GR beams
	def rampup( ch, pow ):
		w = lattice.lattice_wave(ch, 0., EVAP.evapss)
		w.appendhold( EVAP.latticet0 )
		w.tanhRise( pow, EVAP.latticedt, EVAP.tanhtau, EVAP.tanhshift )
		
	ir1 = rampup('ir1pow', EVAP.irpow)
	ir2 = rampup('ir2pow', EVAP.irpow)
	ir3 = rampup('ir3pow', EVAP.irpow)
	gr1 = rampup('greenpow1', EVAP.grpow)
	gr2 = rampup('greenpow2', EVAP.grpow)
	gr3 = rampup('greenpow3', EVAP.grpow)
	
	#---Turn on TTLs
	s.wait(EVAP.latticet0)
	s.digichg( 'irttl1', EVAP.irttl1)
	s.digichg( 'irttl2', EVAP.irttl2)
	s.digichg( 'irttl3', EVAP.irttl3)
	s.digichg( 'greenttl1', EVAP.irttl1)
	s.digichg( 'greenttl2', EVAP.irttl2)
	s.digichg( 'greenttl3', EVAP.irttl3)
	s.wait(-EVAP.latticet0)
	
	
	s.analogwfm_add(EVAP.evapss,[odtpow,ipganalog, bfield,ir1,ir2,ir3,gr1,gr2,gr3,lcr1,lcr2,lcr3])
	
	#Add quick jump to help go to final evaporation field
	if ( EVAP.use_field_ramp == 1 and  EVAP.image > EVAP.fieldrampt0):
		s.wait( EVAP.fieldrampt0 )
		s.wait(-25.0)
		s.digichg('hfquick',1)
		s.digichg('quick',1)
		s.wait(75.0)
		s.digichg('hfquick',0)
		s.digichg('quick',0)
		s.wait(-50.0)
		s.wait(-EVAP.fieldrampt0)
	
	s.wait(EVAP.image)
	
	return s, cpowend
Exemplo n.º 6
0
def crossbeam_evap_into_lattice(s, toENDBFIELD):
	# Add evaporation ramp to ODT, returns sequence right at the end of evaporation
	buffer=10.0 #Time needed to re-latch the trigger for the AOUTS
	if EVAP.free < buffer + toENDBFIELD :
		print 'Need at list ' + str(buffer) + 'ms of free evap before evaporation can be triggered'
		print 'Currently ramps end at %f , and free is %f' % (toENDBFIELD, EVAP.free)
		exit(1)
	s.wait(EVAP.free)
	odtpow, ENDEVAP, cpowend, ipganalog = odt_evap()
	# ENDEVAP should be equal to image
	
	# Set LCR preset value in the begining of evap 1 is lattice 0 is dimple
	lcr1  = lattice.lattice_wave('lcr1', EVAP.lcr_preset, EVAP.evapss)
	lcr2  = lattice.lattice_wave('lcr2', EVAP.lcr_preset, EVAP.evapss)
	lcr3  = lattice.lattice_wave('lcr3', EVAP.lcr_preset, EVAP.evapss)
	lcr1.extend(ENDEVAP)
	lcr2.extend(ENDEVAP)
	lcr3.extend(ENDEVAP)
	
	#---Ramp up IR and green beams
	def rampup(ch, ss, END, load, delay, pow, dt):
		w = wfm.wave(ch, 0., ss) 
		w.appendhold( END - load)
		w.appendhold( delay)
		w.linear( pow, dt)
		return w 
	
	ir1 = rampup('ir1pow', EVAP.evapss, ENDEVAP, IL.loadtime, IL.irdelay1, IL.irpow1, IL.irrampdt1)
	ir2 = rampup('ir2pow', EVAP.evapss, ENDEVAP, IL.loadtime, IL.irdelay2, IL.irpow2, IL.irrampdt1)
	ir3 = rampup('ir3pow', EVAP.evapss, ENDEVAP, IL.loadtime, IL.irdelay3, IL.irpow3, IL.irrampdt1)
	
	gr1 = rampup('greenpow1', EVAP.evapss, ENDEVAP, IL.loadtime, IL.grdelay1, IL.grpow1, IL.grrampdt1)
	gr2 = rampup('greenpow2', EVAP.evapss, ENDEVAP, IL.loadtime, IL.grdelay2, IL.grpow2, IL.grrampdt1)
	gr3 = rampup('greenpow3', EVAP.evapss, ENDEVAP, IL.loadtime, IL.grdelay3, IL.grpow3, IL.grrampdt1)

	end = s.analogwfm_add(EVAP.evapss,[odtpow,ir1,ir2,ir3,gr1,gr2,gr3,lcr1,lcr2,lcr3])
	s.wait(EVAP.image-IL.loadtime)
	
	#---Turn on IR lattice beams
	def ttlon( s, delay, ch, bool ):
		s.wait(delay)
		s.digichg( ch, bool)
		s.wait(-delay)
		
	ttlon( s, IL.irdelay1, 'irttl1', IL.ir1)
	ttlon( s, IL.irdelay2, 'irttl2', IL.ir2)
	ttlon( s, IL.irdelay3, 'irttl3', IL.ir3)
	ttlon( s, IL.grdelay1, 'grttl1', IL.gr1)
	ttlon( s, IL.grdelay2, 'grttl2', IL.gr2)
	ttlon( s, IL.grdelay3, 'grttl3', IL.gr3)
	
	
	s.wait( IL.loadtime + end - EVAP.image)	
	
	return s
Exemplo n.º 7
0
def crossbeam_evap_field_into_lattice(s, toENDBFIELD):
    #GET SECTION CONTENTS
    evp = gen.getsection('EVAP')
    lbf = gen.getsection('LATTICEBRAGGFIELD')
    # Add evaporation ramp to ODT, returns sequence right at the end of evaporation
    free = float(report['EVAP']['free'])
    image = float(report['EVAP']['image'])
    buffer = 10.0  #Time needed to re-latch the trigger for the AOUTS
    if free < buffer + toENDBFIELD:
        print 'Need at list ' + str(
            buffer) + 'ms of free evap before evaporation can be triggered'
        print 'Currently ramps end at %f , and free is %f' % (toENDBFIELD,
                                                              free)
        exit(1)
    s.wait(free)
    bfield, odtpow, ENDEVAP, cpowend, ipganalog = odt_evap_field(image)
    evap_ss = float(report['EVAP']['evapss'])

    # Set LCR preset value in the begining of evap 1 is lattice 0 is dimple
    lcr_preset = float(report['EVAP']['lcr_preset'])
    lcr1 = lattice.lattice_wave('lcr1', lcr_preset, evap_ss)
    lcr2 = lattice.lattice_wave('lcr2', lcr_preset, evap_ss)
    lcr3 = lattice.lattice_wave('lcr3', lcr_preset, evap_ss)
    lcr1.extend(ENDEVAP)
    lcr2.extend(ENDEVAP)
    lcr3.extend(ENDEVAP)

    ir1 = lattice.lattice_wave('ir1pow', 0., evap_ss)
    ir2 = lattice.lattice_wave('ir2pow', 0., evap_ss)
    ir3 = lattice.lattice_wave('ir3pow', 0., evap_ss)

    gr1 = lattice.lattice_wave('greenpow1', 0., evap_ss)
    gr2 = lattice.lattice_wave('greenpow2', 0., evap_ss)
    gr3 = lattice.lattice_wave('greenpow3', 0., evap_ss)

    all = [ir1, ir2, ir3, gr1, gr2, gr3]
    pow = [evp.irpow, evp.irpow, evp.irpow, evp.grpow, evp.grpow, evp.grpow]

    for i, ch in enumerate(all):
        ch.appendhold(evp.latticet0)
        ch.tanhRise(pow[i], evp.latticedt, evp.tanhtau, evp.tanhshift)

    s.wait(evp.latticet0)
    s.digichg('irttl1', evp.irttl1)
    s.digichg('irttl2', evp.irttl2)
    s.digichg('irttl3', evp.irttl3)
    s.digichg('greenttl1', evp.irttl1)
    s.digichg('greenttl2', evp.irttl2)
    s.digichg('greenttl3', evp.irttl3)
    s.wait(-evp.latticet0)

    s.analogwfm_add(evap_ss, [
        odtpow, ipganalog, bfield, ir1, ir2, ir3, gr1, gr2, gr3, lcr1, lcr2,
        lcr3
    ])

    # ENDEVAP should be equal to image
    s.wait(image)
    return s, cpowend
Exemplo n.º 8
0
def crossbeam_evap_field_into_lattice(s, toENDBFIELD):
	#GET SECTION CONTENTS
	evp = gen.getsection('EVAP')
	lbf  = gen.getsection('LATTICEBRAGGFIELD')
	# Add evaporation ramp to ODT, returns sequence right at the end of evaporation
	free = float(report['EVAP']['free'])
	image= float(report['EVAP']['image'])
	buffer=10.0 #Time needed to re-latch the trigger for the AOUTS
	if free < buffer + toENDBFIELD :
		print 'Need at list ' + str(buffer) + 'ms of free evap before evaporation can be triggered'
		print 'Currently ramps end at %f , and free is %f' % (toENDBFIELD,free)
		exit(1)
	s.wait(free)
	bfield, odtpow, ENDEVAP, cpowend, ipganalog = odt_evap_field(image)
	evap_ss = float(report['EVAP']['evapss'])
	
	# Set LCR preset value in the begining of evap 1 is lattice 0 is dimple
	lcr_preset = float(report['EVAP']['lcr_preset'])	
	lcr1  = lattice.lattice_wave('lcr1',lcr_preset, evap_ss)
	lcr2  = lattice.lattice_wave('lcr2', lcr_preset, evap_ss)
	lcr3  = lattice.lattice_wave('lcr3', lcr_preset, evap_ss)
	lcr1.extend(ENDEVAP)
	lcr2.extend(ENDEVAP)
	lcr3.extend(ENDEVAP)
	
	ir1  = lattice.lattice_wave('ir1pow', 0., evap_ss)
	ir2  = lattice.lattice_wave('ir2pow', 0., evap_ss)
	ir3  = lattice.lattice_wave('ir3pow', 0., evap_ss)
	
	gr1  = lattice.lattice_wave('greenpow1', 0., evap_ss)
	gr2  = lattice.lattice_wave('greenpow2', 0., evap_ss)
	gr3  = lattice.lattice_wave('greenpow3', 0., evap_ss)
	
	all = [ir1,ir2,ir3,gr1,gr2,gr3]
	pow = [evp.irpow, evp.irpow, evp.irpow, evp.grpow, evp.grpow, evp.grpow]
	
	for i,ch in enumerate(all):
	  ch.appendhold( evp.latticet0 )
	  ch.tanhRise(pow[i], evp.latticedt, evp.tanhtau, evp.tanhshift)
	
	s.wait(evp.latticet0)
	s.digichg( 'irttl1', evp.irttl1)
	s.digichg( 'irttl2', evp.irttl2)
	s.digichg( 'irttl3', evp.irttl3)
	s.digichg( 'greenttl1', evp.irttl1)
	s.digichg( 'greenttl2', evp.irttl2)
	s.digichg( 'greenttl3', evp.irttl3)
	s.wait(-evp.latticet0)
	
	
	s.analogwfm_add(evap_ss,[odtpow,ipganalog, bfield,ir1,ir2,ir3,gr1,gr2,gr3,lcr1,lcr2,lcr3])
	
	

	# ENDEVAP should be equal to image
	s.wait(image)
	return s, cpowend
Exemplo n.º 9
0
	def rampup( ch ):
		
		w = lattice.lattice_wave(ch, 0., EVAP.evapss)
		
		if 'ir' in ch:
			n=filter( str.isdigit, ch)[0]
			w.appendhold( DIMPLE.ir_t0 )
			#n='1'
			w.tanhRise( DIMPLE.__dict__['ir'+n+'pow0'], DIMPLE.ir_dt, DIMPLE.ir_tau, DIMPLE.ir_shift)
			print "##### IRPOW.DT() = % f " % w.dt()
			w.extend( odtpow.dt() )
			w.appendhold( DIMPLE.compress_t0)
			w.tanhRise( DIMPLE.__dict__['ir'+n+'pow'], DIMPLE.compress_dt, DIMPLE.ir_tau, DIMPLE.ir_shift)

			
		elif 'green' in ch:
			n=filter( str.isdigit, ch)[0]
			w.appendhold( DIMPLE.gr_t0 )
			w.tanhRise( DIMPLE.__dict__['gr'+n+'pow0'], DIMPLE.gr_dt, DIMPLE.gr_tau, DIMPLE.gr_shift)
			w.extend( odtpow.dt() )
			w.appendhold( DIMPLE.compress_t0)
			w.tanhRise( DIMPLE.__dict__['gr'+n+'pow'], DIMPLE.compress_dt, DIMPLE.gr_tau, DIMPLE.gr_shift)
			
		else:
			print "Error ramping up IR,GR beams in crossbeam_dimple_evap"
			
		return w
 def latticepow(ch):
     ss = DIMPLE.analogss
     if 'gr' in ch:
         n=filter( str.isdigit, ch)[0]
         chname = 'greenpow' + n
         correction = DIMPLE.__dict__['gr'+n+'correct']
     else:
         chname = ch
         correction = 1.0
     #print "Start %s = %f" % (chname, DIMPLE.__dict__[ch])
     if 'gr' in ch:
         w = lattice.lattice_wave(chname, correction*DIMPLE.__dict__[ch+'2'], ss) 
     else:
         w = lattice.lattice_wave(chname, correction*DIMPLE.__dict__['allirpow'], ss) 
     
     w.appendhold( DIMPLE.lattice_t0)
     #print "Last voltage before tanhRise (%s) =  %f" % (ch,w.last())
     w.tanhRise( correction*DIMPLE.__dict__[ch+'_v0'], DIMPLE.lattice_dt, DIMPLE.ir_tau, DIMPLE.ir_shift)
     return w 
Exemplo n.º 11
0
	def rampup( ch ):
		
		w = lattice.lattice_wave(ch, 0., EVAP.evapss)
		
		if 'ir' in ch:
			n=filter( str.isdigit, ch)[0]
			
			if DIMPLE.allirpow < 0. and DIMPLE.loadirpow < 0.:
				pow0 = DIMPLE.__dict__['ir'+n+'pow0']
				pow1 = DIMPLE.__dict__['ir'+n+'pow1']
				pow2 = DIMPLE.__dict__['ir'+n+'pow2']
                        elif DIMPLE.allirpow < 0. :
                                pow0 = DIMPLE.loadirpow
                                pow1 = DIMPLE.loadirpow
                                pow2 = DIMPLE.__dict__['ir'+n+'pow2']
			else:
				pow0 = DIMPLE.allirpow
				pow1 = DIMPLE.allirpow
				pow2 = DIMPLE.allirpow
			
			w.appendhold( DIMPLE.ir_t0 )
			w.tanhRise(pow0 , DIMPLE.ir_dt0, DIMPLE.ir_tau, DIMPLE.ir_shift)
                        #print "\ttanhrise LAST = ",w.y[-1] 
			print "##### IRPOW.DT() = % f " % w.dt()
			w.extend( odtpow.dt() )
			w.appendhold( DIMPLE.ir_t1)
			w.tanhRise(pow1 , DIMPLE.ir_dt1, DIMPLE.ir_tau, DIMPLE.ir_shift)
                        #print "\ttanhrise LAST = ",w.y[-1] 
			w.appendhold( DIMPLE.ir_t2)
			w.tanhRise(pow2 , DIMPLE.ir_dt2, DIMPLE.ir_tau, DIMPLE.ir_shift)
                        #print "\ttanhrise LAST = ",w.y[-1] 

			
		elif 'green' in ch:
			n=filter( str.isdigit, ch)[0]
			w.appendhold( DIMPLE.gr_t0 )
			
			correction = DIMPLE.__dict__['gr'+n+'correct']
			pow0 = correction * DIMPLE.__dict__['gr'+n+'pow0'] 
			pow1 = correction * DIMPLE.__dict__['gr'+n+'pow1'] 
			pow2 = correction * DIMPLE.__dict__['gr'+n+'pow2']

                        print "GR"+ n + " POWERS = %.2f\t%.2f\t%.2f" % (pow0,pow1,pow2)
			
			w.tanhRise( pow0, DIMPLE.gr_dt0, DIMPLE.gr_tau, DIMPLE.gr_shift)
			w.extend( odtpow.dt() )
			w.appendhold( DIMPLE.gr_t1)
			w.tanhRise( pow1, DIMPLE.gr_dt1, DIMPLE.gr_tau, DIMPLE.gr_shift)
			w.appendhold( DIMPLE.gr_t2)
			w.tanhRise( pow2, DIMPLE.gr_dt2, DIMPLE.gr_tau, DIMPLE.gr_shift)
			
		else:
			print "Error ramping up IR,GR beams in crossbeam_dimple_evap"
			
		return w
Exemplo n.º 12
0
def crossbeam_evap(s, toENDBFIELD):
	# Add evaporation ramp to ODT, returns sequence right at the end of evaporation
	buffer=10.0 #Time needed to re-latch the trigger for the AOUTS
	if EVAP.free < buffer + toENDBFIELD :
		print 'Need at list ' + str(buffer) + 'ms of free evap before evaporation can be triggered'
		print 'Currently ramps end at %f , and free is %f' % (toENDBFIELD,EVAP.free)
		exit(1)
	s.wait(EVAP.free)
	odtpow, ENDEVAP, cpowend, ipganalog = odt_evap()
	
	# Set LCR preset value in the begining of evap 1 is lattice 0 is dimple
	lcr1  = lattice.lattice_wave('lcr1', EVAP.lcr_preset, EVAP.evapss)
	lcr2  = lattice.lattice_wave('lcr2', EVAP.lcr_preset, EVAP.evapss)
	lcr3  = lattice.lattice_wave('lcr3', EVAP.lcr_preset, EVAP.evapss)
	lcr1.extend(ENDEVAP)
	lcr2.extend(ENDEVAP)
	lcr3.extend(ENDEVAP)
	
	s.analogwfm_add(EVAP.evapss,[odtpow,ipganalog,lcr1,lcr2,lcr3])
	# ENDEVAP should be equal to image
	s.wait(EVAP.image)
	return s, cpowend
Exemplo n.º 13
0
	def rampup( ch ):
		
		w = lattice.lattice_wave(ch, 0., EVAP.evapss)
		
		if 'ir' in ch:
			n=filter( str.isdigit, ch)[0]
			w.appendhold( DIMPLE.ir_t0 )
			w.tanhRise( DIMPLE.__dict__['ir'+n+'pow'], DIMPLE.ir_dt, DIMPLE.ir_tau, DIMPLE.ir_shift)
			
		elif 'green' in ch:
			n=filter( str.isdigit, ch)[0]
			w.appendhold( DIMPLE.gr_t0 )
			w.tanhRise( DIMPLE.__dict__['gr'+n+'pow'], DIMPLE.gr_dt, DIMPLE.gr_tau, DIMPLE.gr_shift)
			
		else:
			print "Error ramping up IR,GR beams in crossbeam_dimple_evap"
			
		return w
# Ramp B Field to intermediate value 
bfield = wfm.wave('bfield', evap.fieldrampfinal ,ir_ss)
bfield.appendhold( lbf.brampdelay1 )
bfield.linear( lbf.bstage1, lbf.brampdt1 )
# With respect to the start of the sequence, set QUICK2 pulse
s.wait(-lbf.quick2time + lbf.brampdelay1 )
if lbf.usequick2 == 1:
	s.digichg('quick2',1)
else:
	s.digichg('quick2',0)
s.wait( lbf.quick2time - lbf.brampdelay1 )


    
# Ramp up IR and green beams and LCR to intermediate value 
ir1  = lattice.lattice_wave('ir1pow', ir_p0, ir_ss,volt=-11)
ir2  = lattice.lattice_wave('ir2pow', ir_p0, ir_ss,volt=-11)
ir3  = lattice.lattice_wave('ir3pow', ir_p0, ir_ss,volt=-11)
ir1.appendhold( lbf.ir1delay1 )
ir2.appendhold( lbf.ir2delay1 )
ir3.appendhold( lbf.ir3delay1 )
if lbf.tanhrise == 1.0:
    ir1.tanhRise(lbf.ir1pow1,lbf.ir1rampdt1, lbf.tanhtau, lbf.tanhshift)
    ir2.tanhRise(lbf.ir2pow1,lbf.ir2rampdt1, lbf.tanhtau, lbf.tanhshift)
    ir3.tanhRise(lbf.ir3pow1,lbf.ir3rampdt1, lbf.tanhtau, lbf.tanhshift)
elif lbf.sinhrise == 1.0:
    ir1.sinhRise(lbf.ir1pow1,lbf.ir1rampdt1, lbf.ir1rampdt1 * lbf.sinhtau)
    ir2.sinhRise(lbf.ir2pow1,lbf.ir2rampdt1, lbf.ir2rampdt1 * lbf.sinhtau)
    ir3.sinhRise(lbf.ir3pow1,lbf.ir3rampdt1, lbf.ir3rampdt1 * lbf.sinhtau)
else:
    ir1.linear(lbf.ir1pow1,lbf.ir1rampdt1, volt=-11)
Exemplo n.º 15
0
def crossbeam_evap_into_lattice(s, toENDBFIELD):
	# Add evaporation ramp to ODT, returns sequence right at the end of evaporation
	free = float(report['EVAP']['free'])
	image= float(report['EVAP']['image'])
	buffer=10.0 #Time needed to re-latch the trigger for the AOUTS
	if free < buffer + toENDBFIELD :
		print 'Need at list ' + str(buffer) + 'ms of free evap before evaporation can be triggered'
		print 'Currently ramps end at %f , and free is %f' % (toENDBFIELD,free)
		exit(1)
	s.wait(free)
	odtpow, ENDEVAP, cpowend, ipganalog = odt_evap(image)
	# ENDEVAP should be equal to image
	evap_ss = float(report['EVAP']['evapss'])
	
	# Set LCR preset value in the begining of evap 1 is lattice 0 is dimple
	lcr_preset = float(report['EVAP']['lcr_preset'])
	lcr1  = lattice.lattice_wave('lcr1',lcr_preset, evap_ss)
	lcr2  = lattice.lattice_wave('lcr2', lcr_preset, evap_ss)
	lcr3  = lattice.lattice_wave('lcr3', lcr_preset, evap_ss)
	lcr1.extend(ENDEVAP)
	lcr2.extend(ENDEVAP)
	lcr3.extend(ENDEVAP)
	
	# Ramp up IR and green beams
	irramp1 = float(report['INTOLATTICE']['irrampdt1'])
	irramp2 = float(report['INTOLATTICE']['irrampdt2'])
	irramp3 = float(report['INTOLATTICE']['irrampdt3'])
	irdelay1 = float(report['INTOLATTICE']['irdelay1'])
	irdelay2 = float(report['INTOLATTICE']['irdelay2'])
	irdelay3 = float(report['INTOLATTICE']['irdelay3'])

	ir1  = wfm.wave('ir1pow', 0., evap_ss)
	ir2  = wfm.wave('ir2pow', 0., evap_ss)
	ir3  = wfm.wave('ir3pow', 0., evap_ss)
	
	loadtime = float(report['INTOLATTICE']['loadtime'])
	
	ir1.appendhold( ENDEVAP - loadtime)
	ir2.appendhold( ENDEVAP - loadtime)
	ir3.appendhold( ENDEVAP - loadtime)

	ir1.appendhold(irdelay1)
	ir2.appendhold(irdelay2)
	ir3.appendhold(irdelay3)

	ir1.linear(float(report['INTOLATTICE']['irpow1']),irramp1)
	ir2.linear(float(report['INTOLATTICE']['irpow2']),irramp2)
	ir3.linear(float(report['INTOLATTICE']['irpow3']),irramp3)

	gr1  = wfm.wave('greenpow1', 0., evap_ss)
	gr2  = wfm.wave('greenpow2', 0., evap_ss)
	gr3  = wfm.wave('greenpow3', 0., evap_ss)
	
	gr1.appendhold( ENDEVAP - loadtime)
	gr2.appendhold( ENDEVAP - loadtime)
	gr3.appendhold( ENDEVAP - loadtime)

	grdelay1 = float(report['INTOLATTICE']['grdelay1'])
	grdelay2 = float(report['INTOLATTICE']['grdelay2'])
	grdelay3 = float(report['INTOLATTICE']['grdelay3'])

	gr1.appendhold(grdelay1)
	gr2.appendhold(grdelay2)
	gr3.appendhold(grdelay3)

	grramp1 = float(report['INTOLATTICE']['grrampdt1'])
	grramp2 = float(report['INTOLATTICE']['grrampdt2'])
	grramp3 = float(report['INTOLATTICE']['grrampdt3'])
	gr1.linear(float(report['INTOLATTICE']['grpow1']),grramp1)
	gr2.linear(float(report['INTOLATTICE']['grpow2']),grramp2)
	gr3.linear(float(report['INTOLATTICE']['grpow3']),grramp3)

	
	#end = s.analogwfm_add(evap_ss,[odtpow,ipganalog,ir1,ir2,ir3,gr1,gr2,gr3])
	end = s.analogwfm_add(evap_ss,[odtpow,ir1,ir2,ir3,gr1,gr2,gr3,lcr1,lcr2,lcr3])
	
	
	s.wait(image-loadtime)
	
	# Turn on IR lattice beams
	s.wait(irdelay1)
	s.digichg('irttl1', float(report['INTOLATTICE']['ir1']) )
	s.wait(-irdelay1+irdelay2)
	s.digichg('irttl2', float(report['INTOLATTICE']['ir2']) )
	s.wait(-irdelay2+irdelay3)
	s.digichg('irttl3', float(report['INTOLATTICE']['ir3']) )
	s.wait(-irdelay3)

	s.wait(grdelay1)
	s.digichg('greenttl1', float(report['INTOLATTICE']['gr1']) )
	s.wait(-grdelay1+grdelay2)
	s.digichg('greenttl2', float(report['INTOLATTICE']['gr2']) )
	s.wait(-grdelay2+grdelay3)
	s.digichg('greenttl3', float(report['INTOLATTICE']['gr3']) )
	s.wait(-grdelay3)
	
	s.wait(loadtime + end - image)	
	
	return s
Exemplo n.º 16
0
	def dimpleset(ch):
		w = lattice.lattice_wave(ch, DIMPLE.alpha, EVAP.evapss)
		w.extend(ENDEVAP)
		return w
Exemplo n.º 17
0
	def rampup( ch, pow ):
		w = lattice.lattice_wave(ch, 0., EVAP.evapss)
		w.appendhold( EVAP.latticet0 )
		w.tanhRise( pow, EVAP.latticedt, EVAP.tanhtau, EVAP.tanhshift )
    s.digichg('latticemodttl', 1)
    agilentpulselen = 1.0
    s.wait(agilentpulselen)
    s.digichg('latticemodttl', 0)
    s.wait(-agilentpulselen)
    s.wait( DIMPLE.oscdt) 
    
#--- Measure lattice depth by lattice modulation
elif DIMPLE.latticemod == 1:
    
    #Add some buffer time to allow for ramp loading
    buffer = 20.0
    s.wait(buffer) 
    
    #First rotators are set
    lcr1  = lattice.lattice_wave('lcr1', DIMPLE.alpha1,  DIMPLE.analogss)
    lcr2  = lattice.lattice_wave('lcr2', DIMPLE.alpha2,  DIMPLE.analogss)
    lcr3  = lattice.lattice_wave('lcr3', DIMPLE.alpha3,  DIMPLE.analogss)
    
    lcr1.y = lcr1.y + DIMPLE.alphaV1
    
    
    print "...PREPARING LATTICE MOD:"
    #Then power is changed on the IR  and GR beams
    def latticepow(ch):
        ss = DIMPLE.analogss
        if 'gr' in ch:
            n=filter( str.isdigit, ch)[0]
            chname = 'greenpow' + n
            correction = DIMPLE.__dict__['gr'+n+'correct']
        else:
Exemplo n.º 19
0
#########################################

# Ramp B Field to intermediate value
bfield = wfm.wave('bfield', evap.fieldrampfinal, ir_ss)
bfield.appendhold(lbf.brampdelay1)
bfield.linear(lbf.bstage1, lbf.brampdt1)
# With respect to the start of the sequence, set QUICK2 pulse
s.wait(-lbf.quick2time + lbf.brampdelay1)
if lbf.usequick2 == 1:
    s.digichg('quick2', 1)
else:
    s.digichg('quick2', 0)
s.wait(lbf.quick2time - lbf.brampdelay1)

# Ramp up IR and green beams and LCR to intermediate value
ir1 = lattice.lattice_wave('ir1pow', ir_p0, ir_ss, volt=-11)
ir2 = lattice.lattice_wave('ir2pow', ir_p0, ir_ss, volt=-11)
ir3 = lattice.lattice_wave('ir3pow', ir_p0, ir_ss, volt=-11)
ir1.appendhold(lbf.ir1delay1)
ir2.appendhold(lbf.ir2delay1)
ir3.appendhold(lbf.ir3delay1)
if lbf.tanhrise == 1.0:
    ir1.tanhRise(lbf.ir1pow1, lbf.ir1rampdt1, lbf.tanhtau, lbf.tanhshift)
    ir2.tanhRise(lbf.ir2pow1, lbf.ir2rampdt1, lbf.tanhtau, lbf.tanhshift)
    ir3.tanhRise(lbf.ir3pow1, lbf.ir3rampdt1, lbf.tanhtau, lbf.tanhshift)
elif lbf.sinhrise == 1.0:
    ir1.sinhRise(lbf.ir1pow1, lbf.ir1rampdt1, lbf.ir1rampdt1 * lbf.sinhtau)
    ir2.sinhRise(lbf.ir2pow1, lbf.ir2rampdt1, lbf.ir2rampdt1 * lbf.sinhtau)
    ir3.sinhRise(lbf.ir3pow1, lbf.ir3rampdt1, lbf.ir3rampdt1 * lbf.sinhtau)
else:
    ir1.linear(lbf.ir1pow1, lbf.ir1rampdt1, volt=-11)
    gen.save_to_report('ANDOR', 'hfimg0', hfimg0)
    print "\tNEW  ANDOR:hfimg0 = %.2f MHz\n" % hfimg0

# Make a waveform for the bfield gradient
gradient = gradient_wave('gradientfield', 0.0, bfield.ss, volt=0)
gradient.follow(bfield)

timeZC = bfield.dt() - ZC.zcrampdt - ZC.zcdt

# Here we can select to rotate the LCR's and change the lattice beam powers
# during the ZC ramp
#
if DIMPLE.set_lattice_beams:
    print "...CHANGING LATTICE BEAMS RIGHT AFTER ZEROCROSSING:"
    #First rotators are set
    lcr1 = lattice.lattice_wave('lcr1', DIMPLE.alpha, DIMPLE.analogss)
    lcr2 = lattice.lattice_wave('lcr2', DIMPLE.alpha, DIMPLE.analogss)
    lcr3 = lattice.lattice_wave('lcr3', DIMPLE.alpha, DIMPLE.analogss)

    lcr1.appendhold(bfield.dt() - ZC.zcdt + DIMPLE.tlattice)
    lcr1.linear(DIMPLE.alpha1, DIMPLE.analogss)

    lcr2.appendhold(bfield.dt() - ZC.zcdt + DIMPLE.tlattice)
    lcr2.linear(DIMPLE.alpha2, DIMPLE.analogss)

    lcr3.appendhold(bfield.dt() - ZC.zcdt + DIMPLE.tlattice)
    lcr3.linear(DIMPLE.alpha3, DIMPLE.analogss)

    #Then power is changed on the IR  and GR beams
    def latticepow(ch):
        ss = DIMPLE.analogss
Exemplo n.º 21
0
def crossbeam_evap_into_lattice(s, toENDBFIELD):
    # Add evaporation ramp to ODT, returns sequence right at the end of evaporation
    free = float(report['EVAP']['free'])
    image = float(report['EVAP']['image'])
    buffer = 10.0  #Time needed to re-latch the trigger for the AOUTS
    if free < buffer + toENDBFIELD:
        print 'Need at list ' + str(
            buffer) + 'ms of free evap before evaporation can be triggered'
        print 'Currently ramps end at %f , and free is %f' % (toENDBFIELD,
                                                              free)
        exit(1)
    s.wait(free)
    odtpow, ENDEVAP, cpowend, ipganalog = odt_evap(image)
    # ENDEVAP should be equal to image
    evap_ss = float(report['EVAP']['evapss'])

    # Set LCR preset value in the begining of evap 1 is lattice 0 is dimple
    lcr_preset = float(report['EVAP']['lcr_preset'])
    lcr1 = lattice.lattice_wave('lcr1', lcr_preset, evap_ss)
    lcr2 = lattice.lattice_wave('lcr2', lcr_preset, evap_ss)
    lcr3 = lattice.lattice_wave('lcr3', lcr_preset, evap_ss)
    lcr1.extend(ENDEVAP)
    lcr2.extend(ENDEVAP)
    lcr3.extend(ENDEVAP)

    # Ramp up IR and green beams
    irramp1 = float(report['INTOLATTICE']['irrampdt1'])
    irramp2 = float(report['INTOLATTICE']['irrampdt2'])
    irramp3 = float(report['INTOLATTICE']['irrampdt3'])
    irdelay1 = float(report['INTOLATTICE']['irdelay1'])
    irdelay2 = float(report['INTOLATTICE']['irdelay2'])
    irdelay3 = float(report['INTOLATTICE']['irdelay3'])

    ir1 = wfm.wave('ir1pow', 0., evap_ss)
    ir2 = wfm.wave('ir2pow', 0., evap_ss)
    ir3 = wfm.wave('ir3pow', 0., evap_ss)

    loadtime = float(report['INTOLATTICE']['loadtime'])

    ir1.appendhold(ENDEVAP - loadtime)
    ir2.appendhold(ENDEVAP - loadtime)
    ir3.appendhold(ENDEVAP - loadtime)

    ir1.appendhold(irdelay1)
    ir2.appendhold(irdelay2)
    ir3.appendhold(irdelay3)

    ir1.linear(float(report['INTOLATTICE']['irpow1']), irramp1)
    ir2.linear(float(report['INTOLATTICE']['irpow2']), irramp2)
    ir3.linear(float(report['INTOLATTICE']['irpow3']), irramp3)

    gr1 = wfm.wave('greenpow1', 0., evap_ss)
    gr2 = wfm.wave('greenpow2', 0., evap_ss)
    gr3 = wfm.wave('greenpow3', 0., evap_ss)

    gr1.appendhold(ENDEVAP - loadtime)
    gr2.appendhold(ENDEVAP - loadtime)
    gr3.appendhold(ENDEVAP - loadtime)

    grdelay1 = float(report['INTOLATTICE']['grdelay1'])
    grdelay2 = float(report['INTOLATTICE']['grdelay2'])
    grdelay3 = float(report['INTOLATTICE']['grdelay3'])

    gr1.appendhold(grdelay1)
    gr2.appendhold(grdelay2)
    gr3.appendhold(grdelay3)

    grramp1 = float(report['INTOLATTICE']['grrampdt1'])
    grramp2 = float(report['INTOLATTICE']['grrampdt2'])
    grramp3 = float(report['INTOLATTICE']['grrampdt3'])
    gr1.linear(float(report['INTOLATTICE']['grpow1']), grramp1)
    gr2.linear(float(report['INTOLATTICE']['grpow2']), grramp2)
    gr3.linear(float(report['INTOLATTICE']['grpow3']), grramp3)

    #end = s.analogwfm_add(evap_ss,[odtpow,ipganalog,ir1,ir2,ir3,gr1,gr2,gr3])
    end = s.analogwfm_add(
        evap_ss, [odtpow, ir1, ir2, ir3, gr1, gr2, gr3, lcr1, lcr2, lcr3])

    s.wait(image - loadtime)

    # Turn on IR lattice beams
    s.wait(irdelay1)
    s.digichg('irttl1', float(report['INTOLATTICE']['ir1']))
    s.wait(-irdelay1 + irdelay2)
    s.digichg('irttl2', float(report['INTOLATTICE']['ir2']))
    s.wait(-irdelay2 + irdelay3)
    s.digichg('irttl3', float(report['INTOLATTICE']['ir3']))
    s.wait(-irdelay3)

    s.wait(grdelay1)
    s.digichg('greenttl1', float(report['INTOLATTICE']['gr1']))
    s.wait(-grdelay1 + grdelay2)
    s.digichg('greenttl2', float(report['INTOLATTICE']['gr2']))
    s.wait(-grdelay2 + grdelay3)
    s.digichg('greenttl3', float(report['INTOLATTICE']['gr3']))
    s.wait(-grdelay3)

    s.wait(loadtime + end - image)

    return s
# Ramp B Field to intermediate value 
bfield = wfm.wave('bfield', evap.fieldrampfinal ,ir_ss)
bfield.appendhold( lbf.brampdelay1 )
bfield.linear( lbf.bstage1, lbf.brampdt1 )
# With respect to the start of the sequence, set QUICK2 pulse
s.wait(-lbf.quick2time + lbf.brampdelay1 )
if lbf.usequick2 == 1:
	s.digichg('quick2',1)
else:
	s.digichg('quick2',0)
s.wait( lbf.quick2time - lbf.brampdelay1 )


    
# Ramp up IR and green beams to intermediate value 
ir1  = lattice.lattice_wave('ir1pow', ir_p0, ir_ss,volt=-11)
ir2  = lattice.lattice_wave('ir2pow', ir_p0, ir_ss,volt=-11)
ir3  = lattice.lattice_wave('ir3pow', ir_p0, ir_ss,volt=-11)
gr1  = lattice.lattice_wave('greenpow1', gr_p0, ir_ss)
gr2  = lattice.lattice_wave('greenpow2', gr_p0, ir_ss)
gr3  = lattice.lattice_wave('greenpow3', gr_p0, ir_ss)

def latticeRamp(wave,delay,tanhrise,tanhtau,tanhshift,sinhrise,sinhtau,pow,dt):
    wave.appendhold(delay)
    if tanhrise==1.0:
        wave.tanhRise(pow,dt,tanhtau,tanhshift)
    elif sinhrise ==1.0:
        wave.sinhRise(pow,dt,dt*sinhtau)
    else:
        wave.linear(pow,dt,volt=-11)
        
## RAMPS TO INTERMEDIATE VALUES
#########################################

# Ramp B Field to intermediate value 
bfield = wfm.wave('bfield', evap.fieldrampfinal ,ir_ss)
bfield.appendhold( lbf.brampdelay1 )
bfield.linear( lbf.bstage1, lbf.brampdt1 )
# With respect to the start of the sequence, set QUICK2 pulse
s.wait(-lbf.quick2time + lbf.brampdelay1 )
s.digichg('quick2',1)
s.wait( lbf.quick2time - lbf.brampdelay1 )


    
# Ramp up IR and green beams to intermediate value 
ir1  = lattice.lattice_wave('ir1pow', ir_p0, ir_ss,volt=-11)
ir2  = lattice.lattice_wave('ir2pow', ir_p0, ir_ss,volt=-11)
ir3  = lattice.lattice_wave('ir3pow', ir_p0, ir_ss,volt=-11)
ir1.appendhold( lbf.ir1delay1 )
ir2.appendhold( lbf.ir2delay1 )
ir3.appendhold( lbf.ir3delay1 )
if lbf.tanhrise == 1.0:
    ir1.tanhRise(lbf.ir1pow1,lbf.ir1rampdt1, lbf.tanhtau, lbf.tanhshift)
    ir2.tanhRise(lbf.ir2pow1,lbf.ir2rampdt1, lbf.tanhtau, lbf.tanhshift)
    ir3.tanhRise(lbf.ir3pow1,lbf.ir3rampdt1, lbf.tanhtau, lbf.tanhshift)
elif lbf.sinhrise == 1.0:
    ir1.sinhRise(lbf.ir1pow1,lbf.ir1rampdt1, lbf.ir1rampdt1 * lbf.sinhtau)
    ir2.sinhRise(lbf.ir2pow1,lbf.ir2rampdt1, lbf.ir2rampdt1 * lbf.sinhtau)
    ir3.sinhRise(lbf.ir3pow1,lbf.ir3rampdt1, lbf.ir3rampdt1 * lbf.sinhtau)
else:
    ir1.linear(lbf.ir1pow1,lbf.ir1rampdt1, volt=-11)