aboutsummaryrefslogtreecommitdiff
path: root/tests/test_trace.py
blob: 06f43c562b563e04dd7d1f13807066a3f56dc925 (plain)
1
2
3
4
5
6
7
8
9
10
11
from qolab.data.trace import loadTrace
import numpy as np

def test_load_uncompressed_v0dot1_trace():
    tr = loadTrace('tests/trace_test_data/xtrace1.dat')
    cfg = tr.getConfig()
    assert cfg['config']['version'] == '0.1'
    assert cfg['config']['model'] == 'Trace'
    data = tr.getData()
    assert np.all( (data - np.array([[1], [3], [2], [5]])) == 0 )