コード例 #1
0
def imagingRamps_nobfield(motpow, repdet, trapdet, reppow, trappow, camera):
    ss = f('CNC', 'cncstepsize')

    #Insert AOM imaging values 100us after release
    imgdt = 0.1
    motpow.appendhold(imgdt)
    repdet.appendhold(imgdt)
    trapdet.appendhold(imgdt)
    reppow.appendhold(imgdt)
    trappow.appendhold(imgdt)

    motpow.linear(cnv('motpow', f(camera, 'imgpow')), 0.0)
    #repdet.linear( cnv('repdet' ,f(camera,'imgdetrep')), 0.0)
    repdet.linear(cnv('repdet', f(camera, 'imgdettrap')), 0.0)
    trapdet.linear(cnv('trapdet', f(camera, 'imgdettrap')), 0.0)
    reppow.linear(cnv('reppow', f(camera, 'imgpowrep')), 0.0)
    trappow.linear(cnv('trappow', f(camera, 'imgpowtrap')), 0.0)

    maxDT = max(motpow.dt(), repdet.dt(), trapdet.dt(), reppow.dt(),
                trappow.dt())

    motpow.extend(maxDT)
    repdet.extend(maxDT)
    trapdet.extend(maxDT)
    reppow.extend(maxDT)
    trappow.extend(maxDT)

    return motpow, repdet, trapdet, reppow, trappow, maxDT
コード例 #2
0
ファイル: zsload.py プロジェクト: huletlab/apparatus3-seq
def constructLoadRamps():
    global report

    # Initialize channels to ZSLOAD values and with cncstepsize
    ss = f('CNC', 'cncstepsize')
    motpow = wfm.wave(cnv('motpow', f('ZSLOAD', 'motpow')), ss)
    repdet = wfm.wave(cnv('repdet', f('ZSLOAD', 'repdet')), ss)
    trapdet = wfm.wave(cnv('trapdet', f('ZSLOAD', 'trapdet')), ss)
    reppow = wfm.wave(cnv('reppow', f('ZSLOAD', 'reppow')), ss)
    trappow = wfm.wave(cnv('trappow', f('ZSLOAD', 'trappow')), ss)

    #Insert AOM imaging values in one analogstepsize
    motpow.linear(cnv('motpow', f('ZSLOAD', 'imgpow')), 0.0)
    repdet.linear(cnv('repdet', f('ZSLOAD', 'imgdetrep')), 0.0)
    trapdet.linear(cnv('trapdet', f('ZSLOAD', 'imgdettrap')), 0.0)
    reppow.linear(cnv('reppow', f('ZSLOAD', 'imgpowrep')), 0.0)
    trappow.linear(cnv('trappow', f('ZSLOAD', 'imgpowtrap')), 0.0)

    maxDT = max(motpow.dt(), repdet.dt(), trapdet.dt(), reppow.dt(),
                trappow.dt())

    motpow.extend(maxDT)
    repdet.extend(maxDT)
    trapdet.extend(maxDT)
    reppow.extend(maxDT)
    trappow.extend(maxDT)

    motpow.fileoutput('L:/software/apparatus3/seq/ramps/motpow.txt')
    repdet.fileoutput('L:/software/apparatus3/seq/ramps/repdet.txt')
    trapdet.fileoutput('L:/software/apparatus3/seq/ramps/trapdet.txt')
    reppow.fileoutput('L:/software/apparatus3/seq/ramps/reppow.txt')
    trappow.fileoutput('L:/software/apparatus3/seq/ramps/trappow.txt')

    return max(motpow.dt(), repdet.dt(), trapdet.dt(), reppow.dt(),
               trappow.dt())
コード例 #3
0
ファイル: cnc_.py プロジェクト: PedroMDuarte/apparatus3-seq
def imagingRamps_nobfield(motpow, repdet, trapdet, reppow, trappow,camera):
	ss=f('CNC','cncstepsize')
	
	#Insert AOM imaging values 100us after release
	imgdt=0.1
	motpow.appendhold(imgdt)
	repdet.appendhold(imgdt)
	trapdet.appendhold(imgdt)
	reppow.appendhold(imgdt)
	trappow.appendhold(imgdt)
	
	motpow.linear( cnv('motpow' ,f(camera,'imgpow')),    0.0)
	#repdet.linear( cnv('repdet' ,f(camera,'imgdetrep')), 0.0)
	repdet.linear( cnv('repdet' ,f(camera,'imgdettrap')), 0.0)
	trapdet.linear(cnv('trapdet',f(camera,'imgdettrap')),0.0)
	reppow.linear( cnv('reppow' ,f(camera,'imgpowrep')), 0.0)
	trappow.linear(cnv('trappow',f(camera,'imgpowtrap')),0.0)

	maxDT = max( motpow.dt(), repdet.dt(), trapdet.dt(), reppow.dt(), trappow.dt())

	motpow.extend(maxDT)
	repdet.extend(maxDT)
	trapdet.extend(maxDT)
	reppow.extend(maxDT)
	trappow.extend(maxDT)
	
	return motpow, repdet, trapdet, reppow, trappow, maxDT
コード例 #4
0
def odt_modulationRamps(ss, STARTDELAY):
    maxpow = f('ODT', 'odtpow')
    moddt = f('TRAPFREQ', 'moddt')
    modfreq = f('TRAPFREQ', 'modfreq')
    moddepth = f('TRAPFREQ', 'moddepth')

    odtpow = wfm.wave('odtpow', cnv('odtpow', maxpow), ss)
    odtpow.extend(STARTDELAY + f('TRAPFREQ', 'intrapdt'))
    odtpow.SineMod(maxpow, moddepth, moddt, modfreq, 'odtpow')
    odtpow.linear(cnv('odtpow', maxpow), ss)

    return odtpow
コード例 #5
0
ファイル: odt_.py プロジェクト: huletlab/apparatus3-seq
def odt_modulationRamps(ss, STARTDELAY):
    maxpow = f("ODT", "odtpow")
    moddt = f("TRAPFREQ", "moddt")
    modfreq = f("TRAPFREQ", "modfreq")
    moddepth = f("TRAPFREQ", "moddepth")

    odtpow = wfm.wave("odtpow", cnv("odtpow", maxpow), ss)
    odtpow.extend(STARTDELAY + f("TRAPFREQ", "intrapdt"))
    odtpow.SineMod(maxpow, moddepth, moddt, modfreq, "odtpow")
    odtpow.linear(cnv("odtpow", maxpow), ss)

    return odtpow
コード例 #6
0
ファイル: wfm_.py プロジェクト: huletlab/apparatus3-seq
	def Evap(self, p0, p1, t1, tau, beta, duration):
		"""Evaporation ramp"""
		if duration <=0:
			return
		else:
			N=int(round(duration/self.ss))
			print '...Evap nsteps = ' + str(N)
			ramp=[]
			ramphash = 'L:/software/apparatus3/seq/ramps/' + 'Evap_' \
					   + hashlib.md5(str(self.ss)+str(duration)+str(p0)+str(p1)+str(t1)+str(tau)+str(beta)).hexdigest()
			if not os.path.exists(ramphash):
				print '...Making new Evap ramp'
				for xi in range(N):
					t = (xi+1)*self.ss
					if t < t1:
						phys =  (p0-p1)*math.tanh( beta/tau * (t-t1)* p1/(p0-p1))/math.tanh( beta/tau * (-t1) * p1/(p0-p1)) + p1
					else:
						phys =   p1 * math.pow(1,beta) / math.pow( 1 + (t-t1)/tau ,beta)
					volt = cnv(self.name,phys)
					ramp = numpy.append( ramp, [ volt])
				ramp.tofile(ramphash,sep=',',format="%.4f")
			else:
				print '...Recycling previously calculated Evap ramp'
				ramp = numpy.fromfile(ramphash,sep=',')

			self.y=numpy.append(self.y,ramp)
			
		return
コード例 #7
0
	def SineMod(self, p0, dt, freq, depth):
		"""Sine wave modulation on channel"""
		if dt <= 0.0:
			return
		else:
			N=int(math.floor(dt/self.ss))
			ramp=[]
			hashbase = '%s,%.3f,%.3f,%.3f,%.3f,%.3f ' % ( self.name, self.ss, p0, dt, freq, depth)
			ramphash = 'L:/software/apparatus3/seq/ramps/'+'SineMod_' \
						+ hashlib.md5( hashbase).hexdigest()
			if not os.path.exists(ramphash):
				print '...Making new SineMod ramp:  %.2f +/- %.2f' % (p0, 0.5*p0*depth/100.)
				print '... [[ hashbase = %s ]]' % hashbase
				for xi in range(N):
					t = (xi+1)*self.ss
					phys = p0 + (0.5*p0*depth/100.)* math.sin(  t * 2 * math.pi * freq/1000. )
					volt = cnv(self.name,phys)
					ramp = numpy.append(ramp, [ volt])
				ramp.tofile(ramphash,sep=',',format="%.4f")
			else:
				print '...Recycling previously calculated SineMod ramp %.2f +/- %.2f' % (p0, 0.5*p0*depth/100.)
				print '... [[ hashbase = %s ]]' % hashbase
				ramp = numpy.fromfile(ramphash,sep=',')
			
			self.y=numpy.append(self.y,ramp)
		return
コード例 #8
0
	def Evap2(self, p0, p1, t1, tau, beta, offset, t2, tau2, duration):
		"""Evaporation ramp v2"""
		if duration <=0:
			return
		else:
			N=int(round(duration/self.ss))
			print '...Evap nsteps = ' + str(N)
			ramp=[]
			ramphash = 'L:/software/apparatus3/seq/ramps/' + 'Evap2_' \
					   + hashlib.md5(str(self.name)+str(self.ss)+str(duration)+str(p0)+str(p1)+str(t1)+str(tau)+str(beta)\
					                  + str(offset)+str(t2)+str(tau2)).hexdigest()
			if not os.path.exists(ramphash):
				print '...Making new Evap2 ramp'
				for xi in range(N):
					t = (xi+1)*self.ss
					phys = evap.v2(t,p0,p1,t1,tau,beta, offset,t2,tau2)
					volt = cnv(self.name,phys)
					ramp = numpy.append( ramp, [ volt])
				ramp.tofile(ramphash,sep=',',format="%.4f")
			else:
				print '...Recycling previously calculated Evap2 ramp'
				ramp = numpy.fromfile(ramphash,sep=',')

			self.y=numpy.append(self.y,ramp)
		return
コード例 #9
0
def odt_adiabaticDown(ss, STARTDELAY):
    maxpow = f('ODT', 'odtpow')
    tau = f('ODT', 'tau')
    dt = 2 * tau
    odtpow = wfm.wave('odtpow', cnv('odtpow', maxpow), ss)
    odtpow.extend(STARTDELAY + f('ODT', 'intrap'))
    odtpow.AdiabaticRampDown(dt, tau, 'odtpow')
    return odtpow
コード例 #10
0
ファイル: odt_.py プロジェクト: huletlab/apparatus3-seq
def odt_adiabaticDown(ss, STARTDELAY):
    maxpow = f("ODT", "odtpow")
    tau = f("ODT", "tau")
    dt = 2 * tau
    odtpow = wfm.wave("odtpow", cnv("odtpow", maxpow), ss)
    odtpow.extend(STARTDELAY + f("ODT", "intrap"))
    odtpow.AdiabaticRampDown(dt, tau, "odtpow")
    return odtpow
コード例 #11
0
ファイル: wfm_.py プロジェクト: huletlab/apparatus3-seq
	def __init__(self,name,val,stepsize,N=1,volt=-11):
		"""Initialize the waveform  """
		self.name = name
		if volt != -11:
			val=volt
		else:
			val=cnv(self.name,val)
		self.y= numpy.array(N*[val])
		self.ss=stepsize
コード例 #12
0
ファイル: cnc_.py プロジェクト: PedroMDuarte/apparatus3-seq
def statetransfer_F12(motpow, repdet, trapdet, reppow, trappow, bfield):
	ss=f('CNC','cncstepsize')
	
	# Turn off repump for 100 us to transfer everything to the F=3/2 state
	trapdet.linear( cnv('trapdet',-12.0), ss)
	repdet.linear( cnv('repdet',-35.0), ss)
	reppow.linear( 0, 0.0 )
	reppow.appendhold(1.6)
	
	maxDT = max( motpow.dt(), repdet.dt(), trapdet.dt(), bfield.dt(), reppow.dt(), trappow.dt())

	motpow.extend(maxDT)
	repdet.extend(maxDT)
	trapdet.extend(maxDT)
	bfield.extend(maxDT)
	reppow.extend(maxDT)
	trappow.extend(maxDT)
	
	return motpow, repdet, trapdet, reppow, trappow, bfield, maxDT
コード例 #13
0
ファイル: wfm_.py プロジェクト: huletlab/apparatus3-seq
	def SineMod(self, max, depth, dt, freq, channel):
		"""Sine wave modulation on channel"""
		if dt <= 0.0:
			return
		else:
			N=int(math.floor(dt/self.ss))
			for xi in range(N):
				phys = max*((1-depth) + depth * math.pow( math.cos( (xi+1) * self.ss * math.pi * freq / 1000. ) ,2))
				volt = cnv(channel,phys)
				self.y=numpy.append( self.y, [ volt])
		return
コード例 #14
0
def statetransfer_F12(motpow, repdet, trapdet, reppow, trappow, bfield):
    ss = f('CNC', 'cncstepsize')

    # Turn off repump for 100 us to transfer everything to the F=3/2 state
    trapdet.linear(cnv('trapdet', -12.0), ss)
    repdet.linear(cnv('repdet', -35.0), ss)
    reppow.linear(0, 0.0)
    reppow.appendhold(1.6)

    maxDT = max(motpow.dt(), repdet.dt(), trapdet.dt(), bfield.dt(),
                reppow.dt(), trappow.dt())

    motpow.extend(maxDT)
    repdet.extend(maxDT)
    trapdet.extend(maxDT)
    bfield.extend(maxDT)
    reppow.extend(maxDT)
    trappow.extend(maxDT)

    return motpow, repdet, trapdet, reppow, trappow, bfield, maxDT
コード例 #15
0
def statetransfer_wprobe(motpow, repdet, trapdet, reppow, trappow, bfield):
    ss = f('CNC', 'cncstepsize')

    fsrepdet = f('ODT', 'fsrepdet')
    fstrapdet = f('ODT', 'fstrapdet')
    fsreppow = f('ODT', 'fsreppow')
    fstrappow = f('ODT', 'fstrappow')

    bfield.appendhold(0.1)

    maxDT = max(motpow.dt(), repdet.dt(), trapdet.dt(), bfield.dt(),
                reppow.dt(), trappow.dt())

    motpow.extend(maxDT)
    repdet.extend(maxDT)
    trapdet.extend(maxDT)
    bfield.extend(maxDT)
    reppow.extend(maxDT)
    trappow.extend(maxDT)

    bfield.linear(0, ss)
    repdet.linear(cnv('repdet', fsrepdet), ss)
    trapdet.linear(cnv('trapdet', fstrapdet), ss)
    reppow.linear(cnv('reppow', fsreppow), ss)
    trappow.linear(cnv('trappow', fstrappow), ss)

    fstatedt = f('ODT', 'fstatedt')
    repdet.appendhold(0.1 + fstatedt)

    maxDT = max(motpow.dt(), repdet.dt(), trapdet.dt(), bfield.dt(),
                reppow.dt(), trappow.dt())

    motpow.extend(maxDT)
    repdet.extend(maxDT)
    trapdet.extend(maxDT)
    bfield.extend(maxDT)
    reppow.extend(maxDT)
    trappow.extend(maxDT)

    return motpow, repdet, trapdet, reppow, trappow, bfield, maxDT
コード例 #16
0
ファイル: wfm_.py プロジェクト: huletlab/apparatus3-seq
	def Exponential(self,y0,yf,dt,tau):
		"""Exponential turn to value max during dt with time constant tau on channel"""
		if dt <= 0.0:
			return
		else:
			N=int(round(dt/self.ss))
			print 'nsteps = ' + str(N)
			for xi in range(N-1):
				t = (xi+1)*self.ss
				phys = y0 + (yf-y0)*(1-math.exp(-t/tau))/(1-math.exp(-dt/tau))
				volt = cnv(self.name,phys)
				self.y=numpy.append( self.y, [ volt])
		return
コード例 #17
0
ファイル: wfm_.py プロジェクト: huletlab/apparatus3-seq
	def AdiabaticRampDown(self,dt,tau,channel):
		"""Adiabatic RampDown during dt with time constant tau on channel"""
		if dt <= 0.0:
			return
		else:
			v0 = self.last()
			N=int(math.floor(dt/self.ss))
			for xi in range(N):
				t = (xi+1)*self.ss
				phys = v0 * math.pow( 1 + t/tau ,-2)
				volt = cnv(channel,phys)
				self.y=numpy.append( self.y, [ volt])
		return
コード例 #18
0
ファイル: cnc_.py プロジェクト: PedroMDuarte/apparatus3-seq
def statetransfer_wprobe(motpow, repdet, trapdet, reppow, trappow, bfield):
	ss=f('CNC','cncstepsize')
	
	fsrepdet = f('ODT','fsrepdet')
	fstrapdet = f('ODT','fstrapdet')
	fsreppow = f('ODT','fsreppow')
	fstrappow = f('ODT','fstrappow')
	
	bfield.appendhold(0.1)

	maxDT = max( motpow.dt(), repdet.dt(), trapdet.dt(), bfield.dt(), reppow.dt(), trappow.dt())

	motpow.extend(maxDT)
	repdet.extend(maxDT)
	trapdet.extend(maxDT)
	bfield.extend(maxDT)
	reppow.extend(maxDT)
	trappow.extend(maxDT)
	
	bfield.linear(0,ss)
	repdet.linear( cnv('repdet', fsrepdet), ss)
	trapdet.linear( cnv('trapdet', fstrapdet), ss)
	reppow.linear( cnv('reppow', fsreppow), ss)
	trappow.linear( cnv('trappow', fstrappow), ss)
	
	fstatedt = f('ODT','fstatedt')
	repdet.appendhold(0.1 + fstatedt)
	
	maxDT = max( motpow.dt(), repdet.dt(), trapdet.dt(), bfield.dt(), reppow.dt(), trappow.dt())

	motpow.extend(maxDT)
	repdet.extend(maxDT)
	trapdet.extend(maxDT)
	bfield.extend(maxDT)
	reppow.extend(maxDT)
	trappow.extend(maxDT)
	
	return motpow, repdet, trapdet, reppow, trappow, bfield, maxDT
コード例 #19
0
	def __init__(self,name,val,stepsize,N=1,volt=-11):
		"""Initialize the waveform  """
		self.name = name
		if volt != -11:
			val=volt
		else:
			if self.name == 'odtpow':
				val=OdtpowConvert(val)
			elif self.name =='odtpow_nonservo':
				val=OdtpowConvert(val,0)		
			else:
				val=cnv(self.name,val)
				
				
		self.y= numpy.array(N*[val])
		self.ss=stepsize
コード例 #20
0
ファイル: wfm_.py プロジェクト: huletlab/apparatus3-seq
	def linear(self,vf,dt,volt=-11):
		"""Adds linear ramp to waveform, starts at current last 
			value and goes to 'vf' in 'dt' 
			CAREFUL: This is linear in voltage, not in phys"""
		if volt != -11:
			vf=volt
		else:
			vf=cnv(self.name,vf)
		v0=self.last()
		if dt == 0.0:
			self.y[ self.y.size -1] = vf
			return
		else:
			N = int(math.floor(dt/self.ss))
			for i in range(N):
				self.y=numpy.append(self.y, [v0 + (vf-v0)*(i+1)/N])
		return 
コード例 #21
0
ファイル: wfm.py プロジェクト: PedroMDuarte/apparatus3-seq
    def sinhRise(self, vf, dt, tau):
        """Inserts a hyperbolic-sine-like ramp to the waveform.  
			tau is the ramp scale, it is understood in units of dt
			
			if tau is equal or greater to dt the ramp approaches a
			linear ramp
		
			as tau gets smaller than dt the ramp starts to deviate from 
			linear
			
			a real difference starts to be seen wheh tau = dt/3
			
			from tau=dt/20 it doesn't make a difference to keep making
			tau smaller
			
			good values to vary it are tau=dt/20, dt/5, dt/3, dt/2, dt"""
        ### WARNING: in general the conversion should be done for every point
        ### i.e. inside of the for loop below.
        ### This one just does it on the endpoints.  It is ok because it is used
        ### for the magnetic field which has a mostly linear relationship between
        ### set voltage and current in the coils.  But don't use this as an example
        ### for other things.
        vf = cnv(self.name, vf)
        v0 = self.last()
        if dt == 0.0:
            self.y[self.y.size - 1] = vf
            return
        else:
            N = int(math.floor(dt / self.ss))
            ramp = []
            ramphash = 'L:/software/apparatus3/seq/ramps/' + 'sinhRise_' \
                       + hashlib.md5(str(self.name)+str(vf)+str(v0)+str(N)+str(dt)+str(tau)).hexdigest()
            if not os.path.exists(ramphash):
                print '...Making new sinhRise ramp'
                for i in range(N):
                    x = dt * (i + 1) / N
                    f = v0 + (vf - v0) * (x / tau + (x / tau)**3.0 / 6.0) / (
                        dt / tau + (dt / tau)**3.0 / 6.0)
                    ramp = numpy.append(ramp, [f])
                ramp.tofile(ramphash, sep=',', format="%.4f")
            else:
                print '...Recycling previously calculated sinhRise ramp'
                ramp = numpy.fromfile(ramphash, sep=',')

            self.y = numpy.append(self.y, ramp)
        return
コード例 #22
0
ファイル: wfm.py プロジェクト: PedroMDuarte/apparatus3-seq
	def sinhRise(self,vf,dt,tau):
		"""Inserts a hyperbolic-sine-like ramp to the waveform.  
			tau is the ramp scale, it is understood in units of dt
			
			if tau is equal or greater to dt the ramp approaches a
			linear ramp
		
			as tau gets smaller than dt the ramp starts to deviate from 
			linear
			
			a real difference starts to be seen wheh tau = dt/3
			
			from tau=dt/20 it doesn't make a difference to keep making
			tau smaller
			
			good values to vary it are tau=dt/20, dt/5, dt/3, dt/2, dt"""
		### WARNING: in general the conversion should be done for every point
		### i.e. inside of the for loop below.
		### This one just does it on the endpoints.  It is ok because it is used
		### for the magnetic field which has a mostly linear relationship between
		### set voltage and current in the coils.  But don't use this as an example
		### for other things.   
		vf=cnv(self.name,vf)
		v0=self.last()
		if dt == 0.0:
			self.y[ self.y.size -1] = vf
			return
		else:
			N = int(math.floor(dt/self.ss))
			ramp=[]
			ramphash = 'L:/software/apparatus3/seq/ramps/' + 'sinhRise_' \
			           + hashlib.md5(str(self.name)+str(vf)+str(v0)+str(N)+str(dt)+str(tau)).hexdigest()
			if not os.path.exists(ramphash):
				print '...Making new sinhRise ramp'
				for i in range(N):
					x=dt*(i+1)/N
					f=v0 + (vf-v0)*(x/tau+(x/tau)**3.0/6.0)/(dt/tau+(dt/tau)**3.0/6.0)
					ramp=numpy.append(ramp, [f])
				ramp.tofile(ramphash,sep=',',format="%.4f")
			else:
				print '...Recycling previously calculated sinhRise ramp'
				ramp =  numpy.fromfile(ramphash,sep=',')
			
			self.y=numpy.append(self.y, ramp)
		return
コード例 #23
0
def odt_evap(image):
    evap_ss = f('EVAP', 'evapss')

    p0 = f('ODT', 'odtpow')
    p1 = f('EVAP', 'p1')
    t1 = f('EVAP', 't1')
    tau = f('EVAP', 'tau')
    beta = f('EVAP', 'beta')

    odtpow = wfm.wave('odtpow', cnv('odtpow', p0), evap_ss)
    odtpow.Evap(p0, p1, t1, tau, beta, image)

    #~ odtpow.Exponential(pow0,powf,evap_dt,tau)
    #~ odtpow.linear( cnv('odtpow',powf), evap_ss)
    #~ odtpow.appendhold( evap_dt)

    maxDT = odtpow.dt()

    return odtpow, maxDT
コード例 #24
0
ファイル: odt_.py プロジェクト: huletlab/apparatus3-seq
def odt_evap(image):
    evap_ss = f("EVAP", "evapss")

    p0 = f("ODT", "odtpow")
    p1 = f("EVAP", "p1")
    t1 = f("EVAP", "t1")
    tau = f("EVAP", "tau")
    beta = f("EVAP", "beta")

    odtpow = wfm.wave("odtpow", cnv("odtpow", p0), evap_ss)
    odtpow.Evap(p0, p1, t1, tau, beta, image)

    # ~ odtpow.Exponential(pow0,powf,evap_dt,tau)
    # ~ odtpow.linear( cnv('odtpow',powf), evap_ss)
    # ~ odtpow.appendhold( evap_dt)

    maxDT = odtpow.dt()

    return odtpow, maxDT
コード例 #25
0
ファイル: wfm_.py プロジェクト: huletlab/apparatus3-seq
	def sinhRise(self,vf,dt,tau):
		"""Inserts a hyperbolic-sine-like ramp to the waveform.  
			tau is the ramp scale, it is understood in units of dt
			
			if tau is equal or greater to dt the ramp approaches a
			linear ramp
		
			as tau gets smaller than dt the ramp starts to deviate from 
			linear
			
			a real difference starts to be seen wheh tau = dt/3
			
			from tau=dt/20 it doesn't make a difference to keep making
			tau smaller
			
			good values to vary it are tau=dt/20, dt/5, dt/3, dt/2, dt"""
		vf=cnv(self.name,vf)
		v0=self.last()
		if dt == 0.0:
			self.y[ self.y.size -1] = vf
			return
		else:
			N = int(math.floor(dt/self.ss))
			ramp=[]
			ramphash = 'L:/software/apparatus3/seq/ramps/' + 'sinhRise_' \
			           + hashlib.md5(str(vf)+str(v0)+str(N)+str(dt)+str(tau)).hexdigest()
			if not os.path.exists(ramphash):
				print '...Making new sinhRise ramp'
				for i in range(N):
					x=dt*(i+1)/N
					f=v0 + (vf-v0)*(x/tau+(x/tau)**3.0/6.0)/(dt/tau+(dt/tau)**3.0/6.0)
					ramp=numpy.append(ramp, [f])
				ramp.tofile(ramphash,sep=',',format="%.4f")
			else:
				print '...Recycling previously calculated sinhRise ramp'
				ramp =  numpy.fromfile(ramphash,sep=',')
			
			self.y=numpy.append(self.y, ramp)
		return
コード例 #26
0
def constructLoadRamps(cam):
    global report

    # Initialize channels to MOT SS values and with cncstepsize
    ss = f('CNC', 'cncstepsize')
    motpow = wfm.wave(cnv('motpow', f('MOT', 'motpow')), ss)
    repdet = wfm.wave(cnv('repdet', f('MOT', 'repdetSS')), ss)
    trapdet = wfm.wave(cnv('trapdet', f('MOT', 'trapdetSS')), ss)
    reppow = wfm.wave(cnv('reppow', f('MOT', 'reppowSS')), ss)
    trappow = wfm.wave(cnv('trappow', f('MOT', 'trappowSS')), ss)
    bfield = wfm.wave(cnv('bfield', f('MOT', 'bfield')), ss)

    CNC = False
    #Not doing CNC for photoionization rate measurement

    DURATION = 1.0
    #DURATION = DURATION + ht
    motpow.extend(DURATION)
    repdet.extend(DURATION)
    trapdet.extend(DURATION)
    bfield.extend(DURATION)
    reppow.extend(DURATION)
    trappow.extend(DURATION)
    maxN = int(math.floor((DURATION) / ss)) + 1

    #Up to here you have a Cooled and Compressed MOT
    #

    #Insert bfield imaging value at release
    bfield.linear(cnv('bfield', f(cam, 'imgbfield')), ss)

    #Insert AOM imaging values 30us after release
    imgdt = 0.03
    motpow.appendhold(imgdt)
    repdet.appendhold(imgdt)
    trapdet.appendhold(imgdt)
    reppow.appendhold(imgdt)
    trappow.appendhold(imgdt)

    motpow.linear(cnv('motpow', f(cam, 'imgpow')), 0.0)
    repdet.linear(cnv('repdet', f(cam, 'imgdetrep')), 0.0)
    trapdet.linear(cnv('trapdet', f(cam, 'imgdettrap')), 0.0)
    reppow.linear(cnv('reppow', f(cam, 'imgpowrep')), 0.0)
    trappow.linear(cnv('trappow', f(cam, 'imgpowtrap')), 0.0)

    maxDT = max(motpow.dt(), repdet.dt(), trapdet.dt(), bfield.dt(),
                reppow.dt(), trappow.dt())

    motpow.extend(maxDT)
    repdet.extend(maxDT)
    trapdet.extend(maxDT)
    bfield.extend(maxDT)
    reppow.extend(maxDT)
    trappow.extend(maxDT)

    motpow.fileoutput('L:/software/apparatus3/seq/ramps/motpow.txt')
    repdet.fileoutput('L:/software/apparatus3/seq/ramps/repdet.txt')
    trapdet.fileoutput('L:/software/apparatus3/seq/ramps/trapdet.txt')
    bfield.fileoutput('L:/software/apparatus3/seq/ramps/bfield.txt')
    reppow.fileoutput('L:/software/apparatus3/seq/ramps/reppow.txt')
    trappow.fileoutput('L:/software/apparatus3/seq/ramps/trappow.txt')

    return DURATION
コード例 #27
0
camera = 'ANDOR'
motpow, repdet, trapdet, reppow, trappow, maxDT = cnc.imagingRamps_nobfield(motpow, repdet, trapdet, reppow, trappow, camera)

#Switch bfield to FESHBACH
switchdt  = float(report['FESHBACH']['switchdt'])
offdelay  = float(report['FESHBACH']['offdelay'])
quickdelay  = float(report['FESHBACH']['quickdelay'])
switchdelay  = float(report['FESHBACH']['switchdelay'])
bias  = float(report['FESHBACH']['bias'])
biasrampdt  = float(report['FESHBACH']['rampdt'])
bfield.linear(0.0,0.0)
bfield.appendhold(offdelay)
bfield.appendhold(2*switchdt)
bfield.appendhold(quickdelay)
bfield.appendhold(switchdelay)
bfield.linear(cnv('bfield',bias),biasrampdt)
#bfield.Exponential( 0.0, bias, biasrampdt, 30.0)
	
#Add waveforms to sequence
s.analogwfm_add(ss,[ motpow, repdet, trapdet, bfield, reppow, trappow, uvfppiezo, uvpow])
	
#wait normally rounds down using floor, here the duration is changed before so that
#the wait is rounded up
ENDUVMOT = ss*math.ceil(ENDUVMOT/ss)
	
#insert QUICK pulse  for fast ramping of the field gradient
s.wait(-10.0)
quickval = 1 if gen.bstr('CNC',report) == True else 0
s.digichg('quick',quickval)	
s.wait(10.0)
コード例 #28
0
def constructLoadRamps(cam):
	global report

	# Initialize channels to MOT SS values and with cncstepsize
	ss=f('CNC','cncstepsize')
	motpow   = wfm.wave(cnv('motpow',f('MOT','motpow'))     ,ss)
	repdet   = wfm.wave(cnv('repdet',f('MOT','repdetSS'))   ,ss)
	trapdet  = wfm.wave(cnv('trapdet',f('MOT','trapdetSS')) ,ss)
	reppow   = wfm.wave(cnv('reppow',f('MOT','reppowSS'))   ,ss)
	trappow  = wfm.wave(cnv('trappow',f('MOT','trappowSS')) ,ss)
	bfield   = wfm.wave(cnv('bfield',f('MOT','bfield'))     ,ss)
	
	CNC = gen.bstr('CNC',report)
	#If CNC is selected in the report then insert necessary linear ramps
	
	#First ramp bfield
	SINH = gen.bstr('sinh',report)
	if SINH == True:
		bfield.sinhRise(  cnv('bfield',  f('CNC','bfieldf'))    if CNC == True else  cnv('bfield',f('MOT','bfield'))    ,  f('CNC','dtbfield'), f('CNC','dtbfield')*f('CNC','taubfield'))
	else:
		bfield.linear(  cnv('bfield',  f('CNC','bfieldf'))    if CNC == True else  cnv('bfield',f('MOT','bfield'))    ,  f('CNC','dtbfield'))
	
	#Hold off start of laser ramps
	delay = f('CNC','delay')
	motpow.appendhold( delay )
	repdet.appendhold( delay )
	trapdet.appendhold( delay )
	reppow.appendhold( delay )
	trappow.appendhold( delay )
	
	#Do laser ramps
	motpow.linear(  cnv('motpow',  f('CNC','motpowf'))    if CNC == True else  cnv('motpow',f('MOT','motpow'))    ,  f('CNC','dtmotpow'))
	repdet.linear(  cnv('repdet',  f('CNC','repdetf'))    if CNC == True else  cnv('repdet',f('MOT','repdetSS'))  ,  f('CNC','dtrepdet'))
	trapdet.linear( cnv('trapdet', f('CNC','trapdetf'))   if CNC == True else  cnv('trapdet',f('MOT','trapdetSS')),  f('CNC','dttrapdet'))
	reppow.linear(  cnv('reppow',  f('CNC','reppowf'))    if CNC == True else  cnv('reppow',f('MOT','reppowSS'))  ,  f('CNC','dtreppow'))
	trappow.linear( cnv('trappow', f('CNC','trappowf'))   if CNC == True else  cnv('trappow',f('MOT','trappowSS')),  f('CNC','dttrappow'))
	
	print motpow.dt()
	#Extend all ramps to match current total duration
	print CNC
	lifetime = gen.bstr('Lifetime',report)
	ht = (f('CNC','holdtime') if CNC == True or lifetime == True else 0.0)
	print "holdtime = " + str(ht)
	DURATION = max( motpow.dt(), repdet.dt(), trapdet.dt(), reppow.dt(), trappow.dt(), bfield.dt() ) + ht
	#DURATION = DURATION + ht
	motpow.extend( DURATION)
	print motpow.dt()
	repdet.extend( DURATION)
	trapdet.extend(DURATION)
	bfield.extend( DURATION)
	reppow.extend( DURATION)
	trappow.extend( DURATION)
	maxN=int(math.floor( (DURATION)/ss))+1
	
	#print motpow.dt()
	#print reppow.dt()
	#print trappow.dt()
	#print repdet.dt()
	#print trapdet.dt()
	#print bfield.dt()
	#print uvdet.dt()
	
	#Up to here you have a Cooled and Compressed MOT
	#
	
	#Ramp down things quickly to UV values
	uvdt = f('UV','dt')
	motpow.linear(  cnv('motpow', f('UV','uvmotpow')), uvdt)
	reppow.linear(  cnv('reppow', f('UV','uvreppow')), uvdt)
	trappow.linear( 0.0                               ,uvdt)
	repdet.linear(  cnv('repdet', f('UV','uvrepdet')), uvdt)
	trapdet.linear( cnv('trapdet',f('UV','uvtrapdet')),uvdt)
	bfield.linear(  cnv('bfield', f('UV','uvbfield')), uvdt)
	
	#Hold UV MOT for uvmotdt 
	uvmotdt = f('UV','uvmotdt')
	motpow.appendhold(uvmotdt)
	reppow.appendhold(uvmotdt)
	trappow.appendhold(uvmotdt)
	repdet.appendhold(uvmotdt)
	trapdet.appendhold(uvmotdt)
	bfield.appendhold(uvmotdt)

	#Ramp up the bfield during uvramp
	uvramp = f('UV','uvramp')
	motpow.appendhold(uvramp)
	reppow.appendhold(uvramp)
	trappow.appendhold(uvramp)
	repdet.appendhold(uvramp)
	trapdet.appendhold(uvramp)
	bfield.linear( cnv('bfield', f('UV','uvbfieldf')), uvramp)
	
	#Hold everything for a little more
	uvhold = f('UV','uvhold')
	motpow.appendhold(uvhold)
	reppow.appendhold(uvhold)
	trappow.appendhold(uvhold)
	repdet.appendhold(uvhold)
	trapdet.appendhold(uvhold)
	bfield.appendhold(uvhold)
	
	CNCDURATION = DURATION
	UVMOTDURATION = DURATION + uvdt + uvmotdt + uvramp
	DURATION = UVMOTDURATION + uvhold	


	#Insert bfield imaging value at release
	bfield.linear(cnv('bfield',f(cam,'imgbfield')),0.0)
	
	#Insert AOM imaging values 30us after release
	imgdt=0.03
	motpow.appendhold(imgdt)
	repdet.appendhold(imgdt)
	trapdet.appendhold(imgdt)
	reppow.appendhold(imgdt)
	trappow.appendhold(imgdt)
	
	motpow.linear( cnv('motpow' ,f(cam,'imgpow')),    0.0)
	repdet.linear( cnv('repdet' ,f(cam,'imgdetrep')), 0.0)
	trapdet.linear(cnv('trapdet',f(cam,'imgdettrap')),0.0)
	reppow.linear( cnv('reppow' ,f(cam,'imgpowrep')), 0.0)
	trappow.linear(cnv('trappow',f(cam,'imgpowtrap')),0.0)

	maxDT = max( motpow.dt(), repdet.dt(), trapdet.dt(), bfield.dt(), reppow.dt(), trappow.dt())

	motpow.extend(maxDT)
	repdet.extend(maxDT)
	trapdet.extend(maxDT)
	bfield.extend(maxDT)
	reppow.extend(maxDT)
	trappow.extend(maxDT)

	motpow.fileoutput( 'L:/software/apparatus3/seq/ramps/motpow.txt')
	repdet.fileoutput( 'L:/software/apparatus3/seq/ramps/repdet.txt')
	trapdet.fileoutput('L:/software/apparatus3/seq/ramps/trapdet.txt')
	bfield.fileoutput( 'L:/software/apparatus3/seq/ramps/bfield.txt')
	reppow.fileoutput( 'L:/software/apparatus3/seq/ramps/reppow.txt')
	trappow.fileoutput('L:/software/apparatus3/seq/ramps/trappow.txt')

	return CNCDURATION, DURATION
コード例 #29
0
ファイル: cnc_.py プロジェクト: PedroMDuarte/apparatus3-seq
def cncRamps():
	# Initialize channels to MOT SS values and with cncstepsize
	ss=f('CNC','cncstepsize')
	motpow   = wfm.wave('motpow',cnv('motpow',f('MOT','motpow'))     ,ss)
	repdet   = wfm.wave('repdet',cnv('repdet',f('MOT','repdetSS'))   ,ss)
	trapdet  = wfm.wave('trapdet',cnv('trapdet',f('MOT','trapdetSS')) ,ss)
	reppow   = wfm.wave('reppow',cnv('reppow',f('MOT','reppowSS'))   ,ss)
	trappow  = wfm.wave('trappow',cnv('trappow',f('MOT','trappowSS')) ,ss)
	bfield   = wfm.wave('bfield',cnv('bfield',f('MOT','bfield'))     ,ss)
	
	CNC = gen.bstr('CNC',report)
	#If CNC is selected in the report then insert necessary linear ramps
	
	#First ramp bfield
	SINH = gen.bstr('sinh',report)
	if SINH == True:
		bfield.sinhRise(  cnv('bfield',  f('CNC','bfieldf'))    if CNC == True else  cnv('bfield',f('MOT','bfield'))    ,  f('CNC','dtbfield'), f('CNC','dtbfield')*f('CNC','taubfield'))
	else:
		bfield.linear(  cnv('bfield',  f('CNC','bfieldf'))    if CNC == True else  cnv('bfield',f('MOT','bfield'))    ,  f('CNC','dtbfield'))
	
	#Hold off start of laser ramps
	delay = f('CNC','delay')
	motpow.appendhold( delay )
	repdet.appendhold( delay )
	trapdet.appendhold( delay )
	reppow.appendhold( delay )
	trappow.appendhold( delay )
	
	#Do laser ramps
	motpow.linear(  cnv('motpow',  f('CNC','motpowf'))    if CNC == True else  cnv('motpow',f('MOT','motpow'))    ,  f('CNC','dtmotpow'))
	repdet.linear(  cnv('repdet',  f('CNC','repdetf'))    if CNC == True else  cnv('repdet',f('MOT','repdetSS'))  ,  f('CNC','dtrepdet'))
	trapdet.linear( cnv('trapdet', f('CNC','trapdetf'))   if CNC == True else  cnv('trapdet',f('MOT','trapdetSS')),  f('CNC','dttrapdet'))
	reppow.linear(  cnv('reppow',  f('CNC','reppowf'))    if CNC == True else  cnv('reppow',f('MOT','reppowSS'))  ,  f('CNC','dtreppow'))
	trappow.linear( cnv('trappow', f('CNC','trappowf'))   if CNC == True else  cnv('trappow',f('MOT','trappowSS')),  f('CNC','dttrappow'))
	
	print motpow.dt()
	#Extend all ramps to match current total duration
	print CNC
	ht = (f('CNC','holdtime') if CNC == True else 0.0)
	print "holdtime = " + str(ht)
	ENDCNC = max( motpow.dt(), repdet.dt(), trapdet.dt(), reppow.dt(), trappow.dt(), bfield.dt() ) + ht
	
	motpow.extend( ENDCNC)
	print motpow.dt()
	repdet.extend( ENDCNC)
	trapdet.extend(ENDCNC)
	bfield.extend( ENDCNC)
	reppow.extend( ENDCNC)
	trappow.extend( ENDCNC)
	maxN=int(math.floor( (ENDCNC)/ss))+1
	
	#print motpow.dt()
	#print reppow.dt()
	#print trappow.dt()
	#print repdet.dt()
	#print trapdet.dt()
	#print bfield.dt()
	#print uvdet.dt()
	
	#Up to here you have a Cooled and Compressed MOT
	#
	return motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC
コード例 #30
0
def constructLoadRamps(cam):
	global report

	# Initialize channels to MOT SS values and with cncstepsize
	ss=f('CNC','cncstepsize')
	motpow   = wfm.wave(cnv('motpow',f('MOT','motpow'))     ,ss)
	repdet   = wfm.wave(cnv('repdet',f('MOT','repdetSS'))   ,ss)
	trapdet  = wfm.wave(cnv('trapdet',f('MOT','trapdetSS')) ,ss)
	reppow   = wfm.wave(cnv('reppow',f('MOT','reppowSS'))   ,ss)
	trappow  = wfm.wave(cnv('trappow',f('MOT','trappowSS')) ,ss)
	bfield   = wfm.wave(cnv('bfield',f('MOT','bfield'))     ,ss)
	
	CNC = False 
	#Not doing CNC for photoionization rate measurement
	
	DURATION = 1.0
	#DURATION = DURATION + ht
	motpow.extend( DURATION)
	repdet.extend( DURATION)
	trapdet.extend(DURATION)
	bfield.extend( DURATION)
	reppow.extend( DURATION)
	trappow.extend( DURATION)
	maxN=int(math.floor( (DURATION)/ss))+1
	
	
	#Up to here you have a Cooled and Compressed MOT
	#


	#Insert bfield imaging value at release
	bfield.linear(cnv('bfield',f(cam,'imgbfield')),ss)
	
	#Insert AOM imaging values 30us after release
	imgdt=0.03
	motpow.appendhold(imgdt)
	repdet.appendhold(imgdt)
	trapdet.appendhold(imgdt)
	reppow.appendhold(imgdt)
	trappow.appendhold(imgdt)
	
	motpow.linear( cnv('motpow' ,f(cam,'imgpow')),    0.0)
	repdet.linear( cnv('repdet' ,f(cam,'imgdetrep')), 0.0)
	trapdet.linear(cnv('trapdet',f(cam,'imgdettrap')),0.0)
	reppow.linear( cnv('reppow' ,f(cam,'imgpowrep')), 0.0)
	trappow.linear(cnv('trappow',f(cam,'imgpowtrap')),0.0)

	maxDT = max( motpow.dt(), repdet.dt(), trapdet.dt(), bfield.dt(), reppow.dt(), trappow.dt())

	motpow.extend(maxDT)
	repdet.extend(maxDT)
	trapdet.extend(maxDT)
	bfield.extend(maxDT)
	reppow.extend(maxDT)
	trappow.extend(maxDT)

	motpow.fileoutput( 'L:/software/apparatus3/seq/ramps/motpow.txt')
	repdet.fileoutput( 'L:/software/apparatus3/seq/ramps/repdet.txt')
	trapdet.fileoutput('L:/software/apparatus3/seq/ramps/trapdet.txt')
	bfield.fileoutput( 'L:/software/apparatus3/seq/ramps/bfield.txt')
	reppow.fileoutput( 'L:/software/apparatus3/seq/ramps/reppow.txt')
	trappow.fileoutput('L:/software/apparatus3/seq/ramps/trappow.txt')

	return DURATION
コード例 #31
0
def constructUVSpecRamps(cam):
    global report

    # Initialize channels to MOT SS values and with cncstepsize
    ss = f('CNC', 'cncstepsize')
    motpow = wfm.wave(cnv('motpow', f('MOT', 'motpow')), ss)
    repdet = wfm.wave(cnv('repdet', f('MOT', 'repdetSS')), ss)
    trapdet = wfm.wave(cnv('trapdet', f('MOT', 'trapdetSS')), ss)
    reppow = wfm.wave(cnv('reppow', f('MOT', 'reppowSS')), ss)
    trappow = wfm.wave(cnv('trappow', f('MOT', 'trappowSS')), ss)
    bfield = wfm.wave(cnv('bfield', f('MOT', 'bfield')), ss)

    #Ramp down  bfield
    bfield.linear(cnv('bfield', f('UVSPEC', 'uvbfield')), 10 * ss)
    bfield.appendhold(f('UVSPEC', 'lowfieldDT'))

    maxCNCdt = max(motpow.dt(), repdet.dt(), trapdet.dt(), bfield.dt())

    DURATION = maxCNCdt

    motpow.extend(DURATION)
    repdet.extend(DURATION)
    trapdet.extend(DURATION)
    bfield.extend(DURATION)

    maxN = int(math.floor((DURATION) / ss)) + 1

    #Initialize AO power channels
    reppow = wfm.wave(cnv('reppow', f('MOT', 'reppowSS')), ss, maxN)
    trappow = wfm.wave(cnv('trappow', f('MOT', 'trappowSS')), ss, maxN)

    #Insert bfield imaging value at release
    bfield.linear(cnv('bfield', f(cam, 'imgbfield')), 0.0)

    #Insert AOM imaging values 50us after release
    imgdt = 0.2
    motpow.appendhold(imgdt)
    repdet.appendhold(imgdt)
    trapdet.appendhold(imgdt)
    reppow.appendhold(imgdt)
    trappow.appendhold(imgdt)

    motpow.linear(cnv('motpow', f(cam, 'imgpow')), 0.0)
    repdet.linear(cnv('repdet', f(cam, 'imgdetrep')), 0.0)
    trapdet.linear(cnv('trapdet', f(cam, 'imgdettrap')), 0.0)
    reppow.linear(cnv('reppow', f(cam, 'imgpowrep')), 0.0)
    trappow.linear(cnv('trappow', f(cam, 'imgpowtrap')), 0.0)


    maxDT = max( motpow.dt(), repdet.dt(), trapdet.dt(), bfield.dt(),\
     reppow.dt(), trappow.dt())

    motpow.extend(maxDT)
    repdet.extend(maxDT)
    trapdet.extend(maxDT)
    bfield.extend(maxDT)
    reppow.extend(maxDT)
    trappow.extend(maxDT)

    motpow.fileoutput('L:/software/apparatus3/seq/ramps/motpow.txt')
    repdet.fileoutput('L:/software/apparatus3/seq/ramps/repdet.txt')
    trapdet.fileoutput('L:/software/apparatus3/seq/ramps/trapdet.txt')
    bfield.fileoutput('L:/software/apparatus3/seq/ramps/bfield.txt')
    reppow.fileoutput('L:/software/apparatus3/seq/ramps/reppow.txt')
    trappow.fileoutput('L:/software/apparatus3/seq/ramps/trappow.txt')
    return DURATION
コード例 #32
0
def cncRamps():
    # Initialize channels to MOT SS values and with cncstepsize
    ss = f('CNC', 'cncstepsize')
    motpow = wfm.wave('motpow', cnv('motpow', f('MOT', 'motpow')), ss)
    repdet = wfm.wave('repdet', cnv('repdet', f('MOT', 'repdetSS')), ss)
    trapdet = wfm.wave('trapdet', cnv('trapdet', f('MOT', 'trapdetSS')), ss)
    reppow = wfm.wave('reppow', cnv('reppow', f('MOT', 'reppowSS')), ss)
    trappow = wfm.wave('trappow', cnv('trappow', f('MOT', 'trappowSS')), ss)
    bfield = wfm.wave('bfield', cnv('bfield', f('MOT', 'bfield')), ss)

    CNC = gen.bstr('CNC', report)
    #If CNC is selected in the report then insert necessary linear ramps

    #First ramp bfield
    SINH = gen.bstr('sinh', report)
    if SINH == True:
        bfield.sinhRise(
            cnv('bfield', f('CNC', 'bfieldf')) if CNC == True else cnv(
                'bfield', f('MOT', 'bfield')), f('CNC', 'dtbfield'),
            f('CNC', 'dtbfield') * f('CNC', 'taubfield'))
    else:
        bfield.linear(
            cnv('bfield', f('CNC', 'bfieldf')) if CNC == True else cnv(
                'bfield', f('MOT', 'bfield')), f('CNC', 'dtbfield'))

    #Hold off start of laser ramps
    delay = f('CNC', 'delay')
    motpow.appendhold(delay)
    repdet.appendhold(delay)
    trapdet.appendhold(delay)
    reppow.appendhold(delay)
    trappow.appendhold(delay)

    #Do laser ramps
    motpow.linear(
        cnv('motpow', f('CNC', 'motpowf')) if CNC == True else cnv(
            'motpow', f('MOT', 'motpow')), f('CNC', 'dtmotpow'))
    repdet.linear(
        cnv('repdet', f('CNC', 'repdetf')) if CNC == True else cnv(
            'repdet', f('MOT', 'repdetSS')), f('CNC', 'dtrepdet'))
    trapdet.linear(
        cnv('trapdet', f('CNC', 'trapdetf')) if CNC == True else cnv(
            'trapdet', f('MOT', 'trapdetSS')), f('CNC', 'dttrapdet'))
    reppow.linear(
        cnv('reppow', f('CNC', 'reppowf')) if CNC == True else cnv(
            'reppow', f('MOT', 'reppowSS')), f('CNC', 'dtreppow'))
    trappow.linear(
        cnv('trappow', f('CNC', 'trappowf')) if CNC == True else cnv(
            'trappow', f('MOT', 'trappowSS')), f('CNC', 'dttrappow'))

    print motpow.dt()
    #Extend all ramps to match current total duration
    print CNC
    ht = (f('CNC', 'holdtime') if CNC == True else 0.0)
    print "holdtime = " + str(ht)
    ENDCNC = max(motpow.dt(), repdet.dt(), trapdet.dt(), reppow.dt(),
                 trappow.dt(), bfield.dt()) + ht

    motpow.extend(ENDCNC)
    print motpow.dt()
    repdet.extend(ENDCNC)
    trapdet.extend(ENDCNC)
    bfield.extend(ENDCNC)
    reppow.extend(ENDCNC)
    trappow.extend(ENDCNC)
    maxN = int(math.floor((ENDCNC) / ss)) + 1

    #print motpow.dt()
    #print reppow.dt()
    #print trappow.dt()
    #print repdet.dt()
    #print trapdet.dt()
    #print bfield.dt()
    #print uvdet.dt()

    #Up to here you have a Cooled and Compressed MOT
    #
    return motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC
コード例 #33
0
ファイル: uvcool.py プロジェクト: PedroMDuarte/apparatus3-seq
def constructUVCoolRamps(cam):
	global report

	# Initialize channels to MOT SS values and with cncstepsize
	ss=f('CNC','cncstepsize')
	motpow   = wfm.wave(cnv('motpow',f('MOT','motpow')), ss)
	repdet   = wfm.wave(cnv('repdet',f('MOT','repdetSS')),ss)
	trapdet  = wfm.wave(cnv('trapdet',f('MOT','trapdetSS')),ss)
	reppow   = wfm.wave(cnv('reppow',f('MOT','reppowSS')),ss)
	trappow  = wfm.wave(cnv('trappow',f('MOT','trappowSS')),ss)
	bfield   = wfm.wave(cnv('bfield',f('MOT','bfield')),ss)
	
	#Ramp down  bfield and trapping beam and motpow
	bfield.linear( cnv('bfield',f('UVCOOL','uvbfield')), ss)
	trappow.linear( cnv('trappow',f('UVCOOL','trapP')),ss)
	motpow.linear( cnv('motpow',f('UVCOOL','motP')),ss)
	bfield.appendhold(f('UVCOOL','cooldt')-ss)

	maxCNCdt = max( motpow.dt(), repdet.dt(), trapdet.dt(), bfield.dt() )

	DURATION = maxCNCdt

	motpow.extend( DURATION)
	repdet.extend( DURATION)
	trapdet.extend(DURATION)
	reppow.extend(DURATION)
	trappow.extend(DURATION)
	bfield.extend( DURATION)

	maxN=int(math.floor( (DURATION)/ss))+1


	#Insert bfield imaging value at release
	bfield.linear(cnv('bfield',f(cam,'imgbfield')),0.0)
	
	#Insert AOM imaging values 50us after release
	imgdt=0.2
	motpow.appendhold(imgdt)
	repdet.appendhold(imgdt)
	trapdet.appendhold(imgdt)
	reppow.appendhold(imgdt)
	trappow.appendhold(imgdt)
	
	motpow.linear(cnv('motpow',f(cam,'imgpow')),0.0)
	repdet.linear(cnv('repdet',f(cam,'imgdetrep')),0.0)
	trapdet.linear(cnv('trapdet',f(cam,'imgdettrap')),0.0)
	reppow.linear(cnv('reppow',f(cam,'imgpowrep')),0.0)
	trappow.linear(cnv('trappow',f(cam,'imgpowtrap')),0.0)


	maxDT = max( motpow.dt(), repdet.dt(), trapdet.dt(), bfield.dt(),\
		reppow.dt(), trappow.dt())

	motpow.extend(maxDT)
	repdet.extend(maxDT)
	trapdet.extend(maxDT)
	bfield.extend(maxDT)
	reppow.extend(maxDT)
	trappow.extend(maxDT)

	
	motpow.fileoutput( 'L:/software/apparatus3/seq/ramps/motpow.txt')
	repdet.fileoutput( 'L:/software/apparatus3/seq/ramps/repdet.txt')
	trapdet.fileoutput('L:/software/apparatus3/seq/ramps/trapdet.txt')
	bfield.fileoutput( 'L:/software/apparatus3/seq/ramps/bfield.txt')
	reppow.fileoutput( 'L:/software/apparatus3/seq/ramps/reppow.txt')
	trappow.fileoutput('L:/software/apparatus3/seq/ramps/trappow.txt')
	return DURATION
コード例 #34
0
def odt_lightshift(image):
    evap_ss = f('EVAP', 'evapss')

    p0 = f('ODT', 'odtpow')
    p1 = f('EVAP', 'p1')
    t1 = f('EVAP', 't1')
    tau = f('EVAP', 'tau')
    beta = f('EVAP', 'beta')

    waitdt = f('UVLS', 'waitdt')
    waitdt2 = f('UVLS', 'waitdt2')

    cdt = f('UVLS', 'cdt')
    cpow = f('UVLS', 'cpow')

    b0 = f('FESHBACH', 'bias')
    bf = 0.0
    bdt = f('UVLS', 'bdt')
    bpulse = cnv('bfield', f('UVLS', 'bpulse'))
    dtpulse = f('UVLS', 'pulse')
    bimg = 0.0

    uvfreq = f('UVLS', 'uvfreq')
    det = cnv('uvdet', f('UVLS', 'uvdet'))
    power = f('UVLS', 'uvpow2')

    odtpow = wfm.wave('odtpow', cnv('odtpow', p0), evap_ss)
    bfield = wfm.wave('bfield', cnv('bfield', b0), evap_ss)
    uv1freq = wfm.wave('uv1freq', 5.905, evap_ss)
    uvdet = wfm.wave('uvdet', 2.9, evap_ss)
    uvpow = wfm.wave('uvpow', cnv('uvpow', f('UV', 'uvpow')), evap_ss)
    #uvpow2= wfm.wave('uvpow2', power, evap_ss)

    uv1freq.linear(uvfreq, 10.0)
    uvdet.linear(det, 100)
    uvpow.linear(cnv('uvpow', f('UVLS', 'lspow')), 10.0)

    odtpow.Evap(p0, p1, t1, tau, beta, image)
    bfield.extend(odtpow.dt())
    bfield.linear(bpulse, bdt)
    bfield.appendhold(waitdt)
    odtpow.extend(bfield.dt())

    odtpow.linear(cnv('odtpow', cpow), cdt)
    odtpow.appendhold(waitdt2)
    bfield.extend(odtpow.dt())

    ENDC = max(odtpow.dt(), bfield.dt())

    hframpdt = f('UVLS', 'hframpdt')
    bfield.appendhold(dtpulse)

    bfield.linear(cnv('bfield', b0), hframpdt)
    #bfield.linear( 0.0, evap_ss)

    totalDT = bfield.dt()

    odtpow.extend(totalDT)
    uv1freq.extend(totalDT)
    uvdet.extend(totalDT)

    return odtpow, bfield, uv1freq, uvdet, uvpow, ENDC
コード例 #35
0
# ENDCNC is defined as the time up to release from the MOT
motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC = cnc.cncRamps()

trappow, reppow, bfield, ENDCNC = cnc.state_transfer(trappow, reppow, bfield)


# Set imaging values
camera = 'ANDOR'
motpow, repdet, trapdet, reppow, trappow, maxDT = cnc.imagingRamps_nobfield(motpow, repdet, trapdet, reppow, trappow, camera)

#Switch bfield to FESHBACH
switchdt  = float(report['FESHBACH']['switchdt'])
bfield.linear(0.0,ss)
bfield.appendhold(4*switchdt)
bias  = float(report['FESHBACH']['bias'])
bfield.linear(cnv('bfield',bias),40.0)
#bfield.ExponentialTurnOn( bias, 20.0, 3.0, 'bfield')


# Add adiabatic ramp down to ODT
#odtpow = odt.odt_adiabaticDown(ss,ENDUVMOT)
	
#Add waveforms to sequence
s.analogwfm_add(ss,[ motpow, repdet, trapdet, bfield, reppow, trappow])
	
#wait normally rounds down using floor, here the duration is changed before so that
#the wait is rounded up
ENDCNC = ss*math.ceil(ENDCNC/ss)
	
#insert QUICK pulse  for fast ramping of the field gradient
s.wait(-10.0)
コード例 #36
0
# ENDCNC is defined as the time up to release from the MOT
motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC = cnc.cncRamps()
motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC = cnc.statetransfer_F32(
    motpow, repdet, trapdet, reppow, trappow, bfield
)
# motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC = cnc.statetransfer_F12(motpow, repdet, trapdet, reppow, trappow, bfield)

camera = "ANDOR"
# Set imaging values
motpow, repdet, trapdet, reppow, trappow, bfield, maxDT = cnc.imagingRamps(
    motpow, repdet, trapdet, reppow, trappow, bfield, camera
)

# Set uv1freq for lightshift probing
freq = float(report["UVLIGHTSHIFT"]["freq"])
uv1freq = wfm.wave("uv1freq", cnv("uv1freq", freq), ss)
uv1freq.extend(maxDT)

# Add waveforms to sequence
s.analogwfm_add(ss, [motpow, repdet, trapdet, bfield, reppow, trappow, uv1freq])

# wait normally rounds down using floor, here the duration is changed before so that
# the wait is rounded up
ENDCNC = ss * math.ceil(ENDCNC / ss)

# insert QUICK pulse  for fast ramping of the field gradient
s.wait(-10.0)
quickval = 1 if gen.bstr("CNC", report) == True else 0
s.digichg("quick", quickval)
s.wait(10.0)
コード例 #37
0
ss=float(report['CNC']['cncstepsize'])
	
# Cool and Compress MOT
# ENDCNC is defined as the time up to release from the MOT
motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC = cnc.cncRamps()
#motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC = cnc.statetransfer_F32(motpow, repdet, trapdet, reppow, trappow, bfield)
motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC = cnc.statetransfer_F12(motpow, repdet, trapdet, reppow, trappow, bfield)

#camera='ANDOR'
camera='BASLER'
# Set imaging values
motpow, repdet, trapdet, reppow, trappow, bfield, maxDT = cnc.imagingRamps(motpow, repdet, trapdet, reppow, trappow, bfield, camera)

# Set uv1freq for lightshift probing
freq=float(report['UVLIGHTSHIFT']['freq'])
uv1freq = wfm.wave('uv1freq',cnv('uv1freq',freq),ss)
uv1freq.extend(maxDT)
	
#Add waveforms to sequence
s.analogwfm_add(ss,[motpow,repdet,trapdet,bfield,reppow,trappow,uv1freq])
	
#wait normally rounds down using floor, here the duration is changed before so that
#the wait is rounded up
ENDCNC = ss*math.ceil(ENDCNC/ss)
	
#insert QUICK pulse  for fast ramping of the field gradient
s.wait(-10.0)
quickval = 1 if gen.bstr('CNC',report) == True else 0
s.digichg('quick',quickval)
s.wait(10.0)
	
コード例 #38
0
ファイル: odt_.py プロジェクト: huletlab/apparatus3-seq
def odt_lightshift(image):
    evap_ss = f("EVAP", "evapss")

    p0 = f("ODT", "odtpow")
    p1 = f("EVAP", "p1")
    t1 = f("EVAP", "t1")
    tau = f("EVAP", "tau")
    beta = f("EVAP", "beta")

    waitdt = f("UVLS", "waitdt")
    waitdt2 = f("UVLS", "waitdt2")

    cdt = f("UVLS", "cdt")
    cpow = f("UVLS", "cpow")

    b0 = f("FESHBACH", "bias")
    bf = 0.0
    bdt = f("UVLS", "bdt")
    bpulse = cnv("bfield", f("UVLS", "bpulse"))
    dtpulse = f("UVLS", "pulse")
    bimg = 0.0

    uvfreq = f("UVLS", "uvfreq")
    det = cnv("uvdet", f("UVLS", "uvdet"))
    power = f("UVLS", "uvpow2")

    odtpow = wfm.wave("odtpow", cnv("odtpow", p0), evap_ss)
    bfield = wfm.wave("bfield", cnv("bfield", b0), evap_ss)
    uv1freq = wfm.wave("uv1freq", 5.905, evap_ss)
    uvdet = wfm.wave("uvdet", 2.9, evap_ss)
    uvpow = wfm.wave("uvpow", cnv("uvpow", f("UV", "uvpow")), evap_ss)
    # uvpow2= wfm.wave('uvpow2', power, evap_ss)

    uv1freq.linear(uvfreq, 10.0)
    uvdet.linear(det, 100)
    uvpow.linear(cnv("uvpow", f("UVLS", "lspow")), 10.0)

    odtpow.Evap(p0, p1, t1, tau, beta, image)
    bfield.extend(odtpow.dt())
    bfield.linear(bpulse, bdt)
    bfield.appendhold(waitdt)
    odtpow.extend(bfield.dt())

    odtpow.linear(cnv("odtpow", cpow), cdt)
    odtpow.appendhold(waitdt2)
    bfield.extend(odtpow.dt())

    ENDC = max(odtpow.dt(), bfield.dt())

    hframpdt = f("UVLS", "hframpdt")
    bfield.appendhold(dtpulse)

    bfield.linear(cnv("bfield", b0), hframpdt)
    # bfield.linear( 0.0, evap_ss)

    totalDT = bfield.dt()

    odtpow.extend(totalDT)
    uv1freq.extend(totalDT)
    uvdet.extend(totalDT)

    return odtpow, bfield, uv1freq, uvdet, uvpow, ENDC
コード例 #39
0
def constructLoadRamps(cam):
    global report

    # Initialize channels to MOT SS values and with cncstepsize
    ss = f('CNC', 'cncstepsize')
    motpow = wfm.wave(cnv('motpow', f('MOT', 'motpow')), ss)
    repdet = wfm.wave(cnv('repdet', f('MOT', 'repdetSS')), ss)
    trapdet = wfm.wave(cnv('trapdet', f('MOT', 'trapdetSS')), ss)
    reppow = wfm.wave(cnv('reppow', f('MOT', 'reppowSS')), ss)
    trappow = wfm.wave(cnv('trappow', f('MOT', 'trappowSS')), ss)
    bfield = wfm.wave(cnv('bfield', f('MOT', 'bfield')), ss)

    CNC = gen.bstr('CNC', report)
    #If CNC is selected in the report then insert necessary linear ramps

    #First ramp bfield
    SINH = gen.bstr('sinh', report)
    if SINH == True:
        bfield.sinhRise(
            cnv('bfield', f('CNC', 'bfieldf')) if CNC == True else cnv(
                'bfield', f('MOT', 'bfield')), f('CNC', 'dtbfield'),
            f('CNC', 'dtbfield') * f('CNC', 'taubfield'))
    else:
        bfield.linear(
            cnv('bfield', f('CNC', 'bfieldf')) if CNC == True else cnv(
                'bfield', f('MOT', 'bfield')), f('CNC', 'dtbfield'))

    #Hold off start of laser ramps
    delay = f('CNC', 'delay')
    motpow.appendhold(delay)
    repdet.appendhold(delay)
    trapdet.appendhold(delay)
    reppow.appendhold(delay)
    trappow.appendhold(delay)

    #Do laser ramps
    motpow.linear(
        cnv('motpow', f('CNC', 'motpowf')) if CNC == True else cnv(
            'motpow', f('MOT', 'motpow')), f('CNC', 'dtmotpow'))
    repdet.linear(
        cnv('repdet', f('CNC', 'repdetf')) if CNC == True else cnv(
            'repdet', f('MOT', 'repdetSS')), f('CNC', 'dtrepdet'))
    trapdet.linear(
        cnv('trapdet', f('CNC', 'trapdetf')) if CNC == True else cnv(
            'trapdet', f('MOT', 'trapdetSS')), f('CNC', 'dttrapdet'))
    reppow.linear(
        cnv('reppow', f('CNC', 'reppowf')) if CNC == True else cnv(
            'reppow', f('MOT', 'reppowSS')), f('CNC', 'dtreppow'))
    trappow.linear(
        cnv('trappow', f('CNC', 'trappowf')) if CNC == True else cnv(
            'trappow', f('MOT', 'trappowSS')), f('CNC', 'dttrappow'))

    print motpow.dt()
    #Extend all ramps to match current total duration
    print CNC
    lifetime = gen.bstr('Lifetime', report)
    ht = (f('CNC', 'holdtime') if CNC == True or lifetime == True else 0.0)
    print "holdtime = " + str(ht)
    DURATION = max(motpow.dt(), repdet.dt(), trapdet.dt(), reppow.dt(),
                   trappow.dt(), bfield.dt()) + ht
    #DURATION = DURATION + ht
    motpow.extend(DURATION)
    print motpow.dt()
    repdet.extend(DURATION)
    trapdet.extend(DURATION)
    bfield.extend(DURATION)
    reppow.extend(DURATION)
    trappow.extend(DURATION)
    maxN = int(math.floor((DURATION) / ss)) + 1

    #print motpow.dt()
    #print reppow.dt()
    #print trappow.dt()
    #print repdet.dt()
    #print trapdet.dt()
    #print bfield.dt()
    #print uvdet.dt()

    #Up to here you have a Cooled and Compressed MOT
    #

    #Ramp down things quickly to UV values
    uvdt = f('UV', 'dt')
    motpow.linear(cnv('motpow', f('UV', 'uvmotpow')), uvdt)
    reppow.linear(cnv('reppow', f('UV', 'uvreppow')), uvdt)
    trappow.linear(0.0, uvdt)
    repdet.linear(cnv('repdet', f('UV', 'uvrepdet')), uvdt)
    trapdet.linear(cnv('trapdet', f('UV', 'uvtrapdet')), uvdt)
    bfield.linear(cnv('bfield', f('UV', 'uvbfield')), uvdt)

    #Hold UV MOT for uvmotdt
    uvmotdt = f('UV', 'uvmotdt')
    motpow.appendhold(uvmotdt)
    reppow.appendhold(uvmotdt)
    trappow.appendhold(uvmotdt)
    repdet.appendhold(uvmotdt)
    trapdet.appendhold(uvmotdt)
    bfield.appendhold(uvmotdt)

    #Ramp up the bfield during uvramp
    uvramp = f('UV', 'uvramp')
    motpow.appendhold(uvramp)
    reppow.appendhold(uvramp)
    trappow.appendhold(uvramp)
    repdet.appendhold(uvramp)
    trapdet.appendhold(uvramp)
    bfield.linear(cnv('bfield', f('UV', 'uvbfieldf')), uvramp)

    #Hold everything for a little more
    uvhold = f('UV', 'uvhold')
    motpow.appendhold(uvhold)
    reppow.appendhold(uvhold)
    trappow.appendhold(uvhold)
    repdet.appendhold(uvhold)
    trapdet.appendhold(uvhold)
    bfield.appendhold(uvhold)

    CNCDURATION = DURATION
    UVMOTDURATION = DURATION + uvdt + uvmotdt + uvramp
    DURATION = UVMOTDURATION + uvhold

    #Insert bfield imaging value at release
    bfield.linear(cnv('bfield', f(cam, 'imgbfield')), 0.0)

    #Insert AOM imaging values 30us after release
    imgdt = 0.03
    motpow.appendhold(imgdt)
    repdet.appendhold(imgdt)
    trapdet.appendhold(imgdt)
    reppow.appendhold(imgdt)
    trappow.appendhold(imgdt)

    motpow.linear(cnv('motpow', f(cam, 'imgpow')), 0.0)
    repdet.linear(cnv('repdet', f(cam, 'imgdetrep')), 0.0)
    trapdet.linear(cnv('trapdet', f(cam, 'imgdettrap')), 0.0)
    reppow.linear(cnv('reppow', f(cam, 'imgpowrep')), 0.0)
    trappow.linear(cnv('trappow', f(cam, 'imgpowtrap')), 0.0)

    maxDT = max(motpow.dt(), repdet.dt(), trapdet.dt(), bfield.dt(),
                reppow.dt(), trappow.dt())

    motpow.extend(maxDT)
    repdet.extend(maxDT)
    trapdet.extend(maxDT)
    bfield.extend(maxDT)
    reppow.extend(maxDT)
    trappow.extend(maxDT)

    motpow.fileoutput('L:/software/apparatus3/seq/ramps/motpow.txt')
    repdet.fileoutput('L:/software/apparatus3/seq/ramps/repdet.txt')
    trapdet.fileoutput('L:/software/apparatus3/seq/ramps/trapdet.txt')
    bfield.fileoutput('L:/software/apparatus3/seq/ramps/bfield.txt')
    reppow.fileoutput('L:/software/apparatus3/seq/ramps/reppow.txt')
    trappow.fileoutput('L:/software/apparatus3/seq/ramps/trappow.txt')

    return CNCDURATION, DURATION