Skip to content

Commit 3b82c74

Browse files
authored
Merge pull request #325 from cta-observatory/issue322
Changes about the calibration prod_id - Issue #322
2 parents d4d379b + 2a8676a commit 3b82c74

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/osa/scripts/calibration_pipeline.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from osa.utils.cliopts import calibration_pipeline_cliparsing
2121
from osa.utils.logging import myLogger
2222
from osa.workflow.stages import DRS4PedestalStage, ChargeCalibrationStage
23+
from osa.utils.utils import get_lstchain_version
2324

2425
__all__ = [
2526
"calibration_sequence",
@@ -46,25 +47,30 @@ def drs4_pedestal_command(drs4_pedestal_run_id: int) -> list:
4647
base_dir = Path(cfg.get("LST1", "BASE")).resolve()
4748
r0_dir = Path(cfg.get("LST1", "R0_DIR")).resolve()
4849
command = cfg.get("lstchain", "drs4_baseline")
50+
prod_id = get_lstchain_version()
4951
return [
5052
command,
5153
"-r", str(drs4_pedestal_run_id),
5254
"-b", base_dir,
5355
f"--r0-dir={r0_dir}",
5456
"--no-progress",
57+
"-v",prod_id,
5558
]
5659

5760
def calibration_file_command(drs4_pedestal_run_id: int, pedcal_run_id: int) -> list:
5861
"""Build the create_calibration_file command."""
5962
base_dir = Path(cfg.get("LST1", "BASE")).resolve()
6063
r0_dir = Path(cfg.get("LST1", "R0_DIR")).resolve()
6164
command = cfg.get("lstchain", "charge_calibration")
65+
prod_id = get_lstchain_version()
6266
cmd = [
6367
command,
6468
"-p", str(drs4_pedestal_run_id),
6569
"-r", str(pedcal_run_id),
6670
"-b", base_dir,
6771
f"--r0-dir={r0_dir}",
72+
"-v",prod_id,
73+
6874
]
6975
# In case of problems with trigger tagging:
7076
if cfg.getboolean("lstchain", "use_ff_heuristic_id"):

src/osa/scripts/tests/test_osa_scripts.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,8 @@ def test_drs4_pedestal_cmd(base_test_dir):
349349
base_test_dir,
350350
f"--r0-dir={r0_dir}",
351351
"--no-progress",
352+
"-v","v0.10.18"
353+
352354
]
353355
assert cmd == expected_command
354356

@@ -367,6 +369,7 @@ def test_calibration_file_cmd(base_test_dir):
367369
"-b",
368370
base_test_dir,
369371
f"--r0-dir={r0_dir}",
372+
"-v","v0.10.18"
370373
]
371374
assert cmd == expected_command
372375

0 commit comments

Comments
 (0)