Exemplo n.º 1
0
 def setup_class(cls):
     cls.ri = RoachHeterodyne(roachip=ROACH1_IP,
                              adc_valon=ROACH1_VALON,
                              host_ip=ROACH1_HOST_IP,
                              lo_valon=MockValon(),
                              initialize=False)
     cls.ri.initialize(use_config=False)
 def setup_class(cls):
     cls.ri = Roach2Heterodyne(roachip=ROACH2_IP,
                               adc_valon=ROACH2_VALON,
                               host_ip=ROACH2_GBE_HOST_IP,
                               lo_valon=MockValon(),
                               initialize=False)
     cls.ri.initialize(use_config=False)
     cls.ri.set_loopback(True)
     cls.ri.set_fft_gain(0)
Exemplo n.º 3
0
def test_heterodyne_sweep():
    num_tones = 16
    num_waveforms = 2**5
    num_tone_samples = 2**10
    length_seconds = 0.1
    ri = RoachHeterodyne(roach=MockRoach('roach'),
                         initialize=False,
                         adc_valon=MockValon())
    ri.lo_frequency = 1000
    center_frequencies = ri.lo_frequency + np.linspace(-100, 100, num_tones)
    offsets = np.linspace(-20e-3, 20e-3, num_waveforms)
    tone_banks = [center_frequencies + offset for offset in offsets]
    state = {'something': 'something state'}

    # Load waveforms one at a time.
    sweep = acquire.run_sweep(ri=ri,
                              tone_banks=tone_banks,
                              num_tone_samples=num_tone_samples,
                              length_seconds=length_seconds,
                              state=state,
                              description="description")
    assert len(sweep.stream_arrays) == num_waveforms
    assert all([
        stream_array.s21_raw.shape[0] == num_tones
        for stream_array in sweep.stream_arrays
    ])

    # Pre-load all waveforms.
    acquire.load_heterodyne_sweep_tones(ri, tone_banks, num_tone_samples)
    sweep = acquire.run_loaded_sweep(ri=ri,
                                     length_seconds=length_seconds,
                                     state=state,
                                     description="description")
    assert len(sweep.stream_arrays) == num_waveforms
    assert all([
        stream_array.s21_raw.shape[0] == num_tones
        for stream_array in sweep.stream_arrays
    ])
Exemplo n.º 4
0
 def setup_class(cls):
     cls.ri = Roach2Heterodyne(roach=MockRoach('roach'),
                               adc_valon=MockValon(),
                               lo_valon=MockValon(),
                               initialize=False)
Exemplo n.º 5
0
 def setup_class(cls):
     cls.ri = Roach2Baseband(roach=MockRoach('roach'),
                             adc_valon=MockValon(),
                             initialize=False)