Exemplo n.º 1
0
def set_wave_sequence(awg_sa_cmd):
    """
    波形シーケンスを AWG にセットする
    """
    # 波形の定義
    i_wave_0 = awgsa.AwgWave(
        wave_type = awgsa.AwgWave.SINE,
        frequency = 120.0,
        phase = 0,
        amplitude = 15000,
        num_cycles = 2500)

    q_wave_0 = awgsa.AwgWave(
        wave_type = awgsa.AwgWave.SQUARE,
        frequency = 120.0,
        phase = 0,
        amplitude = 15000,
        duty_cycle = 100.0,
        num_cycles = 2500)

    iq_wave_0 = awgsa.AwgIQWave(i_wave_0, q_wave_0)

    i_wave_1 = awgsa.AwgWave(
        wave_type = awgsa.AwgWave.SINE,
        frequency = 50.0,
        phase = 90.0, # cos
        amplitude = 15000,
        duty_cycle = 100.0,
        num_cycles = 2500)

    q_wave_1 = awgsa.AwgWave(
        wave_type = awgsa.AwgWave.SINE,
        frequency = 50.0,
        phase = 0,
        amplitude = 15000,
        num_cycles = 2500)
    
    iq_wave_1 = awgsa.AwgIQWave(i_wave_1, q_wave_1)

    # 波形シーケンスの作成
    wave_sequence_0 = (awgsa.WaveSequence(DAC_FREQ, is_iq_data = True)
        .add_step(step_id = 0, wave = iq_wave_0, post_blank = 2000))
    wave_sequence_1 = (awgsa.WaveSequence(DAC_FREQ, is_iq_data = True)
        .add_step(step_id = 0, wave = iq_wave_1, post_blank = 2000))

    # AWG に波形シーケンスをセットする
    awg_sa_cmd.set_wave_sequence(awgsa.AwgId.AWG_0, wave_sequence_0)
    awg_sa_cmd.set_wave_sequence(awgsa.AwgId.AWG_1, wave_sequence_1)
    return (wave_sequence_0, wave_sequence_1)
Exemplo n.º 2
0
def set_wave_sequence(awg_sa_cmd):
    """
    波形シーケンスを AWG にセットする
    """
    # 波形の定義
    samples = create_wave()
    wave_0 = awgsa.AwgAnyWave(samples=samples, num_cycles=4)

    (i_samples, q_samples) = create_iq_wave()
    i_wave = awgsa.AwgAnyWave(samples=i_samples, num_cycles=360)
    q_wave = awgsa.AwgAnyWave(samples=q_samples, num_cycles=360)
    wave_1 = awgsa.AwgIQWave(i_wave, q_wave)

    # 波形シーケンスの定義
    # 波形ステップの開始から終了までの期間は, キャプチャの終了処理にかかるオーバーヘッドを考慮し, 波形出力期間 + 2000 ns を設定する.
    wave_sequence_0 = (awgsa.WaveSequence(DAC_FREQ, is_iq_data=False).add_step(
        step_id=0, wave=wave_0, post_blank=2000))

    wave_sequence_1 = (awgsa.WaveSequence(DAC_FREQ, is_iq_data=True).add_step(
        step_id=0, wave=wave_1, post_blank=2000))

    # AWG に波形シーケンスをセットする
    awg_sa_cmd.set_wave_sequence(awgsa.AwgId.AWG_0,
                                 wave_sequence_0,
                                 num_repeats=1)
    awg_sa_cmd.set_wave_sequence(awgsa.AwgId.AWG_1,
                                 wave_sequence_1,
                                 num_repeats=1)
    return (wave_sequence_0, wave_sequence_1)
Exemplo n.º 3
0
def set_wave_sequence(awg_sa_cmd):
    """
    波形シーケンスを AWG にセットする
    """
    awg_id_to_wave_sequence = {}

    for awg_id in awg_list:
        # 波形の定義
        num_cycles = int(6.0 * awg_to_freq[awg_id]) # 6.0[us]
        i_wave = awgsa.AwgWave(
            wave_type = awgsa.AwgWave.SINE,
            frequency = awg_to_freq[awg_id],
            phase = 90, # cos
            amplitude = 15000,
            num_cycles = num_cycles)

        q_wave = awgsa.AwgWave(
            wave_type = awgsa.AwgWave.SINE,
            frequency = awg_to_freq[awg_id],
            phase = 0,
            amplitude = 15000,
            num_cycles = num_cycles)

        iq_wave = awgsa.AwgIQWave(i_wave, q_wave)

        # 波形シーケンスの定義
        # 波形ステップの開始から終了までの期間は, キャプチャの終了処理にかかるオーバーヘッドを考慮し, 波形出力期間 + 2000 ns を設定する.
        wave_sequence = (awgsa.WaveSequence(DAC_FREQ, is_iq_data = True)
            .add_step(step_id = 0, wave = iq_wave, post_blank = 2000))

        # AWG に波形シーケンスをセットする
        awg_sa_cmd.set_wave_sequence(awg_id = awg_id, wave_sequence = wave_sequence, num_repeats = 1)
        awg_id_to_wave_sequence[awg_id] = wave_sequence

    return awg_id_to_wave_sequence
Exemplo n.º 4
0
def set_wave_sequence(awg_sa_cmd):
    """
    波形シーケンスを AWG にセットする
    """
    wave_0 = awgsa.AwgWave(wave_type=awgsa.AwgWave.SINE,
                           frequency=10.0,
                           phase=0,
                           amplitude=20000,
                           num_cycles=3)

    wave_1 = awgsa.AwgWave(wave_type=awgsa.AwgWave.SAWTOOTH,
                           frequency=15.0,
                           phase=0.0,
                           amplitude=10000,
                           offset=0,
                           crest_pos=0.5,
                           num_cycles=3)

    wave_2 = awgsa.AwgWave(wave_type=awgsa.AwgWave.SQUARE,
                           frequency=10.0,
                           phase=0.0,
                           amplitude=10000,
                           offset=0,
                           duty_cycle=50.0,
                           num_cycles=3)

    wave_3 = awgsa.AwgWave(wave_type=awgsa.AwgWave.GAUSSIAN,
                           frequency=10.0,
                           phase=0.0,
                           amplitude=8000,
                           offset=0,
                           domain_begin=-4.0,
                           domain_end=4.0,
                           variance=0.2,
                           num_cycles=2)

    wave_4 = awgsa.AwgIQWave(wave_0, wave_1)
    wave_5 = awgsa.AwgIQWave(wave_1, wave_2)
    wave_6 = awgsa.AwgIQWave(wave_2, wave_0)

    wave_sequence_0 = (awgsa.WaveSequence(DAC_FREQ).add_step(
        step_id=0, wave=wave_0, post_blank=2000).add_step(
            step_id=1, wave=wave_1,
            post_blank=1500).add_step(step_id=2, wave=wave_2,
                                      post_blank=0).add_step(step_id=3,
                                                             wave=wave_3,
                                                             post_blank=3000))

    wave_sequence_1 = (awgsa.WaveSequence(DAC_FREQ, is_iq_data=True).add_step(
        step_id=0, wave=wave_4,
        post_blank=1000).add_step(step_id=1, wave=wave_5,
                                  post_blank=2000).add_step(step_id=2,
                                                            wave=wave_6,
                                                            post_blank=1500))

    awg_sa_cmd.set_wave_sequence(awgsa.AwgId.AWG_0,
                                 wave_sequence_0,
                                 num_repeats=1)
    awg_sa_cmd.set_wave_sequence(awgsa.AwgId.AWG_1,
                                 wave_sequence_1,
                                 num_repeats=1)
    return (wave_sequence_0, wave_sequence_1)