Commit 621d9e85 authored by Enrique Garcia's avatar Enrique Garcia
Browse files

Merge branch 'excepts_for_reorganizer' into 'master'

add try catch exceptions to reorganizer for RD cases

See merge request !9
parents 9a612be6 80f6eb67
Pipeline #116625 passed with stage
in 17 seconds
......@@ -308,12 +308,18 @@ def create_hfile_out(input_filename, outfile_name, sim_pointer08, config_pointer
# This will only happen on ctapipe, not RTA
# hfile_out.remove_node(dl1_event_node06.telescope.trigger) # Table stored twice, remove to avoid problems.
hfile_out.rename_node(dl1_event_node06.telescope.images, newname='image')
hfile_out.rename_node(dl1_event_node06.telescope.images, newname='image')
except tables.exceptions.NoSuchNodeError as e:
print(f' ** {e} Exception: No images group in the file in dl1/event/telescope/. \n'
f' Check the merging configuration, indeed.')
subarray_pointer = hfile_out.root.dl1.event.subarray
# root.dl1.event.subarray.trigger
except tables.exceptions.NoSuchNodeError as e:
print(f' ** {e} Exception: No subarray pointer in dl1/event.')
subarray_pointer = None
if sim_pointer08 is None:
......@@ -361,8 +367,10 @@ def main(input_filename, output_filename):
# dl1 v0.8 Pointers
simulation_v08 = hfile.root.simulation
except tables.exceptions.NoSuchNodeError as e:
print(f' ** {e} exception: No Simulation group found in the root group of the file.')
simulation_v08 = None
configuration_v08 = hfile.root.configuration
dl1_v08 = hfile.root.dl1
filter_v08 = hfile.filters
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment