cta-observatory / pyeventio

Python read-only implementation for the EventIO data format used by the CORSIKA 7 IACT extension and sim_telarray
MIT License
10 stars 12 forks source link

ImageParameters unsupported version #266

Closed lheckmann closed 1 year ago

lheckmann commented 1 year ago

SIMTEL_VERSION = 2022-12-15 19:19:16 UTC (konrad@wizard4) SIMTEL_RELEASE = 2022.349.1 from 2022-12-15 (moving on ...) SIMTEL_BASE_RELEASE = 2022.349.1 from 2022-12-15 (moving on ...)

Error when investigating the output of a custom (non-CTA design) simtel array file:

NotImplementedError                       Traceback (most recent call last)
Input In [12], in <cell line: 2>()
      8                         for subsubobject in subobject:
      9                             print(subsubobject)
---> 10                             print(subsubobject.parse())
     11 #                             if subsubobject.only_subobjects:
     12 #                         for subsubobject in subobject:
     13 #                             print(subsubobject.parse())
     14                             #if isinstance(subsubobject, PixelList):
     16             i=i+1

File /remote/pcmagic18/heckmann/anaconda2/envs/revoll/lib/python3.9/site-packages/eventio/simtel/objects.py:1147, in ImageParameters.parse(self)
   1146 def parse(self):
-> 1147     assert_exact_version(self, supported_version=5)
   1148     self.seek(0)
   1149     byte_stream = BytesIO(self.read())

File /remote/pcmagic18/heckmann/anaconda2/envs/revoll/lib/python3.9/site-packages/eventio/version_handling.py:3, in assert_exact_version(self, supported_version)
      1 def assert_exact_version(self, supported_version):
      2     if self.header.version != supported_version:
----> 3         raise NotImplementedError(
      4             (
      5                 'Unsupported version of {name}:'
      6                 ' only supports version {supported_version}'
      7                 ', got {given_version}'
      8             ).format(
      9                 name=self.__class__.__name__,
     10                 supported_version=supported_version,
     11                 given_version=self.header.version,
     12             )
     13         )

NotImplementedError: Unsupported version of ImageParameters: only supports version 5, got 6