cta-observatory / cta-lstchain

LST prototype testbench chain
https://cta-observatory.github.io/cta-lstchain/
BSD 3-Clause "New" or "Revised" License
22 stars 77 forks source link

Missing pedestal tables in some last subruns #1197

Open morcuended opened 6 months ago

morcuended commented 6 months ago

Now and then it happens that last subruns of some runs haven't got the pedestal table, hence dl1ab script fails. When this occurs, OSA discards these files, corresponding to a few seconds of data. Should we try to treat them differently or is it okay that they are discarded?

Traceback (most recent call last):
  File "/fefs/aswg/software/conda/envs/osa-v0.10/bin/lstchain_dl1ab", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/fefs/aswg/software/conda/envs/osa-v0.10/lib/python3.11/site-packages/lstchain/scripts/lstchain_dl1ab.py", line 185, in main
    pedestal_thresh = get_threshold_from_dl1_file(args.input_file, sigma)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/fefs/aswg/software/conda/envs/osa-v0.10/lib/python3.11/site-packages/lstchain/calib/camera/pixel_threshold_estimation.py", line 58, in get_threshold_from_dl1_file
    ped_mean_pe, ped_std_pe = get_bias_and_std(dl1_path)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/fefs/aswg/software/conda/envs/osa-v0.10/lib/python3.11/site-packages/lstchain/calib/camera/pixel_threshold_estimation.py", line 25, in get_bias_and_std
    ped = f.root[dl1_params_tel_mon_ped_key]
          ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/fefs/aswg/software/conda/envs/osa-v0.10/lib/python3.11/site-packages/tables/group.py", line 422, in __getitem__
    raise IndexError(childname)
IndexError: /dl1/event/telescope/monitoring/pedestal