Fr Python bindings don't read FrVect start GPS correctly
framel.py
is not accurately reading the start GPS time of an FrAdcData
array. Consider the following example:
import framel
import numpy
import pytest
def test_read_write(tmp_path):
data = numpy.arange(100)
start = 1126259460.0
dx = 0.01
x_unit = "s"
y_unit = "m"
framel.frputvect(
"test.gwf",
[{
"name": "V1:TEST",
"data": data,
"start": start,
"dx": dx,
"x_unit": x_unit,
"y_unit": y_unit,
"kind": "PROC",
"type": 1,
"subtype": 0,
}]
)
data2, start2, _, dx2, x_unit2, y_unit2 = framel.frgetvect1d("test.gwf", "V1:TEST")
numpy.testing.assert_array_equal(data, data2)
assert start == start2
assert dx == dx2
assert x_unit == x_unit2
assert y_unit == y_unit2
The output is
$ python -m pytest test_framel.py
...
FAILED test_framel.py::test_read_write - assert 1126259460.0 == 1126259500.0