Skip to content
Snippets Groups Projects

Resolve "Error when using an non zero initial_telemetry_size"

+ 25
0
@@ -3,6 +3,7 @@
# pylint: disable=missing-module-docstring
import pytest
import h5py
from lisainstrument import Instrument
@@ -74,3 +75,27 @@ def test_locking():
Instrument(size=100, lock='N7-12')
with pytest.raises(ValueError):
Instrument(size=100, lock='N1-67')
def test_initial_telemetry_size():
"""Test that simulations can run with a nonzero initial telemetry size."""
orbit_paths = [
'tests/keplerian-orbits-1-0-2.h5',
'tests/esa-orbits-1-0-2.h5',
'tests/keplerian-orbits-2-0.h5',
'tests/esa-trailing-orbits-2-0.h5',
]
for orbit_path in orbit_paths:
# Read orbit file t0 and leave room for initial telemetry
with h5py.File(orbit_path, 'r') as orbitf:
t0 = orbitf.attrs['t0'] + 1E6
instru = Instrument(
initial_telemetry_size=10,
telemetry_downsampling=100,
orbits=orbit_path,
size=100,
t0=t0)
instru.simulate()
instru.write(mode='w')
Loading