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

Processing of data with PE calibratoin applied by EVB #1249

Open marialainez opened 2 months ago

marialainez commented 2 months ago

All runs from the day 2024/04/26 fail in the r0_to_dl1 step with the error:

Overwriting /fefs/aswg/data/real/running_analysis/20240426/v0.10/interleaved/interleaved_LST-1.Run17203.0015.h5
WARNING: IERSStaleWarning: leap-second file is expired. [astropy.utils.iers.iers]
IERSStaleWarning: leap-second file is expired.
Traceback (most recent call last):
  File "/fefs/aswg/software/conda/envs/osa-v0.10/bin/lstchain_data_r0_to_dl1", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/fefs/aswg/software/conda/envs/osa-v0.10/lib/python3.11/site-packages/lstchain/scripts/lstchain_data_r0_to_dl1.py", line 230, in main
    r0_to_dl1.r0_to_dl1(
  File "/fefs/aswg/software/conda/envs/osa-v0.10/lib/python3.11/site-packages/lstchain/reco/r0_to_dl1.py", line 572, in r0_to_dl1
    r1_dl1_calibrator(event)
  File "/fefs/aswg/software/conda/envs/osa-v0.10/lib/python3.11/site-packages/ctapipe/calib/camera/calibrator.py", line 286, in __call__
    self._calibrate_dl0(event, tel_id)
  File "/fefs/aswg/software/conda/envs/osa-v0.10/lib/python3.11/site-packages/ctapipe/calib/camera/calibrator.py", line 191, in _calibrate_dl0
    waveforms_copy[~reduced_waveforms_mask] = 0
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
IndexError: boolean index did not match indexed array along dimension 0; dimension is 2 but corresponding boolean dimension is 1855
Closing remaining open files:/fefs/aswg/data/real/running_analysis/20240426/v0.10/interleaved/interleaved_LST-1.Run17203.0015.h5...done

Here is the command that is launched:

lstchain_data_r0_to_dl1 --input-file=/fefs/aswg/data/real/R0/20240426/LST-1.1.Run17203.0015.fits.fz --output-dir=/fefs/aswg/data/real/running_analysis/20240426/v0.10 --pedestal-file=/fefs/aswg/data/real/monitoring/PixelCalibration/Cat-A/drs4_baseline/20240317/v0.10.8/drs4_pedestal.Run17194.0000.h5 --calibration-file=/fefs/aswg/data/real/monitoring/PixelCalibration/Cat-A/calibration/20240317/v0.10.8/calibration_filters_52.Run17195.0000.h5 --time-calibration-file=/fefs/aswg/data/real/monitoring/PixelCalibration/Cat-A/drs4_time_sampling_from_FF/20231102/v0.10.4/time_calibration.Run15253.0000.h5 --systematic-correction-file=/fefs/aswg/data/real/monitoring/PixelCalibration/Cat-A/ffactor_systematics/20230410/v0.10.3/calibration_scan_fit_20230410.0000.h5 --config=/fefs/aswg/lstosa/config_files_lstchain/lstchain_standard_v0.10_no_heuristic_ff.json --pointing-file=/fefs/onsite/monitoring/driveLST1/DrivePositioning/DrivePosition_log_20240426.txt --run-summary-path=/fefs/aswg/data/real/monitoring/RunSummary/RunSummary_20240426.ecsv

Also, the calibration runs for this day failed, so I was trying to process them using the DRS4 and PEDCALIB runs from another day.

moralejo commented 2 months ago

Are you using the latest released version? @FrancaCassol any idea of what may have changed that triggers this error? Seems the usual problem of mixing "2-gains" and "1-gain" arrays?

moralejo commented 2 months ago

@marialainez, was lstosa updated relative to the previous successful analysis?

FrancaCassol commented 2 months ago

Hi @marialainez , could please recall which version of lstchain are you using and if there were some changes in osa or the Evb version?

morcuended commented 2 months ago

María is on shift right now, so I'll try to answer:

# packages in environment at /fefs/aswg/software/conda/envs/osa-v0.10:
#
# Name                    Version                   Build  Channel
ctapipe-io-lst            0.23.2                   pypi_0    pypi
lstchain                  0.10.10                  pypi_0    pypi
ctapipe                   0.19.3                   pypi_0    pypi

Looking now at the calibration logs.

No idea about changes in the EVB side.

FrancaCassol commented 2 months ago

Where can I find the calibration log?

FrancaCassol commented 2 months ago

Sorry, I see you copied in the tree. There are no flatfield events.

moralejo commented 2 months ago

@maxnoe found out the data were taken (even the DRS4 file) with wrong EvB configuration: <EVBPreprocessingFlag.BASELINE_SUBTRACTION|DELTA_T_CORRECTION|PEDESTAL_SUBTRACTION|PE_CALIBRATION: 102> Online corrections applied, lstchain is not ready to process those data.