Commit 3757394 1 parent 2bd6c87 commit 3757394 Copy full SHA for 3757394
File tree 2 files changed +14
-2
lines changed
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 1
- import tables .filters
2
1
import pandas as pd
3
2
import tempfile
4
3
import numpy as np
5
4
import h5py
6
5
import pytest
7
- from pandas . util . testing import assert_frame_equal
6
+
8
7
9
8
10
9
def test_to_h5py ():
@@ -335,3 +334,16 @@ def test_compression():
335
334
assert all (df .dtypes == df2 .dtypes )
336
335
assert all (df ['x' ] == df2 ['x' ])
337
336
assert all (df ['N' ] == df2 ['N' ])
337
+
338
+
339
+ def test_read_simulated_spectrum ():
340
+ from fact .io import read_simulated_spectrum
341
+ import astropy .units as u
342
+
343
+ s = read_simulated_spectrum ('tests/resources/proton_header_test.hdf5' )
344
+
345
+ assert s ['n_showers' ] == 20000
346
+ assert s ['n_reuse' ] == 20
347
+ assert s ['energy_min' ] == 100 * u .GeV
348
+ assert s ['energy_max' ] == 200 * u .TeV
349
+ assert s ['energy_spectrum_slope' ] == - 2.0
You can’t perform that action at this time.
0 commit comments