def run(s, camera): global report ss = f('CNC', 'cncstepsize') # Cool and Compress MOT # DURATION is defined as the time up to release from the MOT motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC = cnc.cncRamps() # Load UVMOT from CNCMOT uvfppiezo, uvpow, motpow, repdet, trapdet, reppow, trappow, bfield, ENDUVMOT = uvcoolRamps( motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC) # Imaging motpow, repdet, trapdet, reppow, trappow, bfield, maxDT = cnc.imagingRamps( motpow, repdet, trapdet, reppow, trappow, bfield, camera) uvfppiezo.extend(maxDT) uvpow.extend(maxDT) #Add the waveforms 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) #insert UV pulse s.wait(ENDCNC) s.wait(f('UVRED', 'uvtime')) #Shut down the UVAOM's and open the shutter s.wait(-50.0) s.digichg('uvaom1', 0) s.digichg('uvaom2', 0) s.digichg('uvshutter', 1) s.wait(50.0) #Turn on UVAOM s.digichg('uvaom1', 1) s.wait(-f('UVRED', 'uvtime') - ENDCNC) #Go to MOT release time turn off UV and set QUICK back to low s.wait(ENDUVMOT) s.digichg('uvaom1', 0) s.digichg('quick', 0) #print s.tcur return s, ENDUVMOT
def run(s,camera): global report ss=f('CNC','cncstepsize') # Cool and Compress MOT # DURATION is defined as the time up to release from the MOT motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC = cnc.cncRamps() # Load UVMOT from CNCMOT uvfppiezo, uvpow, motpow, repdet, trapdet, reppow, trappow, bfield, ENDUVMOT = uvcoolRamps(motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC) # Imaging motpow, repdet, trapdet, reppow, trappow, bfield, maxDT = cnc.imagingRamps(motpow, repdet, trapdet, reppow, trappow, bfield,camera) uvfppiezo.extend(maxDT) uvpow.extend(maxDT) #Add the waveforms 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) #insert UV pulse s.wait(ENDCNC) s.wait(f('UVRED','uvtime')) #Shut down the UVAOM's and open the shutter s.wait(-50.0) s.digichg('uvaom1',0) s.digichg('uvaom2',0) s.digichg('uvshutter',1) s.wait(50.0) #Turn on UVAOM s.digichg('uvaom1',1) s.wait(-f('UVRED','uvtime') - ENDCNC) #Go to MOT release time turn off UV and set QUICK back to low s.wait(ENDUVMOT) s.digichg('uvaom1',0) s.digichg('quick',0) #print s.tcur return s, ENDUVMOT
def go_to_highfield(s): #Keep ODT on ODT = gen.bstr('ODT',report) if ODT == True: s.digichg('odtttl',1) s.wait(20.0) ss = float(report['SEQ']['analogstepsize']) # 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() # Load UVMOT from CNCMOT uvfppiezo, uvpow, motpow, repdet, trapdet, reppow, trappow, bfield, ENDUVMOT = uvcooling.uvcoolRamps(motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC) # Set imaging values camera = 'ANDOR' motpow, repdet, trapdet, reppow, trappow, maxDT = cnc.imagingRamps_nobfield(motpow, repdet, trapdet, reppow, trappow, camera) # Switch bfield to FESHBACH overlapdt = float(report['ODT']['overlapdt']) rampdelay = float(report['ODT']['rampdelay']) rampbf = float(report['ODT']['rampbf']) bf = float(report['ODT']['bf']) feshbachdt = float(report['ODT']['feshbachdt']) switchondt = float(report['FESHBACH']['switchondt']) switchdelay = float(report['FESHBACH']['switchdelay']) bias = float(report['FESHBACH']['bias']) biasrampdt = float(report['FESHBACH']['rampdt']) bfield.chop(ENDUVMOT-overlapdt) bfield.appendhold(rampdelay) bfield.linear( bf, rampbf) bfield.extend(ENDUVMOT+feshbachdt) bfield.linear(0.0, 0.0) ENDBFIELD = feshbachdt bfield.appendhold( switchondt + switchdelay) bfield.linear(bias,biasrampdt) rampupdt = float(report['ODT']['rampupdt']) updt = float(report['ODT']['updt']) overshootdt = float(report['ODT']['overshootdt']) #~ odtpow0 = wfm.wave('odtpow', 0.0, ss) #~ odtpow0.extend(ENDUVMOT-overlapdt-updt-rampupdt) #~ odtpow0.odt_linear( 0.0 , f('ODT','odtpow0'), rampupdt) #~ odtpow0.appendhold( updt) #~ odtpow0.odt_linear(f('ODT','odtpow0'), f('ODT','odtpow'), overshootdt) odtpow0 = wfm.wave('odtpow', f('ODT','odtpow0'), ss) odtpow0.extend(ENDUVMOT-overlapdt) odtpow0.odt_linear(f('ODT','odtpow0'), f('ODT','odtpow'), overshootdt) EXTRA = max( overshootdt - (bfield.dt() - (ENDUVMOT-overlapdt-updt-rampupdt)) , 0.0) print "...EXTRA time to allow for ODT overshoot = %f" % EXTRA #Add waveforms to sequence s.analogwfm_add(ss,[ motpow, repdet, trapdet, bfield, reppow, trappow, uvfppiezo, uvpow, odtpow0]) #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) #insert UV pulse uvtime = float(report['UV']['uvtime']) s.wait(ENDCNC) s.digichg('quick',0) s.wait(uvtime) #Shut down the UVAOM's and open the shutter s.wait(-50.0) s.digichg('uvaom1',0) s.digichg('uvaom2',0) s.digichg('uvshutter',1) s.wait(50.0) #Turn on UVAOM s.digichg('uvaom1',1) s.wait(-uvtime - ENDCNC) #Go to MOT release time and set QUICK back to low s.wait(ENDUVMOT) s.digichg('quick',0) #Leave UVMOT on for state transfer fstatedt = float(report['ODT']['fstatedt']) s.wait(fstatedt) s.digichg('uvaom1',0) s.wait(-fstatedt) #RELEASE FROM MOT waitshutter=5.0 s.wait(waitshutter) s.digichg('uvshutter',0) #~ s.wait(20.0) #~ s.digichg('uvaom1',0) #~ s.digichg('uvaom2',0) #~ s.wait(-20.0) s.wait(-waitshutter) s.digichg('motswitch',0) s.digichg('motshutter',1) s.digichg('field',0) #Insert ODT overlap with UVMOT and switch field to FESHBACH overlapdt = float(report['ODT']['overlapdt']) servodt = float(report['ODT']['servodt']) s.wait(-overlapdt-servodt) s.digichg('odt7595',1) s.wait(servodt) s.digichg('odtttl',1) #feshbachdt = rampdelay + rampbf + holdbf s.wait(overlapdt) s.wait( feshbachdt ) s.digichg('feshbach',1) #s.wait(overlapdt - feshbachdt) #s.wait( -feshbachdt) #s.wait(offdelay) #s.wait(2*switchdt) #s.wait(quickdelay) s.wait(switchondt) do_quick=1 s.digichg('field',1) s.digichg('hfquick',do_quick) s.digichg('quick',do_quick) #Can't leave quick ON for more than quickmax quickmax=100. s.wait(quickmax) s.digichg('hfquick',0) s.digichg('quick',0) s.wait(-quickmax) s.wait(switchdelay+biasrampdt) s.digichg('quick',0) s.wait(-biasrampdt) #s.wait(-switchdelay-quickdelay-2*switchdt-offdelay) s.wait(-switchdelay - switchondt - feshbachdt - ss) #At this point the time sequence is at ENDUVMOT #This is the time until the end of the bfield ramp #toENDBFIELD = biasrampdt + switchdelay + quickdelay + 2*switchdt + offdelay toENDBFIELD = biasrampdt + switchdelay + switchondt + feshbachdt return s, toENDBFIELD + EXTRA
#SEQUENCE s=seq.sequence(stepsize) s=gen.initial(s) #Keep ODT on ODT = gen.bstr('ODT',report) if ODT == True: s.digichg('odtttl',1) s.wait(20.0) ss=float(report['CNC']['cncstepsize']) # Cool and Compress MOT # DURATION is defined as the time up to release from the MOT motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC = cnc.cncRamps() # Load UVMOT from CNCMOT uvfppiezo, uvpow, motpow, repdet, trapdet, reppow, trappow, bfield, ENDUVMOT = uvcooling.uvcoolRamps(motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC) # Optical pumping motpow, repdet, trapdet, reppow, trappow, bfield, ENDPUMPING= cnc.statetransfer_wprobe(motpow, repdet, trapdet, reppow, trappow, bfield) ENDPUMPING=ENDPUMPING-ENDUVMOT # Imaging camera='ANDOR' motpow, repdet, trapdet, reppow, trappow, bfield, maxDT = cnc.imagingRamps(motpow, repdet, trapdet, reppow, trappow, bfield,camera) uvfppiezo.extend(maxDT) uvpow.extend(maxDT) #Add the waveforms
s=seq.sequence(stepsize) s=gen.initial(s) s.digichg('hfimg',1) #Keep ODT on ODT = gen.bstr('ODT',report) if ODT == True: s.digichg('odtttl',1) s.wait(20.0) ss = float(report['SEQ']['analogstepsize']) # 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() # Load UVMOT from CNCMOT uvfppiezo, uvpow, motpow, repdet, trapdet, reppow, trappow, bfield, ENDUVMOT = uvcooling.uvcoolRamps(motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC) # 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']) 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'])
def go_to_highfield(s): #---Keep ODT on odton = gen.bstr('ODT',report) if odton == True: s.digichg('odtttl',1) s.wait(20.0) ss = SEQ.analogstepsize #---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() #---Load UVMOT from CNCMOT uvpow2, uvpow, motpow, bfield, ENDUVMOT = uvmot.uvRamps(motpow, bfield, ENDCNC) repdet.extend(ENDUVMOT) trapdet.extend(ENDUVMOT) reppow.extend(ENDUVMOT) trappow.extend(ENDUVMOT) #---Make sure everything has the same length before setting imaging values #--- Set imaging values camera = 'ANDOR' motpow, repdet, trapdet, reppow, trappow, maxDT = cnc.imagingRamps_nobfield(motpow, repdet, trapdet, reppow, trappow, camera) #---Switch bfield to FESHBACH bfield.appendhold(FB.rampdelay) bfield.linear( FB.bf, FB.rampbf) bfield.appendhold( FB.feshbachdt) bfield.linear(0.0, 0.0) bfield.appendhold( FB.switchondt + FB.switchdelay + UV.extradt) bfield.linear(FB.bias,FB.rampdt) #---Set the starting voltage for the ODT odtpow0 = odt.odt_wave('odtpow', ODT.odtpow0, ss) odtpow0.extend(ENDUVMOT) #---Change shunt value from motV to hfV before going to highfield shunt = wfm.wave('gradientfield', SHUNT.motV, ss, volt = SHUNT.motV) shunt.extend(ENDUVMOT + FB.rampdelay + FB.rampbf + FB.feshbachdt + UV.extradt) #shunt.linear(SHUNT.hfV, 0.0,volt =SHUNT.hfV) shunt.linear(SHUNT.hfV, 0.0,volt =0.0) wfms = [ motpow, repdet, trapdet, bfield, reppow, trappow, uvpow, uvpow2,odtpow0, shunt] #---Add waveforms to sequence s.analogwfm_add(ss,wfms) #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 during CNC s.wait(-10.0) quickval = 1 if gen.bstr('CNC',report) == True else 0 s.digichg('quick',quickval) s.wait(10.0) s.wait(ENDCNC) s.digichg('quick',0) #---Go back in time, shut down the UVAOM's and open the shutter #---UVAOM's were on to keep them warm s.wait(-50.0) s.digichg('uvaom1',0) s.digichg('uvaom2',0) s.digichg('uvshutter',1) s.wait(50.0) #---Insert ODT overlap s.wait(-ODT.overlapdt-ODT.servodt) s.digichg('odt7595',1) s.wait(ODT.servodt) s.digichg('odtttl',1) s.wait(ODT.overlapdt) #---Turn OFF red light s.wait(UV.delay_red) s.digichg('motswitch',0) s.digichg('motshutter',1) s.wait(-UV.delay_red) #---Turn ON UVAOM's s.wait(UV.delay_uv) s.digichg('uvaom1',1) s.digichg('uvaom2',1) s.wait(-UV.delay_uv) #---Go to MOT release time s.wait(-ENDCNC) s.wait(ENDUVMOT) #---Go to end of field rampdown and set QUICK back to low s.wait(FB.rampdelay+FB.rampbf) s.digichg('quick',0) #---Wait in the UVMOT and then do optical pumping s.wait(UV.extradt) s.wait(-UV.pumptime) s.digichg('uvaom2',0) s.wait(UV.pumptime) #---Turn OFF UVAOM s.digichg('uvaom1',0) #---Close UV shutter waitshutter=5.0 s.wait(waitshutter) s.digichg('uvshutter',0) s.wait(-waitshutter) #---Turn OFF MOT magnetic field and switch it to FESHBACH s.digichg('field',0) s.wait( FB.feshbachdt ) s.digichg('feshbach',1) s.wait(FB.switchondt) do_quick=1 s.digichg('field',1) s.digichg('hfquick',do_quick) s.digichg('quick',do_quick) #Can't leave quick ON for more than quickmax quickmax=100. s.wait(quickmax) s.digichg('hfquick',0) s.digichg('quick',0) s.wait(-quickmax) # s.wait(FB.switchdelay+FB.rampdt) s.digichg('quick',0) s.wait(-FB.rampdt) s.wait(-FB.switchdelay - FB.switchondt - FB.feshbachdt - ss) #---At this point the time sequence is at ENDUVMOT #---Leave the sequence at the end of the UVMOT, but provide the amount #---of time that it needs to wait to go to ENDBFIELD toENDBFIELD = FB.rampdt + FB.switchdelay + FB.switchondt + FB.feshbachdt return s, toENDBFIELD
def run(s,camera): global report ss=f('CNC','cncstepsize') # Cool and Compress MOT # DURATION is defined as the time up to release from the MOT motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC = cnc.cncRamps() # Load UVMOT from CNCMOT uvfppiezo, uvpow2, uvpow, motpow, bfield, ENDUVMOT = uvRamps(motpow, bfield, ENDCNC) repdet.extend(ENDUVMOT) trapdet.extend(ENDUVMOT) reppow.extend(ENDUVMOT) trappow.extend(ENDUVMOT) # Imaging motpow, repdet, trapdet, reppow, trappow, bfield, maxDT = cnc.imagingRamps(motpow, repdet, trapdet, reppow, trappow, bfield,camera) uvfppiezo.extend(maxDT) uvpow.extend(maxDT) uvpow2.extend(maxDT) #---Add waveforms to sequence s.analogwfm_add(ss,[ motpow, repdet, trapdet, bfield, reppow, trappow, uvfppiezo, uvpow, uvpow2]) #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 during CNC s.wait(-10.0) quickval = 1 if gen.bstr('CNC',report) == True else 0 s.digichg('quick',quickval) s.wait(10.0) s.wait(ENDCNC) #s.digichg('quick',0) #---Go back in time, shut down the UVAOM's and open the shutter s.wait(-50.0) s.digichg('uvaom1',0) s.digichg('uvaom2',0) s.digichg('uvshutter',1) s.wait(50.0) #---Turn OFF red light delay_red = float(report['UV']['delay_red']) s.wait(delay_red) s.digichg('motswitch',0) #s.digichg('motshutter',1) s.wait(-delay_red) #---Turn ON UVAOM's delay_uv = float(report['UV']['delay_uv']) s.wait(delay_uv) s.digichg('uvaom1',1) s.digichg('uvaom2',1) s.wait(-delay_uv) s.wait(-ENDCNC) #---Go to MOT release time and set QUICK back to low, turn off UV s.wait(ENDUVMOT) s.digichg('quick',0) s.digichg('uvaom1',0) s.digichg('uvaom2',0) #---Turn red light back on for imaging. s.digichg('motswitch',1) #print s.tcur return s, ENDUVMOT
def go_to_highfield(s): #Keep ODT on ODT = gen.bstr('ODT', report) if ODT == True: s.digichg('odtttl', 1) s.wait(20.0) ss = float(report['SEQ']['analogstepsize']) # 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() # Load UVMOT from CNCMOT uvfppiezo, uvpow, motpow, repdet, trapdet, reppow, trappow, bfield, ENDUVMOT = uvred.uvcoolRamps( motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC) # Set imaging values camera = 'ANDOR' motpow, repdet, trapdet, reppow, trappow, maxDT = cnc.imagingRamps_nobfield( motpow, repdet, trapdet, reppow, trappow, camera) # Switch bfield to FESHBACH overlapdt = float(report['ODT']['overlapdt']) rampdelay = float(report['FESHBACH']['rampdelay']) rampbf = float(report['FESHBACH']['rampbf']) bf = float(report['FESHBACH']['bf']) feshbachdt = float(report['FESHBACH']['feshbachdt']) switchondt = float(report['FESHBACH']['switchondt']) switchdelay = float(report['FESHBACH']['switchdelay']) bias = float(report['FESHBACH']['bias']) biasrampdt = float(report['FESHBACH']['rampdt']) bfield.chop(ENDUVMOT - overlapdt) bfield.appendhold(rampdelay) bfield.linear(bf, rampbf) bfield.extend(ENDUVMOT + feshbachdt) bfield.linear(0.0, 0.0) ENDBFIELD = feshbachdt bfield.appendhold(switchondt + switchdelay) bfield.linear(bias, biasrampdt) #---Ramp up ODT odtpow0 = odt.odt_wave('odtpow', f('ODT', 'odtpow0'), ss) odtpow0.extend(ENDUVMOT) #Add waveforms to sequence s.analogwfm_add(ss, [ motpow, repdet, trapdet, bfield, reppow, trappow, uvfppiezo, uvpow, odtpow0 ]) #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) #insert UV pulse uvtime = float(report['UVRED']['uvtime']) s.wait(ENDCNC) s.digichg('quick', 0) s.wait(uvtime) #Shut down the UVAOM's and open the shutter s.wait(-50.0) s.digichg('uvaom1', 0) s.digichg('uvaom2', 0) s.digichg('uvshutter', 1) s.wait(50.0) #Turn on UVAOM s.digichg('uvaom1', 1) s.wait(-uvtime - ENDCNC) #Go to MOT release time and set QUICK back to low s.wait(ENDUVMOT) s.digichg('quick', 0) #CAREFUL: State transfer should be programmed in uvred.py, as it is done un uvmot.py s.digichg('uvaom1', 0) #RELEASE FROM MOT waitshutter = 5.0 s.wait(waitshutter) s.digichg('uvshutter', 0) #~ s.wait(20.0) #~ s.digichg('uvaom1',0) #~ s.digichg('uvaom2',0) #~ s.wait(-20.0) s.wait(-waitshutter) s.digichg('motswitch', 0) s.digichg('motshutter', 1) s.digichg('field', 0) #Insert ODT overlap with UVMOT and switch field to FESHBACH overlapdt = float(report['ODT']['overlapdt']) servodt = float(report['ODT']['servodt']) s.wait(-overlapdt - servodt) s.digichg('odt7595', 1) s.wait(servodt) s.digichg('odtttl', 1) #feshbachdt = rampdelay + rampbf + holdbf s.wait(overlapdt) s.wait(feshbachdt) s.digichg('feshbach', 1) #s.wait(overlapdt - feshbachdt) #s.wait( -feshbachdt) #s.wait(offdelay) #s.wait(2*switchdt) #s.wait(quickdelay) s.wait(switchondt) do_quick = 1 s.digichg('field', 1) s.digichg('hfquick', do_quick) s.digichg('quick', do_quick) #Can't leave quick ON for more than quickmax quickmax = 100. s.wait(quickmax) s.digichg('hfquick', 0) s.digichg('quick', 0) s.wait(-quickmax) s.wait(switchdelay + biasrampdt) s.digichg('quick', 0) s.wait(-biasrampdt) #s.wait(-switchdelay-quickdelay-2*switchdt-offdelay) s.wait(-switchdelay - switchondt - feshbachdt - ss) #At this point the time sequence is at ENDUVMOT #This is the time until the end of the bfield ramp #toENDBFIELD = biasrampdt + switchdelay + quickdelay + 2*switchdt + offdelay toENDBFIELD = biasrampdt + switchdelay + switchondt + feshbachdt return s, toENDBFIELD
def go_to_highfield(s): #Keep ODT on ODT = gen.bstr('ODT',report) if ODT == True: s.digichg('odtttl',1) s.wait(20.0) ss = float(report['SEQ']['analogstepsize']) # 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() # Load UVMOT from CNCMOT uvfppiezo, uvpow, motpow, repdet, trapdet, reppow, trappow, bfield, ENDUVMOT = uvcooling.uvcoolRamps(motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC) # Set imaging values camera = 'ANDOR' motpow, repdet, trapdet, reppow, trappow, maxDT = cnc.imagingRamps_nobfield(motpow, repdet, trapdet, reppow, trappow, camera) # Switch bfield to FESHBACH while UV cools in trap overlapdt = float(report['ODT']['overlapdt']) rampdelay = float(report['ODT']['rampdelay']) rampbf = float(report['ODT']['rampbf']) bf = float(report['ODT']['bf']) holdbf = float(report['ODT']['holdbf']) 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.chop(ENDUVMOT-overlapdt) bfield.appendhold(rampdelay) bfield.linear( bf, rampbf) bfield.appendhold(holdbf) bfield.linear(0.0, 0.0) ENDBFIELD=(rampdelay+rampbf+holdbf-overlapdt) bfield.appendhold(-ENDBFIELD+offdelay+2*switchdt+quickdelay+switchdelay) bfield.linear(bias,biasrampdt) #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) #insert UV pulse uvtime = float(report['UV']['uvtime']) s.wait(ENDCNC) s.digichg('quick',0) s.wait(uvtime) s.digichg('uvaom1',1) s.wait(-uvtime - ENDCNC) #Go to MOT release time s.wait(ENDUVMOT) s.digichg('quick',0) #Leave UVMOT on for state transfer fstatedt = float(report['ODT']['fstatedt']) s.wait(fstatedt) s.digichg('uvaom1',0) s.wait(-fstatedt) #RELEASE FROM MOT waitshutter=5.0 s.wait(waitshutter) s.digichg('uvshutter',0) s.wait(-waitshutter) s.digichg('motswitch',0) s.digichg('motshutter',1) s.digichg('field',0) #Insert ODT overlap with UVMOT and switch field to FESHBACH overlapdt = float(report['ODT']['overlapdt']) s.wait(-overlapdt) s.digichg('odtttl',1) s.digichg('odt7595',1) feshbachdt = rampdelay + rampbf + holdbf s.wait( feshbachdt ) s.digichg('feshbach',1) s.wait(overlapdt - feshbachdt) s.wait(offdelay) s.wait(2*switchdt) s.wait(quickdelay) do_quick=1 s.digichg('field',1) s.digichg('hfquick',do_quick) s.digichg('quick',do_quick) #Can't leave quick ON for more than quickmax quickmax=100. s.wait(quickmax) s.digichg('hfquick',0) s.digichg('quick',0) s.wait(-quickmax) s.wait(switchdelay+biasrampdt) s.digichg('quick',0) s.wait(-biasrampdt) s.wait(-switchdelay-quickdelay-2*switchdt-offdelay) #At this point the time sequence is at ENDUVMOT #This is the time until the end of the bfield ramp toENDBFIELD = biasrampdt + switchdelay + quickdelay + 2*switchdt + offdelay return s, toENDBFIELD
def go_to_highfield(s): #Keep ODT on ODT = gen.bstr('ODT', report) if ODT == True: s.digichg('odtttl', 1) s.wait(20.0) ss = float(report['SEQ']['analogstepsize']) # 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() # Load UVMOT from CNCMOT uvfppiezo, uvpow2, uvpow, motpow, repdet, trapdet, reppow, trappow, bfield, ENDUVMOT = uvcooling_repump.uvcoolRamps_repump( motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC) # Set imaging values camera = 'ANDOR' motpow, repdet, trapdet, reppow, trappow, maxDT = cnc.imagingRamps_nobfield( motpow, repdet, trapdet, reppow, trappow, camera) # Switch bfield to FESHBACH overlapdt = float(report['ODT']['overlapdt']) rampdelay = float(report['ODT']['rampdelay']) rampbf = float(report['ODT']['rampbf']) bf = float(report['ODT']['bf']) feshbachdt = float(report['ODT']['feshbachdt']) switchondt = float(report['FESHBACH']['switchondt']) switchdelay = float(report['FESHBACH']['switchdelay']) bias = float(report['FESHBACH']['bias']) biasrampdt = float(report['FESHBACH']['rampdt']) bfield.chop(ENDUVMOT - overlapdt, 1) bfield.appendhold(rampdelay) bfield.linear(bf, rampbf) bfield.extend(ENDUVMOT + feshbachdt) bfield.linear(0.0, 0.0) ENDBFIELD = feshbachdt bfield.appendhold(switchondt + switchdelay) bfield.linear(bias, biasrampdt) rampupdt = float(report['ODT']['rampupdt']) updt = float(report['ODT']['updt']) overshootdt = float(report['ODT']['overshootdt']) #~ odtpow0 = wfm.wave('odtpow', 0.0, ss) #~ odtpow0.extend(ENDUVMOT-overlapdt-updt-rampupdt) #~ odtpow0.odt_linear( 0.0 , f('ODT','odtpow0'), rampupdt) #~ odtpow0.appendhold( updt) #~ odtpow0.odt_linear(f('ODT','odtpow0'), f('ODT','odtpow'), overshootdt) odtpow0 = wfm.wave('odtpow', f('ODT', 'odtpow0'), ss) odtpow0.extend(ENDUVMOT - overlapdt) odtpow0.odt_linear(f('ODT', 'odtpow0'), f('ODT', 'odtpow'), overshootdt) EXTRA = max( overshootdt - (bfield.dt() - (ENDUVMOT - overlapdt - updt - rampupdt)), 0.0) print "...EXTRA time to allow for ODT overshoot = %f" % EXTRA #Add waveforms to sequence s.analogwfm_add(ss, [ motpow, repdet, trapdet, bfield, reppow, trappow, uvfppiezo, uvpow, uvpow2, odtpow0 ]) #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) #insert UV pulse uvtime = float(report['UV']['uvtime']) s.wait(ENDCNC) s.digichg('quick', 0) s.wait(uvtime) #Shut down the UVAOM's and open the shutter s.wait(-50.0) s.digichg('uvaom1', 0) s.digichg('uvaom2', 0) s.digichg('uvshutter', 1) s.wait(50.0) #Turn on UVAOM s.digichg('uvaom1', 1) s.wait(-uvtime) #Turn on UVAOM2 uvreptime = float(report['UV']['uvreptime']) s.wait(uvreptime) s.digichg('uvaom2', 1) #Tur off RED light s.digichg('motswitch', 0) s.digichg('motshutter', 1) s.wait(-uvreptime) s.wait(-ENDCNC) #Go to MOT release time and set QUICK back to low s.wait(ENDUVMOT) s.digichg('quick', 0) #Turn OFF UVAOM2 for optical pumping pumptime = float(report['UV']['pumptime']) uvhold = float(report['UV']['uvhold']) s.wait(-pumptime) s.digichg('uvaom2', 0) s.wait(pumptime) #Leave UVMOT on for state transfer fstatedt = float(report['ODT']['fstatedt']) s.wait(fstatedt) s.digichg('uvaom1', 0) s.wait(-fstatedt) #Close UV shutter waitshutter = 5.0 s.wait(waitshutter) s.digichg('uvshutter', 0) s.wait(-waitshutter) #Turn OFF MOT magnetic field s.digichg('field', 0) #Insert ODT overlap with UVMOT and switch field to FESHBACH overlapdt = float(report['ODT']['overlapdt']) servodt = float(report['ODT']['servodt']) s.wait(-overlapdt - servodt) s.digichg('odt7595', 1) s.wait(servodt) s.digichg('odtttl', 1) #feshbachdt = rampdelay + rampbf + holdbf s.wait(overlapdt) s.wait(feshbachdt) s.digichg('feshbach', 1) #s.wait(overlapdt - feshbachdt) #s.wait( -feshbachdt) #s.wait(offdelay) #s.wait(2*switchdt) #s.wait(quickdelay) s.wait(switchondt) do_quick = 1 s.digichg('field', 1) s.digichg('hfquick', do_quick) s.digichg('quick', do_quick) #Can't leave quick ON for more than quickmax quickmax = 100. s.wait(quickmax) s.digichg('hfquick', 0) s.digichg('quick', 0) s.wait(-quickmax) s.wait(switchdelay + biasrampdt) s.digichg('quick', 0) s.wait(-biasrampdt) #s.wait(-switchdelay-quickdelay-2*switchdt-offdelay) s.wait(-switchdelay - switchondt - feshbachdt - ss) #At this point the time sequence is at ENDUVMOT #This is the time until the end of the bfield ramp #toENDBFIELD = biasrampdt + switchdelay + quickdelay + 2*switchdt + offdelay toENDBFIELD = biasrampdt + switchdelay + switchondt + feshbachdt return s, toENDBFIELD + EXTRA
def go_to_highfield(s): #---Keep ODT on ODT = gen.bstr('ODT',report) if ODT == True: s.digichg('odtttl',1) s.wait(20.0) ss = float(report['SEQ']['analogstepsize']) #---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() #---Load UVMOT from CNCMOT uvfppiezo, uvpow2, uvpow, motpow, bfield, ENDUVMOT = uvmot.uvRamps(motpow, bfield, ENDCNC) repdet.extend(ENDUVMOT) trapdet.extend(ENDUVMOT) reppow.extend(ENDUVMOT) trappow.extend(ENDUVMOT) #---Make sure everything has the same length before setting imaging values #print motpow.dt(), repdet.dt(), trapdet.dt(), bfield.dt(), reppow.dt(), trappow.dt(), uvfppiezo.dt() #print motpow.N(), repdet.N(), trapdet.N(), bfield.N(), reppow.N(), trappow.N(), uvfppiezo.N() #--- Set imaging values camera = 'ANDOR' motpow, repdet, trapdet, reppow, trappow, maxDT = cnc.imagingRamps_nobfield(motpow, repdet, trapdet, reppow, trappow, camera) #---Switch bfield to FESHBACH overlapdt = float(report['ODT']['overlapdt']) rampdelay = float(report['FESHBACH']['rampdelay']) rampbf = float(report['FESHBACH']['rampbf']) bf = float(report['FESHBACH']['bf']) feshbachdt = float(report['FESHBACH']['feshbachdt']) switchondt = float(report['FESHBACH']['switchondt']) switchdelay = float(report['FESHBACH']['switchdelay']) bias = float(report['FESHBACH']['bias']) biasrampdt = float(report['FESHBACH']['rampdt']) bfield.chop(ENDUVMOT-overlapdt,1) bfield.appendhold(rampdelay) bfield.linear( bf, rampbf) bfield.extend(ENDUVMOT+feshbachdt) bfield.linear(0.0, 0.0) ENDBFIELD = feshbachdt bfield.appendhold( switchondt + switchdelay) bfield.linear(bias,biasrampdt) #---Ramp up ODT odtpow0 = odt.odt_wave('odtpow', f('ODT','odtpow0'), ss) odtpow0.extend(ENDUVMOT) #---Add waveforms to sequence s.analogwfm_add(ss,[ motpow, repdet, trapdet, bfield, reppow, trappow, uvfppiezo, uvpow, uvpow2,odtpow0]) #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 during CNC s.wait(-10.0) quickval = 1 if gen.bstr('CNC',report) == True else 0 s.digichg('quick',quickval) s.wait(10.0) s.wait(ENDCNC) s.digichg('quick',0) #---Go back in time, shut down the UVAOM's and open the shutter s.wait(-50.0) s.digichg('uvaom1',0) s.digichg('uvaom2',0) s.digichg('uvshutter',1) s.wait(50.0) #---Turn OFF red light delay_red = float(report['UV']['delay_red']) s.wait(delay_red) s.digichg('motswitch',0) s.digichg('motshutter',1) s.wait(-delay_red) #---Turn ON UVAOM's delay_uv = float(report['UV']['delay_uv']) s.wait(delay_uv) s.digichg('uvaom1',1) s.digichg('uvaom2',1) s.wait(-delay_uv) s.wait(-ENDCNC) #---Go to MOT release time and set QUICK back to low s.wait(ENDUVMOT) s.digichg('quick',0) #---Turn OFF UVAOM2 for optical pumping pumptime = float(report['UV']['pumptime']) s.wait(-pumptime) s.digichg('uvaom2',0) s.wait(pumptime) #---Turn OFF UVAOM s.digichg('uvaom1',0) #---Close UV shutter waitshutter=5.0 s.wait(waitshutter) s.digichg('uvshutter',0) s.wait(-waitshutter) #---Turn OFF MOT magnetic field s.digichg('field',0) #---Insert ODT overlap with UVMOT and switch field to FESHBACH overlapdt = float(report['ODT']['overlapdt']) servodt = float(report['ODT']['servodt']) # s.wait(-overlapdt-servodt) s.digichg('odt7595',1) s.wait(servodt) s.digichg('odtttl',1) s.wait(overlapdt) s.wait( feshbachdt ) s.digichg('feshbach',1) s.wait(switchondt) do_quick=1 s.digichg('field',1) s.digichg('hfquick',do_quick) s.digichg('quick',do_quick) #Can't leave quick ON for more than quickmax quickmax=100. s.wait(quickmax) s.digichg('hfquick',0) s.digichg('quick',0) s.wait(-quickmax) # s.wait(switchdelay+biasrampdt) s.digichg('quick',0) s.wait(-biasrampdt) s.wait(-switchdelay - switchondt - feshbachdt - ss) #---At this point the time sequence is at ENDUVMOT #This is the time until the end of the bfield ramp toENDBFIELD = biasrampdt + switchdelay + switchondt + feshbachdt return s, toENDBFIELD
def go_to_highfield(s): #---Keep ODT on odton = gen.bstr('ODT',report) if odton == True: s.digichg('odtttl',1) s.wait(20.0) ss = SEQ.analogstepsize #---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() #---Load UVMOT from CNCMOT uvpow2, uvpow, motpow, bfield, ENDUVMOT = uvmot.uvRamps(motpow, bfield, ENDCNC) repdet.extend(ENDUVMOT) trapdet.extend(ENDUVMOT) reppow.extend(ENDUVMOT) trappow.extend(ENDUVMOT) #---Make sure everything has the same length before setting imaging values #--- Set imaging values camera = 'ANDOR' motpow, repdet, trapdet, reppow, trappow, maxDT = cnc.imagingRamps_nobfield(motpow, repdet, trapdet, reppow, trappow, camera) #---Switch bfield to FESHBACH bfield.appendhold(FB.rampdelay) bfield.linear( FB.bf, FB.rampbf) bfield.appendhold( FB.feshbachdt) bfield.linear(0.0, 0.0) bfield.appendhold( FB.switchondt + FB.switchdelay + UV.extradt) bfield.linear(FB.bias,FB.rampdt) #---Set the starting voltage for the ODT odtpow0 = odt.odt_wave('odtpow', ODT.odtpow0, ss) odtpow0.extend(ENDUVMOT) #---Change shunt value from motV to hfV before going to highfield shunt = wfm.wave('gradientfield', SHUNT.motV, ss, volt = SHUNT.motV) shunt.extend(ENDUVMOT + FB.rampdelay + FB.rampbf + FB.feshbachdt + UV.extradt) #shunt.linear(SHUNT.hfV, 0.0,volt =SHUNT.hfV) shunt.linear(SHUNT.hfV, 0.0,volt =0.0) wfms = [ motpow, repdet, trapdet, bfield, reppow, trappow, uvpow, uvpow2,odtpow0, shunt] #---Add waveforms to sequence s.analogwfm_add(ss,wfms) #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 during CNC s.wait(-10.0) quickval = 1 if gen.bstr('CNC',report) == True else 0 s.digichg('quick',quickval) s.wait(10.0) s.wait(ENDCNC) s.digichg('quick',0) #---Go back in time, shut down the UVAOM's #---UVAOM's were on to keep them warm s.wait(UV.clearaoms) s.digichg('uvaom1',0) s.digichg('uvaom2',0) s.wait(-UV.clearaoms) #---Insert ODT overlap s.wait(-ODT.overlapdt-ODT.servodt) s.digichg('odt7595',1) s.wait(ODT.servodt) s.digichg('odtttl',1) s.wait(ODT.overlapdt) #---Turn OFF red light s.wait(UV.delay_red) s.digichg('motswitch',0) s.digichg('motshutter',1) s.wait(-UV.delay_red) #---Turn ON UVAOM's s.wait(UV.delay_uv) #---make sure to open the shutter: s.wait(UV.openshutter) s.digichg('uvshutter',1) s.wait(-UV.openshutter) s.digichg('uvaom1',1) s.digichg('uvaom2',1) s.wait(-UV.delay_uv) #---Go to MOT release time s.wait(-ENDCNC) s.wait(ENDUVMOT) #---Go to end of field rampdown and set QUICK back to low s.wait(FB.rampdelay+FB.rampbf) s.digichg('quick',0) #---Wait in the UVMOT and then do optical pumping s.wait(UV.extradt) s.wait(-UV.pumptime) s.digichg('uvaom2',0) s.wait(UV.pumptime) #---Turn OFF UVAOM s.digichg('uvaom1',0) #---Close UV shutter waitshutter=UV.closeshutter s.wait(waitshutter) s.digichg('uvshutter',0) s.wait(-waitshutter) #---Turn OFF MOT magnetic field and switch it to FESHBACH s.digichg('field',0) s.wait( FB.feshbachdt ) s.digichg('feshbach',1) s.wait(FB.switchondt) do_quick=1 s.digichg('field',1) s.digichg('hfquick',do_quick) s.digichg('quick',do_quick) #Can't leave quick ON for more than quickmax quickmax=100. s.wait(quickmax) s.digichg('hfquick',0) s.digichg('quick',0) s.wait(-quickmax) # s.wait(FB.switchdelay+FB.rampdt) s.digichg('quick',0) s.wait(-FB.rampdt) s.wait(-FB.switchdelay - FB.switchondt - FB.feshbachdt - ss) #---At this point the time sequence is at ENDUVMOT #---Leave the sequence at the end of the UVMOT, but provide the amount #---of time that it needs to wait to go to ENDBFIELD toENDBFIELD = FB.rampdt + FB.switchdelay + FB.switchondt + FB.feshbachdt return s, toENDBFIELD
def run_proberepump(s, camera): global report ss = f("CNC", "cncstepsize") # Cool and Compress MOT # DURATION is defined as the time up to release from the MOT motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC = cnc.cncRamps() # Load UVMOT from CNCMOT uvfppiezo, uvpow, motpow, repdet, trapdet, reppow, trappow, bfield, ENDUVMOT = uvcoolRamps_proberepump( motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC ) # Imaging motpow, repdet, trapdet, reppow, trappow, bfield, maxDT = cnc.imagingRamps( motpow, repdet, trapdet, reppow, trappow, bfield, camera ) uvfppiezo.extend(maxDT) uvpow.extend(maxDT) # Add the waveforms 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) # go to end of CNC s.wait(ENDCNC) # insert UV pulse s.wait(f("UV", "uvtime")) # turn off MOT light , turn on probe to use as repump s.digichg("motswitch", 0) s.wait(-10.0) s.digichg("prshutter", 0) s.wait(10.0) s.digichg("probe", 1) s.digichg("uvaom1", 1) s.wait(-f("UV", "uvtime") - ENDCNC) # Go to MOT release time turn off UV and set QUICK back to low s.wait(ENDUVMOT) s.digichg("uvaom1", 0) s.digichg("quick", 0) # also turn off probe s.digichg("probe", 0) s.digichg("prshutter", 1) # print s.tcur return s, ENDUVMOT
def run_uvrepump(s, camera): global report ss = f("CNC", "cncstepsize") # Cool and Compress MOT # DURATION is defined as the time up to release from the MOT motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC = cnc.cncRamps() # Load UVMOT from CNCMOT uvfppiezo, uvpow2, uvpow, motpow, repdet, trapdet, reppow, trappow, bfield, ENDUVMOT = uvcoolRamps_repump( motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC ) # Imaging motpow, repdet, trapdet, reppow, trappow, bfield, maxDT = cnc.imagingRamps( motpow, repdet, trapdet, reppow, trappow, bfield, camera ) uvfppiezo.extend(maxDT) uvpow.extend(maxDT) uvpow2.extend(maxDT) # Add the waveforms s.analogwfm_add(ss, [motpow, repdet, trapdet, bfield, reppow, trappow, uvfppiezo, uvpow, uvpow2]) # 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) # insert UV pulse s.wait(ENDCNC) s.wait(f("UV", "uvtime")) # Shut down the UVAOM's and open the shutter s.wait(-50.0) s.digichg("uvaom1", 0) s.digichg("uvaom2", 0) s.digichg("uvshutter", 1) s.wait(50.0) # Turn on UVAOM s.digichg("uvaom1", 1) s.wait(-f("UV", "uvtime")) # Turn off Red Light Completly and turn UV repump after uvramp uvreptime = float(report["UV"]["uvreptime"]) s.wait(uvreptime) s.digichg("uvaom2", 1) s.digichg("motswitch", 0) s.wait(-uvreptime) s.wait(-ENDCNC) # Go to MOT release time turn off UV and set QUICK back to low s.wait(ENDUVMOT) # Turn red light back on for imaging. s.digichg("uvaom1", 0) s.digichg("quick", 0) s.digichg("uvaom2", 0) s.digichg("motswitch", 1) # print s.tcur return s, ENDUVMOT
def run(s,camera): global report ss=f('CNC','cncstepsize') # Cool and Compress MOT # DURATION is defined as the time up to release from the MOT motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC = cnc.cncRamps() # Load UVMOT from CNCMOT uvpow2, uvpow, motpow, bfield, ENDUVMOT = uvRamps(motpow, bfield, ENDCNC) repdet.extend(ENDUVMOT) trapdet.extend(ENDUVMOT) reppow.extend(ENDUVMOT) trappow.extend(ENDUVMOT) # Imaging motpow, repdet, trapdet, reppow, trappow, bfield, maxDT = cnc.imagingRamps(motpow, repdet, trapdet, reppow, trappow, bfield,camera) uvpow.extend(maxDT) uvpow2.extend(maxDT) #---Add waveforms to sequence s.analogwfm_add(ss,[ motpow, repdet, trapdet, bfield, reppow, trappow, uvpow, uvpow2]) #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 during CNC s.wait(-10.0) quickval = 1 if gen.bstr('CNC',report) == True else 0 s.digichg('quick',quickval) s.wait(10.0) s.wait(ENDCNC) #s.digichg('quick',0) #---Go back in time, shut down the UVAOM's and open the shutter s.wait(-50.0) s.digichg('uvaom1',0) s.digichg('uvaom2',0) s.digichg('uvshutter',1) s.wait(50.0) #---Turn OFF red light delay_red = float(report['UV']['delay_red']) s.wait(delay_red) s.digichg('motswitch',0) #s.digichg('motshutter',1) s.wait(-delay_red) #---Turn ON UVAOM's delay_uv = float(report['UV']['delay_uv']) s.wait(delay_uv) s.digichg('uvaom1',1) s.digichg('uvaom2',1) s.wait(-delay_uv) s.wait(-ENDCNC) #---Go to MOT release time and set QUICK back to low, turn off UV s.wait(ENDUVMOT) s.digichg('quick',0) s.digichg('uvaom1',0) s.digichg('uvaom2',0) #---Turn red light back on for imaging. s.digichg('motswitch',1) #print s.tcur return s, ENDUVMOT
def go_to_highfield(s): #Keep ODT on ODT = gen.bstr('ODT', report) if ODT == True: s.digichg('odtttl', 1) s.wait(20.0) ss = float(report['SEQ']['analogstepsize']) # 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() # Load UVMOT from CNCMOT uvfppiezo, uvpow, motpow, repdet, trapdet, reppow, trappow, bfield, ENDUVMOT = uvcooling.uvcoolRamps( motpow, repdet, trapdet, reppow, trappow, bfield, ENDCNC) # Set imaging values camera = 'ANDOR' motpow, repdet, trapdet, reppow, trappow, maxDT = cnc.imagingRamps_nobfield( motpow, repdet, trapdet, reppow, trappow, camera) # Switch bfield to FESHBACH while UV cools in trap overlapdt = float(report['ODT']['overlapdt']) rampdelay = float(report['ODT']['rampdelay']) rampbf = float(report['ODT']['rampbf']) bf = float(report['ODT']['bf']) holdbf = float(report['ODT']['holdbf']) 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.chop(ENDUVMOT - overlapdt) bfield.appendhold(rampdelay) bfield.linear(bf, rampbf) bfield.appendhold(holdbf) bfield.linear(0.0, 0.0) ENDBFIELD = (rampdelay + rampbf + holdbf - overlapdt) bfield.appendhold(-ENDBFIELD + offdelay + 2 * switchdt + quickdelay + switchdelay) bfield.linear(bias, biasrampdt) #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) #insert UV pulse uvtime = float(report['UV']['uvtime']) s.wait(ENDCNC) s.digichg('quick', 0) s.wait(uvtime) s.digichg('uvaom1', 1) s.wait(-uvtime - ENDCNC) #Go to MOT release time s.wait(ENDUVMOT) s.digichg('quick', 0) #Leave UVMOT on for state transfer fstatedt = float(report['ODT']['fstatedt']) s.wait(fstatedt) s.digichg('uvaom1', 0) s.wait(-fstatedt) #RELEASE FROM MOT waitshutter = 5.0 s.wait(waitshutter) s.digichg('uvshutter', 0) s.wait(-waitshutter) s.digichg('motswitch', 0) s.digichg('motshutter', 1) s.digichg('field', 0) #Insert ODT overlap with UVMOT and switch field to FESHBACH overlapdt = float(report['ODT']['overlapdt']) s.wait(-overlapdt) s.digichg('odtttl', 1) s.digichg('odt7595', 1) feshbachdt = rampdelay + rampbf + holdbf s.wait(feshbachdt) s.digichg('feshbach', 1) s.wait(overlapdt - feshbachdt) s.wait(offdelay) s.wait(2 * switchdt) s.wait(quickdelay) do_quick = 1 s.digichg('field', 1) s.digichg('hfquick', do_quick) s.digichg('quick', do_quick) #Can't leave quick ON for more than quickmax quickmax = 100. s.wait(quickmax) s.digichg('hfquick', 0) s.digichg('quick', 0) s.wait(-quickmax) s.wait(switchdelay + biasrampdt) s.digichg('quick', 0) s.wait(-biasrampdt) s.wait(-switchdelay - quickdelay - 2 * switchdt - offdelay) #At this point the time sequence is at ENDUVMOT #This is the time until the end of the bfield ramp toENDBFIELD = biasrampdt + switchdelay + quickdelay + 2 * switchdt + offdelay return s, toENDBFIELD