def lt1_hans1_calibrate_msm1_pi(name='hans1_msm1_pi'):
    m = CORPSEPiCalibration(name)
    funcs.prepare(m)

    pts = 11
    CORPSE_frq = 6.5e6
    m.params['CORPSE_rabi_frequency'] = CORPSE_frq
    m.params['CORPSE_pi_amp'] = m.params['msm1_CORPSE_pi_amp']
    m.params['CORPSE_pi_60_duration'] = 1./CORPSE_frq/6.
    m.params['CORPSE_pi_m300_duration'] = 5./CORPSE_frq/6.
    m.params['CORPSE_pi_420_duration'] = 7./CORPSE_frq/6.
    m.params['CORPSE_pi_mod_frq'] = m.params['ms-1_cntr_frq'] - m.params['mw_frq']

    m.params['pts'] = pts
    m.params['repetitions'] = 5000

    # sweep params
    m.params['CORPSE_pi_sweep_amps'] = np.linspace(0.7, 0.9, pts)
    m.params['multiplicity'] = 11
    m.params['delay_reps'] = 15

    # for the autoanalysis
    m.params['sweep_name'] = 'CORPSE amplitude (V)'
    m.params['sweep_pts'] = m.params['CORPSE_pi_sweep_amps']
    m.params['wait_for_AWG_done'] = 1
    
    funcs.finish(m, debug=False)
def sweep_amplitude(name):
    m = CORPSEPiCalibration(name)
    funcs.prepare(m)

    pts = 11
    m.params['pts'] = pts
    m.params['repetitions'] = 1000

    # sweep params
    m.params['CORPSE_pi_sweep_amps'] = np.linspace(0.6, 0.8, pts)
    m.params['multiplicity'] = 11
    m.params['delay_reps'] = 15

    # for the autoanalysis
    m.params['sweep_name'] = 'CORPSE amplitude (V)'
    m.params['sweep_pts'] = m.params['CORPSE_pi_sweep_amps']
    
    funcs.finish(m, debug=False)
def electronramsey(name):
    m = pulsar.ElectronRamsey(name)
    funcs.prepare(m)

    pts = 61
    m.params["pts"] = pts
    m.params["repetitions"] = 1000

    m.params["evolution_times"] = np.linspace(0, 3000e-9, pts)

    # MW pulses
    m.params["detuning"] = 0.0e6
    m.params["CORPSE_pi2_mod_frq"] = m.params["CORPSE_pi2_mod_frq"] + m.params["detuning"]
    m.params["CORPSE_pi2_amps"] = np.ones(pts) * m.params["CORPSE_pi2_amp"]
    m.params["CORPSE_pi2_phases1"] = np.ones(pts) * 0
    m.params["CORPSE_pi2_phases2"] = np.ones(pts) * 0  # 360 * m.params['evolution_times'] * 2e6

    # for the autoanalysis
    m.params["sweep_name"] = "evolution time (ns)"
    m.params["sweep_pts"] = m.params["evolution_times"] / 1e-9

    funcs.finish(m)