cta-observatory / lst-sim-config

Repository to store configurations of MC simulations for LST (+MAGIC)
0 stars 1 forks source link

Failing simtel files in dec_931 #55

Open vuillaut opened 1 year ago

vuillaut commented 1 year ago

Hi,

List of files:

/fefs/aswg/data/mc/DL0/LSTProd2/TrainingDataset/Protons/dec_931/sim_telarray/node_corsika_theta_31.589_az_122.714_/output_v1.4/simtel_corsika_theta_31.589_az_122.714_run192.simtel.gz
/fefs/aswg/data/mc/DL0/LSTProd2/TrainingDataset/Protons/dec_931/sim_telarray/node_corsika_theta_31.589_az_122.714_/output_v1.4/simtel_corsika_theta_31.589_az_122.714_run229.simtel.gz

These files seem corrupted and fail when processed with lstchain, giving this error:

Traceback (most recent call last):
  File "/fefs/aswg/workspace/thomas.vuillaume/software/miniconda3/envs/lstmcpipe/bin/lstchain_mc_r0_to_dl1", line 8, in <module>
    sys.exit(main())
  File "/fefs/aswg/workspace/thomas.vuillaume/software/miniconda3/envs/lstmcpipe/lib/python3.7/site-packages/lstchain/scripts/lstchain_mc_r0_to_dl1.py", line 77, in main
    custom_config=config,
  File "/fefs/aswg/workspace/thomas.vuillaume/software/miniconda3/envs/lstmcpipe/lib/python3.7/site-packages/lstchain/reco/r0_to_dl1.py", line 459, in r0_to_dl1
    for i, event in enumerate(source):
  File "/fefs/aswg/workspace/thomas.vuillaume/software/miniconda3/envs/lstmcpipe/lib/python3.7/site-packages/ctapipe/io/eventsource.py", line 278, in __iter__
    for event in self._generator():
  File "/fefs/aswg/workspace/thomas.vuillaume/software/miniconda3/envs/lstmcpipe/lib/python3.7/site-packages/ctapipe/io/simteleventsource.py", line 376, in _generator
    yield from self._generate_events()
  File "/fefs/aswg/workspace/thomas.vuillaume/software/miniconda3/envs/lstmcpipe/lib/python3.7/site-packages/ctapipe/io/simteleventsource.py", line 393, in _generate_events
    for counter, array_event in enumerate(self.file_):
  File "/fefs/aswg/workspace/thomas.vuillaume/software/miniconda3/envs/lstmcpipe/lib/python3.7/site-packages/eventio/simtel/simtelfile.py", line 291, in iter_array_events
    self.next_low_level()
  File "/fefs/aswg/workspace/thomas.vuillaume/software/miniconda3/envs/lstmcpipe/lib/python3.7/site-packages/eventio/simtel/simtelfile.py", line 159, in next_low_level
    self.current_mc_shower = o.parse()
  File "/fefs/aswg/workspace/thomas.vuillaume/software/miniconda3/envs/lstmcpipe/lib/python3.7/site-packages/eventio/simtel/objects.py", line 1347, in parse
    mc['altitude'] = read_float(byte_stream)
  File "/fefs/aswg/workspace/thomas.vuillaume/software/miniconda3/envs/lstmcpipe/lib/python3.7/site-packages/eventio/tools.py", line 28, in read_float
    return struct.unpack('<f', f.read(4))[0]
struct.error: unpack requires a buffer of 4 bytes

Would it be possible to either reprocess these files or (/and in the mean time) delete them, please?

Voutsi commented 1 year ago

Hi @vuillaut , I deleted the 2 files. Thanks for spotting them.