-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Labels
Description
The axes of the current test response test_full_detector_response.h5 do not match the corresponding axes of the data test_spectral_fit_data.h5 and background test_spectral_fit_background.h5.
I inspected the elements in this test:
cosipy/tests/threeml/test_spectral_fitting.py
Lines 12 to 18 in c557fc2
| dr = str(data_path / "test_full_detector_response.h5") # path to detector response | |
| data = BinnedData(data_path / "test_spectral_fit.yaml") | |
| background = BinnedData(data_path / "test_spectral_fit.yaml") | |
| data.load_binned_data_from_hdf5(binned_data=data_path / "test_spectral_fit_data.h5") | |
| background.load_binned_data_from_hdf5(binned_data=data_path / "test_spectral_fit_background.h5") |
$ FullDetectorResponse.open(dr).axes['Em'].edges
<Quantity [ 100. , 158.489, 251.189, 398.107, 630.957,
1000. , 1584.89 , 2511.89 , 3981.07 , 6309.57 ,
10000. ] keV>
$ background.binned_data.axes['Em'].edges
<Quantity [ 150., 220., 325., 480., 520., 765., 1120., 1650., 2350.,
3450., 5000.] keV>
$ data.binned_data.axes['Em'].edges
<Quantity [ 150., 220., 325., 480., 520., 765., 1120., 1650., 2350.,
3450., 5000.] keV>
I realized this while fixing the units tests in the interfaces branch, which does check that the axes match. In develop only the number of bins matter, which is why it went unnoticed.
I'll fix in interfaces (by hacking the edge values, so I can recover the same numbers), but I'm opening this here since it affect develop as well.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status