mirror of
https://github.com/fjosw/pyerrors.git
synced 2026-08-04 19:41:17 +02:00
add small test for trajectories
This commit is contained in:
parent
5762171374
commit
d81b987b4b
2 changed files with 31 additions and 0 deletions
BIN
tests/data/openqcd_test/oqcd2_traj30r1.ms.dat
Normal file
BIN
tests/data/openqcd_test/oqcd2_traj30r1.ms.dat
Normal file
Binary file not shown.
|
|
@ -65,6 +65,37 @@ def test_rwms():
|
|||
|
||||
pe.input.openQCD.extract_t0(path, '', dtr_read=3, xmin=0, spatial_extent=4, files=files, names=names, fit_range=2, plot_fit=True)
|
||||
|
||||
# trajectories
|
||||
t0 = pe.input.openQCD.extract_t0(path, 'oqcd2_traj', dtr_read=30, xmin=16, spatial_extent=48, fit_range=2, plot_fit=True, names = ["A|r1"], assume_thermalization=False)
|
||||
assert len(t0.idl['A|r1']) == 10
|
||||
assert t0.idl['A|r1'][0] == 4
|
||||
assert t0.idl['A|r1'][9] == 13
|
||||
|
||||
with pytest.warns(Warning):
|
||||
t0 = pe.input.openQCD.extract_t0(path, 'oqcd2_traj', dtr_read=1, xmin=16, spatial_extent=48, fit_range=2, plot_fit=True, names = ["A|r1"])
|
||||
assert len(t0.idl['A|r1']) == 30
|
||||
assert t0.idl['A|r1'][0] == 1
|
||||
assert t0.idl['A|r1'][29] == 30
|
||||
|
||||
with pytest.warns(Warning):
|
||||
t0 = pe.input.openQCD.extract_t0(path, 'oqcd2_traj', dtr_read=10, xmin=16, spatial_extent=48, fit_range=2, plot_fit=True, names = ["A|r1"])
|
||||
assert len(t0.idl['A|r1']) == 30
|
||||
assert t0.idl['A|r1'][0] == 1
|
||||
assert t0.idl['A|r1'][29] == 30
|
||||
|
||||
with pytest.warns(Warning):
|
||||
t0 = pe.input.openQCD.extract_t0(path, 'oqcd2_traj', dtr_read=30, xmin=16, spatial_extent=48, fit_range=2, plot_fit=True, names = ["A|r1"])
|
||||
assert len(t0.idl['A|r1']) == 10
|
||||
assert t0.idl['A|r1'][0] == 1
|
||||
assert t0.idl['A|r1'][9] == 10
|
||||
|
||||
with pytest.warns(Warning):
|
||||
t0 = pe.input.openQCD.extract_t0(path, 'oqcd2_traj', dtr_read=60, xmin=16, spatial_extent=48, fit_range=2, plot_fit=True, names = ["A|r1"])
|
||||
assert len(t0.idl['A|r1']) == 5
|
||||
assert t0.idl['A|r1'][0] == 1
|
||||
assert t0.idl['A|r1'][4] == 5
|
||||
|
||||
|
||||
with pytest.raises(Exception):
|
||||
pe.input.openQCD.extract_t0(path, '', dtr_read=3, xmin=0, spatial_extent=4, files=files, names=names, fit_range=2, c=14)
|
||||
# w0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue