Skip to content

Commit b4934e3

Browse files
authored
Merge pull request #338 from cta-observatory/calib-exists
Search the calibration files using the lstcam_calib version
2 parents 80e1e1c + 608aba7 commit b4934e3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/osa/scripts/calibration_pipeline.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from osa.provenance.capture import trace
2020
from osa.utils.cliopts import calibration_pipeline_cliparsing
2121
from osa.utils.logging import myLogger
22+
from osa.utils import utils
2223
from osa.workflow.stages import DRS4PedestalStage, ChargeCalibrationStage
2324

2425
__all__ = [
@@ -37,8 +38,10 @@ def is_calibration_produced(drs4_pedestal_run_id: int, pedcal_run_id: int) -> bo
3738
Check if both daily calibration (DRS4 baseline and
3839
charge calibration) files are already produced.
3940
"""
40-
return drs4_pedestal_exists(drs4_pedestal_run_id, options.prod_id) \
41-
and calibration_file_exists(pedcal_run_id, options.prod_id)
41+
lstcam_env = Path(cfg.get("LST1", "CALIB_ENV"))
42+
lstcam_calib_version = utils.get_lstcam_calib_version(lstcam_env)
43+
return drs4_pedestal_exists(drs4_pedestal_run_id, f"v{lstcam_calib_version}") \
44+
and calibration_file_exists(pedcal_run_id, f"v{lstcam_calib_version}")
4245

4346

4447
def drs4_pedestal_command(drs4_pedestal_run_id: int) -> list:

0 commit comments

Comments
 (0)