cta-observatory / nectarchain

NectarCAM high level analysis tools
https://nectarchain.readthedocs.io
BSD 3-Clause "New" or "Revised" License
7 stars 18 forks source link

`nectarchain` cannot handle runs taken with EvB v6 #118

Closed jlenain closed 4 months ago

jlenain commented 4 months ago

Describe the bug nectarchain currently cannot handle runs taken with the version 6 of the event builder, following https://github.com/cta-observatory/ctapipe_io_nectarcam/pull/51.

To Reproduce Steps to reproduce the behavior:

  1. For instance, running nectarchain/src/nectarchain/user_scripts/ltibaldo/example_pedestal.py on run 5425.

Expected behavior nectarchain should support runs taken with both versions 4 and 6 of the LSTCam/NectarCAM event builder.

Supporting information

$ python nectarchain/src/nectarchain/user_scripts/ltibaldo/example_pedestal.py
2024-06-19 09:35:47,540 numexpr.utils INFO NumExpr defaulting to 8 threads.
2024-06-19 07:35:58,713 ctapipe.core.provenance INFO No activity has been explicitly started, starting new default activity. Consider calling Provenance().start_activity(<name>) explicitly.
2024-06-19 07:36:02,145 ctapipe.core.plugins INFO Loading ctapipe_io plugin: ctapipe.io.hdf5eventsource:HDF5EventSource
2024-06-19 07:36:02,145 ctapipe.core.plugins INFO Entrypoint provides: <class 'ctapipe.io.hdf5eventsource.HDF5EventSource'>
2024-06-19 07:36:02,146 ctapipe.core.plugins INFO Loading ctapipe_io plugin: ctapipe.io.simteleventsource:SimTelEventSource
2024-06-19 07:36:02,146 ctapipe.core.plugins INFO Entrypoint provides: <class 'ctapipe.io.simteleventsource.SimTelEventSource'>
2024-06-19 07:36:02,146 ctapipe.core.plugins INFO Loading ctapipe_io plugin: ctapipe_io_nectarcam:NectarCAMEventSource
2024-06-19 07:36:02,146 ctapipe.core.plugins INFO Entrypoint provides: <class 'ctapipe_io_nectarcam.NectarCAMEventSource'>
2024-06-19 07:36:02,204 nectarchain.makers.core WARNING the componentName in componentsList must be defined in the nectarchain.makers.component module, otherwise the import of the componentName will raise an error
2024-06-19 07:36:02,332 INFO [nectarchain.PedestalNectarCAMCalibrationTool] (tool.initialize): Loading config from '[]'
2024-06-19 07:36:02,334 INFO [nectarchain.PedestalNectarCAMCalibrationTool] (tool.initialize): ctapipe version 0.19.1
2024-06-19 07:36:02,334 INFO [nectarchain.PedestalNectarCAMCalibrationTool] (core.setup): setup of the Tool
2024-06-19 07:36:02,390 INFO [nectarchain.data.management] (management.findrun): Found 8 files matching /data/users/jlenain/tmp/runs/NectarCAM.Run5425.*.fits.fz
2024-06-19 07:36:02,391 INFO [nectarchain.makers.core] (core.load_run): /data/users/jlenain/tmp/runs/NectarCAM.Run5425.*.fits.fz will be loaded
2024-06-19 07:36:02,392 INFO [nectarchain.data.container.eventSource.LightNectarCAMEventSource] (eventsource.__init__): INPUT PATH = /data/users/jlenain/tmp/runs/NectarCAM.Run5425.0000.fits.fz
2024-06-19 07:36:11,885 INFO [nectarchain.data.container.eventSource.LightNectarCAMEventSource] (__init__.__init__): Read 8 input files
2024-06-19 07:36:12,234 ctapipe.io.hdf5tableio.HDF5TableReader WARNING Table /tel_0/calibration is missing column time_correction for field time_correction of container <class 'ctapipe.containers.WaveformCalibrationContainer'>. It will be skipped.
2024-06-19 07:36:12,235 ctapipe.io.hdf5tableio.HDF5TableReader WARNING Table /tel_0/calibration is missing column n_pe for field n_pe of container <class 'ctapipe.containers.WaveformCalibrationContainer'>. It will be skipped.
2024-06-19 07:36:12,277 ctapipe.io.hdf5tableio.HDF5TableReader WARNING Table /tel_0/flatfield is missing column charge_mean for field charge_mean of container <class 'ctapipe.containers.FlatFieldContainer'>. It will be skipped.
2024-06-19 07:36:12,277 ctapipe.io.hdf5tableio.HDF5TableReader WARNING Table /tel_0/flatfield is missing column charge_median for field charge_median of container <class 'ctapipe.containers.FlatFieldContainer'>. It will be skipped.
2024-06-19 07:36:12,278 ctapipe.io.hdf5tableio.HDF5TableReader WARNING Table /tel_0/flatfield is missing column charge_std for field charge_std of container <class 'ctapipe.containers.FlatFieldContainer'>. It will be skipped.
2024-06-19 07:36:12,278 ctapipe.io.hdf5tableio.HDF5TableReader WARNING Table /tel_0/flatfield is missing column time_mean for field time_mean of container <class 'ctapipe.containers.FlatFieldContainer'>. It will be skipped.
2024-06-19 07:36:12,278 ctapipe.io.hdf5tableio.HDF5TableReader WARNING Table /tel_0/flatfield is missing column time_median for field time_median of container <class 'ctapipe.containers.FlatFieldContainer'>. It will be skipped.
2024-06-19 07:36:12,278 ctapipe.io.hdf5tableio.HDF5TableReader WARNING Table /tel_0/flatfield is missing column time_std for field time_std of container <class 'ctapipe.containers.FlatFieldContainer'>. It will be skipped.
2024-06-19 07:36:12,278 ctapipe.io.hdf5tableio.HDF5TableReader WARNING Table /tel_0/flatfield is missing column relative_gain_median for field relative_gain_median of container <class 'ctapipe.containers.FlatFieldContainer'>. It will be skipped.
2024-06-19 07:36:12,278 ctapipe.io.hdf5tableio.HDF5TableReader WARNING Table /tel_0/flatfield is missing column relative_gain_std for field relative_gain_std of container <class 'ctapipe.containers.FlatFieldContainer'>. It will be skipped.
2024-06-19 07:36:12,278 ctapipe.io.hdf5tableio.HDF5TableReader WARNING Table /tel_0/flatfield is missing column relative_time_median for field relative_time_median of container <class 'ctapipe.containers.FlatFieldContainer'>. It will be skipped.
2024-06-19 07:36:12,278 ctapipe.io.hdf5tableio.HDF5TableReader WARNING Table /tel_0/flatfield is missing column charge_median_outliers for field charge_median_outliers of container <class 'ctapipe.containers.FlatFieldContainer'>. It will be skipped.
2024-06-19 07:36:12,278 ctapipe.io.hdf5tableio.HDF5TableReader WARNING Table /tel_0/flatfield is missing column charge_std_outliers for field charge_std_outliers of container <class 'ctapipe.containers.FlatFieldContainer'>. It will be skipped.
2024-06-19 07:36:12,278 ctapipe.io.hdf5tableio.HDF5TableReader WARNING Table /tel_0/flatfield is missing column time_median_outliers for field time_median_outliers of container <class 'ctapipe.containers.FlatFieldContainer'>. It will be skipped.
Traceback (most recent call last):
  File "/home/jlenain/local/src/python/cta-observatory/nectarchain/src/nectarchain/user_scripts/ltibaldo/example_pedestal.py", line 33, in <module>
    tool.setup()
  File "/home/jlenain/local/src/python/cta-observatory/nectarchain/src/nectarchain/makers/core.py", line 294, in setup
    self._setup_eventsource(*args, **kwargs)
  File "/home/jlenain/local/src/python/cta-observatory/nectarchain/src/nectarchain/makers/core.py", line 313, in _setup_eventsource
    self.__pixels_id = self._event_source.camera_config.expected_pixels_id
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'CameraConfiguration' object has no attribute 'expected_pixels_id'