diff --git a/protozfits/__init__.py b/protozfits/__init__.py index 86a31c5..8350e00 100644 --- a/protozfits/__init__.py +++ b/protozfits/__init__.py @@ -30,6 +30,7 @@ pb2_modules = { 'L0': L0_pb2, + 'DataModel': L0_pb2, 'R1': R1_pb2, 'R1_DigiCam': R1_DigiCam_pb2, 'R1_NectarCam': R1_NectarCam_pb2, diff --git a/protozfits/tests/test_R1_example_file.py b/protozfits/tests/test_R1_example_file.py index c7bf6be..15415f5 100644 --- a/protozfits/tests/test_R1_example_file.py +++ b/protozfits/tests/test_R1_example_file.py @@ -1,6 +1,7 @@ import numpy as np import pkg_resources import os +from glob import glob from protozfits import File @@ -27,3 +28,23 @@ def test_can_iterate_over_events_and_run_header(): assert event.pixel_status.shape == (14,) assert event.lstcam.first_capacitor_id.shape == (16,) assert event.lstcam.counters.shape == (44,) + + +glob_path = pkg_resources.resource_filename( + 'protozfits', + os.path.join( + 'tests', + 'resources', + '*.fits.fz' + ) +) + +all_test_resources = sorted(glob(glob_path)) + + +def test_can_open_and_get_an_event_from_all_test_resources(): + print() + for path in all_test_resources: + with File(path) as f: + event = next(f.Events) + print(path, len(str(event)))