Example #1
0
def burn_n_sit(burn, freq1, power, hl):
    ''' Burns a hole and then increases the span to watch the hole and carrier hole move. '''
    ##         burn = 0.02*s
    ##         freq1 = 2.560*GHz
    #Hole burning sequence
    run_offset(SpecAn,
               freq=freq1,
               span=1 * MHz,
               res=30 * kHz,
               sweep=50 * ms,
               full_span='N',
               show_window='N')
    filepath = create_file(SpecAn, compensated='Y', n=1, burn_time=burn)
    windfreak(freq1, power, hl, filepath, write=1)
    pb.hole_burn(burn)
    x, y, filepath = record_trace(SpecAn,
                                  filepath,
                                  compensated='Y',
                                  n=1,
                                  burn_time=burn)
    sleep(0.1 * s)

    SpecAn.write('CF ' + str(freq1))
    SpecAn.write('SP 5000000')
    SIH.free_run_plot_window('N', full_span='N')
Example #2
0
def spin_pump_seq():
    ##     pb.Sequence([(['ch6'], 10*s),(['ch2','ch5'], 1*s)], loop=False)
    ##     time.sleep(11)
    filepath = hb.create_file(SpecAn, compensated='Y', n=1, burn_time=0)
    pb.hole_burn(0.1)
    hb.record_trace(SpecAn,
                    filepath,
                    filename='',
                    compensated='Y',
                    sweep_again='Y',
                    n=1,
                    burn_time='')
Example #3
0
def SpinpumpSite2BurnSite1(f_name='Spinpump site2 burn site1', freq=195.162):
    fg = rigolfg.RigolFG()  #Open the Rigol FG
    ITLA = ITLA_Wrap.ITLA_Class(port="COM6",
                                baudrate=9600)  #Open the Photonics Laser

    #Probe laser and check it's happy
    ITLA.ProbeLaser()
    #Disable laser to change parameters
    ITLA.EnableLaser(False)

    #Set Laser to usual parameters for Spin Pumping
    ITLA.SetFrequency(194.9412)  #THz
    ITLA.SetPower(1600)  #dBm * 100
    fg.setOutputState(bOn=0)
    ITLA.EnableLaser(True)
    ITLA.EnableWhisperMode(True)
    fg.setOutputState(bOn=1)

    spin_pump_seq(spintime=10 * s, SpecAnSweep='Y', rec='Y')  #Spin pump site 2
    HP8560E_SpecAn_Trigger('EXT', 'SNGLS', SpecAn)
    fg.setOutputState(bOn=0)  #Turn off Rigol CH2 (sweeping photonics)
    print("Turning Rigol FG off (stop photonics laser sweeping).")

    #Turn off laser
    #Change photonics laser freq to 195.162 THz
    ITLA.EnableWhisperMode(False)
    ITLA.EnableLaser(False)
    ##     ITLA.SetFrequency(195.162) #THz site 1
    ##     ITLA.SetFrequency(194.9437) #THz magnetic sub group
    ITLA.SetFrequency(freq)  #THz site 2 main peak

    ITLA.SetPower(1600)  #dBm * 100
    ITLA.EnableLaser(True)
    ITLA.EnableWhisperMode(True)

    #Burn site 1 for 5 s
    pb.Sequence([(['ch6'], 5 * s), (['ch5'], 5 * ms)], loop=False)
    sleep(5)
    filepath = hb.create_file(
        SpecAn, n=1, burn_time=0,
        filename=f_name)  #Record spin pumping after site 1 burn
    pb.hole_burn(1)
    filepath = hb.record_trace(SpecAn,
                               filepath,
                               compensated='Y',
                               sweep_again='Y',
                               burn_time=1)

    fg.setOutputState(
        bOn=1)  #Turns Channel 2 back on so we can spin pump again
    print("Turning Rigol FG on.")
Example #4
0
def holeburn(offset = 'N', args = [1.45*GHz, 2.9*GHz, 30*kHz, 1*s]):
    ''' No longer use this '''
    if offset != ('Y' or 'N'):
        raise error('argument must be "Y" or "N"')
        
    elif offset == 'Y':
        #Set SpecAn stuff
        SpecAn.write("CF " + str(args[0]))
        SpecAn.write("SP " + str(args[1]))
        SpecAn.write("RB " + str(args[2]))
        SpecAn.write("ST " + str(args[3]))
        sleep(0.5)
        SIH.save_offset(20)
        
    pb.hole_burn(3*s)
    SIH.free_run_plot_window('Y')
Example #5
0
def spinpump_delay(f_name='delayed recording of spinpump',
                   delay=20,
                   secondLpath=False,
                   latchT=5):
    spin_pump_seq(spintime=10 * s, SpecAnSweep='Y', rec='Y')  #Spin pump site 2
    if secondLpath:
        pb.toggle_latch_onoff(latchT)
    sleep(delay)
    filepath = hb.create_file(
        SpecAn, n=1, burn_time=0,
        filename=f_name)  #Record spin pumping after site 1 burn
    pb.hole_burn(1)
    filepath = hb.record_trace(SpecAn,
                               filepath,
                               compensated='Y',
                               sweep_again='Y',
                               burn_time=1)
Example #6
0
def burn_sequence(burn,
                  burn_freq,
                  power,
                  hl='low',
                  record='True',
                  rec_freq='',
                  rec_span=10 * MHz,
                  f_name=''):
    ''' Sets the Windfreak to a speficied frequency and power to burn for an alloted time.
        If record is true, then the spectrum analyser will record the resulting hole '''
    filepath = ''
    if rec_freq == '':
        rec_freq = burn_freq

    if record == 'True':
        run_offset(SpecAn,
                   freq=rec_freq,
                   span=rec_span,
                   res=30 * kHz,
                   sweep=50 * ms,
                   full_span='N',
                   show_window='N')
        filepath = create_file(SpecAn,
                               compensated='Y',
                               n=1,
                               burn_time=burn,
                               filename=f_name)
        windfreak(burn_freq, power, hl, filepath, write=1)
    else:
        windfreak(burn_freq, power, hl, filepath, write=0)
    pb.hole_burn(burn)

    if record == 'True':
        filepath = record_trace(SpecAn,
                                filepath,
                                compensated='Y',
                                burn_time=burn,
                                filename=f_name)
    sleep(0.5 * s)

    full_sweep(SpecAn)
Example #7
0
def burn_sequence_AWG(burn,
                      burn_freq,
                      record='True',
                      rec_freq='',
                      rec_span=10 * MHz,
                      f_name='',
                      nu=2,
                      sa='Y'):
    ''' Copy of the burn sequence function from Holeburn james wf3,
        but uses the 8GB AWG instead of the WF as the burner'''

    filepath = ''
    if rec_freq == '':
        rec_freq = burn_freq

    if record == 'True':
        filepath = hb.create_file(SpecAn, n=1, burn_time=burn, filename=f_name)
        hb.run_offset(SpecAn,
                      freq=rec_freq,
                      span=rec_span,
                      res=30 * kHz,
                      sweep=50 * ms,
                      full_span='N',
                      show_window='N',
                      n=nu)

    pb.hole_burn(burn)

    if record == 'True':
        filepath = hb.record_trace(SpecAn,
                                   filepath,
                                   compensated='Y',
                                   sweep_again=sa,
                                   burn_time=burn)
    sleep(0.5 * s)

    hb.full_sweep(SpecAn)