Пример #1
0
def test_process_waveform():
    with Rigol_DS1000Z(find_visa()) as oscope:
        oscope.autoscale()
        filename = "tests/test_process_waveform.csv"
        process_waveform(oscope.waveform(source=2), filename=filename)
        assert os.path.isfile(filename)
        os.remove(filename)
Пример #2
0
def test_process_display():
    with Rigol_DS1000Z(find_visa()) as oscope:
        oscope.autoscale()
        filename = "tests/test_process_display_data.png"
        process_display(oscope.display(), filename=filename)
        assert os.path.isfile(filename)
        os.remove(filename)
Пример #3
0
def save_waveform(source, filename):
    with Rigol_DS1000Z(find_visa()) as oscope:
        try:
            source = int(source)
        except ValueError:
            pass
        finally:
            waveform = oscope.waveform(source=source)
            process_waveform(waveform, filename=filename)
Пример #4
0
def test_find_visa():
    assert find_visa() == "USB0::0x1AB1::0x04CE::DS1ZA224812889::INSTR"
Пример #5
0
def oscope():
    with Rigol_DS1000Z(find_visa()) as oscope:
        oscope.ieee(rst=True)
        yield oscope
Пример #6
0
def save_display(filename):
    with Rigol_DS1000Z(find_visa()) as oscope:
        display = oscope.display()
        process_display(display, filename=filename)