lstosa 0.11.0__tar.gz → 0.11.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. {lstosa-0.11.0 → lstosa-0.11.2}/PKG-INFO +1 -1
  2. {lstosa-0.11.0 → lstosa-0.11.2}/src/lstosa.egg-info/PKG-INFO +1 -1
  3. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/_version.py +2 -2
  4. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/scripts/autocloser.py +3 -3
  5. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/scripts/datasequence.py +1 -1
  6. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/scripts/reprocessing.py +41 -4
  7. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/scripts/sequencer_catB_tailcuts.py +30 -5
  8. {lstosa-0.11.0 → lstosa-0.11.2}/.coveragerc +0 -0
  9. {lstosa-0.11.0 → lstosa-0.11.2}/.gitignore +0 -0
  10. {lstosa-0.11.0 → lstosa-0.11.2}/.mailmap +0 -0
  11. {lstosa-0.11.0 → lstosa-0.11.2}/.pre-commit-config.yaml +0 -0
  12. {lstosa-0.11.0 → lstosa-0.11.2}/.readthedocs.yml +0 -0
  13. {lstosa-0.11.0 → lstosa-0.11.2}/LICENSE +0 -0
  14. {lstosa-0.11.0 → lstosa-0.11.2}/MANIFEST.in +0 -0
  15. {lstosa-0.11.0 → lstosa-0.11.2}/README.md +0 -0
  16. {lstosa-0.11.0 → lstosa-0.11.2}/codemeta.json +0 -0
  17. {lstosa-0.11.0 → lstosa-0.11.2}/crontab/crontab.txt +0 -0
  18. {lstosa-0.11.0 → lstosa-0.11.2}/dev/mysql.py +0 -0
  19. {lstosa-0.11.0 → lstosa-0.11.2}/docs/Makefile +0 -0
  20. {lstosa-0.11.0 → lstosa-0.11.2}/docs/_static/logo_lstosa.png +0 -0
  21. {lstosa-0.11.0 → lstosa-0.11.2}/docs/authors.rst +0 -0
  22. {lstosa-0.11.0 → lstosa-0.11.2}/docs/components/index.rst +0 -0
  23. {lstosa-0.11.0 → lstosa-0.11.2}/docs/conf.py +0 -0
  24. {lstosa-0.11.0 → lstosa-0.11.2}/docs/configuration.rst +0 -0
  25. {lstosa-0.11.0 → lstosa-0.11.2}/docs/contribute.rst +0 -0
  26. {lstosa-0.11.0 → lstosa-0.11.2}/docs/documents/index.rst +0 -0
  27. {lstosa-0.11.0 → lstosa-0.11.2}/docs/howto/index.rst +0 -0
  28. {lstosa-0.11.0 → lstosa-0.11.2}/docs/index.rst +0 -0
  29. {lstosa-0.11.0 → lstosa-0.11.2}/docs/introduction/index.rst +0 -0
  30. {lstosa-0.11.0 → lstosa-0.11.2}/docs/introduction/reduction_steps_lstchain.png +0 -0
  31. {lstosa-0.11.0 → lstosa-0.11.2}/docs/jobs.rst +0 -0
  32. {lstosa-0.11.0 → lstosa-0.11.2}/docs/make.bat +0 -0
  33. {lstosa-0.11.0 → lstosa-0.11.2}/docs/nightsummary.rst +0 -0
  34. {lstosa-0.11.0 → lstosa-0.11.2}/docs/provenance.rst +0 -0
  35. {lstosa-0.11.0 → lstosa-0.11.2}/docs/references.rst +0 -0
  36. {lstosa-0.11.0 → lstosa-0.11.2}/docs/reports.rst +0 -0
  37. {lstosa-0.11.0 → lstosa-0.11.2}/docs/scripts/index.rst +0 -0
  38. {lstosa-0.11.0 → lstosa-0.11.2}/docs/troubleshooting/index.rst +0 -0
  39. {lstosa-0.11.0 → lstosa-0.11.2}/docs/utils.rst +0 -0
  40. {lstosa-0.11.0 → lstosa-0.11.2}/docs/veto.rst +0 -0
  41. {lstosa-0.11.0 → lstosa-0.11.2}/docs/workflow/LSTOSA_flow.png +0 -0
  42. {lstosa-0.11.0 → lstosa-0.11.2}/docs/workflow/index.rst +0 -0
  43. {lstosa-0.11.0 → lstosa-0.11.2}/environment-lstcam.yml +0 -0
  44. {lstosa-0.11.0 → lstosa-0.11.2}/environment.yml +0 -0
  45. {lstosa-0.11.0 → lstosa-0.11.2}/extra/example_sequencer.txt +0 -0
  46. {lstosa-0.11.0 → lstosa-0.11.2}/extra/history_files/sequence_LST1_04183.history +0 -0
  47. {lstosa-0.11.0 → lstosa-0.11.2}/extra/history_files/sequence_LST1_04183_failed.history +0 -0
  48. {lstosa-0.11.0 → lstosa-0.11.2}/extra/history_files/sequence_LST1_04183_oneline.history +0 -0
  49. {lstosa-0.11.0 → lstosa-0.11.2}/extra/history_files/sequence_LST1_04185.0001.history +0 -0
  50. {lstosa-0.11.0 → lstosa-0.11.2}/extra/history_files/sequence_LST1_04185.0010.history +0 -0
  51. {lstosa-0.11.0 → lstosa-0.11.2}/extra/sacct_output.csv +0 -0
  52. {lstosa-0.11.0 → lstosa-0.11.2}/extra/squeue_output.csv +0 -0
  53. {lstosa-0.11.0 → lstosa-0.11.2}/pyproject.toml +0 -0
  54. {lstosa-0.11.0 → lstosa-0.11.2}/setup.cfg +0 -0
  55. {lstosa-0.11.0 → lstosa-0.11.2}/src/lstosa.egg-info/SOURCES.txt +0 -0
  56. {lstosa-0.11.0 → lstosa-0.11.2}/src/lstosa.egg-info/dependency_links.txt +0 -0
  57. {lstosa-0.11.0 → lstosa-0.11.2}/src/lstosa.egg-info/entry_points.txt +0 -0
  58. {lstosa-0.11.0 → lstosa-0.11.2}/src/lstosa.egg-info/requires.txt +0 -0
  59. {lstosa-0.11.0 → lstosa-0.11.2}/src/lstosa.egg-info/top_level.txt +0 -0
  60. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/__init__.py +0 -0
  61. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/configs/__init__.py +0 -0
  62. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/configs/config.py +0 -0
  63. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/configs/datamodel.py +0 -0
  64. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/configs/options.py +0 -0
  65. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/configs/sequencer.cfg +0 -0
  66. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/conftest.py +0 -0
  67. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/high_level/__init__.py +0 -0
  68. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/high_level/selection_cuts.toml +0 -0
  69. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/high_level/significance.py +0 -0
  70. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/high_level/tests/test_significance.py +0 -0
  71. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/job.py +0 -0
  72. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/nightsummary/__init__.py +0 -0
  73. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/nightsummary/database.py +0 -0
  74. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/nightsummary/extract.py +0 -0
  75. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/nightsummary/nightsummary.py +0 -0
  76. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/nightsummary/set_source_coordinates.py +0 -0
  77. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/nightsummary/tests/test_database.py +0 -0
  78. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/nightsummary/tests/test_extract.py +0 -0
  79. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/nightsummary/tests/test_nightsummary.py +0 -0
  80. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/nightsummary/tests/test_source_coordinates.py +0 -0
  81. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/osadb.py +0 -0
  82. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/paths.py +0 -0
  83. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/provenance/__init__.py +0 -0
  84. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/provenance/capture.py +0 -0
  85. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/provenance/config/definition.yaml +0 -0
  86. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/provenance/config/environment.yaml +0 -0
  87. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/provenance/config/logger.yaml +0 -0
  88. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/provenance/io.py +0 -0
  89. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/provenance/utils.py +0 -0
  90. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/raw.py +0 -0
  91. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/report.py +0 -0
  92. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/scripts/__init__.py +0 -0
  93. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/scripts/calibration_pipeline.py +0 -0
  94. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/scripts/closer.py +0 -0
  95. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/scripts/copy_datacheck.py +0 -0
  96. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/scripts/gain_selection.py +0 -0
  97. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/scripts/gainsel_webmaker.py +0 -0
  98. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/scripts/provprocess.py +0 -0
  99. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/scripts/reprocess_longterm.py +0 -0
  100. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/scripts/sequencer.py +0 -0
  101. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/scripts/sequencer_webmaker.py +0 -0
  102. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/scripts/show_run_summary.py +0 -0
  103. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/scripts/simulate_processing.py +0 -0
  104. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/scripts/tests/__init__.py +0 -0
  105. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/scripts/tests/test_osa_scripts.py +0 -0
  106. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/scripts/update_source_catalog.py +0 -0
  107. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/tests/__init__.py +0 -0
  108. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/tests/test_jobs.py +0 -0
  109. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/tests/test_osa.py +0 -0
  110. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/tests/test_osadb.py +0 -0
  111. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/tests/test_paths.py +0 -0
  112. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/tests/test_raw.py +0 -0
  113. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/tests/test_report.py +0 -0
  114. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/tests/test_veto.py +0 -0
  115. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/utils/__init__.py +0 -0
  116. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/utils/cliopts.py +0 -0
  117. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/utils/iofile.py +0 -0
  118. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/utils/logging.py +0 -0
  119. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/utils/mail.py +0 -0
  120. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/utils/register.py +0 -0
  121. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/utils/tests/test_iofile.py +0 -0
  122. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/utils/tests/test_utils.py +0 -0
  123. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/utils/utils.py +0 -0
  124. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/version.py +0 -0
  125. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/veto.py +0 -0
  126. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/webserver/__init__.py +0 -0
  127. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/webserver/utils.py +0 -0
  128. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/workflow/__init__.py +0 -0
  129. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/workflow/dl3.py +0 -0
  130. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/workflow/stages.py +0 -0
  131. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/workflow/tests/test_dl3.py +0 -0
  132. {lstosa-0.11.0 → lstosa-0.11.2}/src/osa/workflow/tests/test_stages.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lstosa
3
- Version: 0.11.0
3
+ Version: 0.11.2
4
4
  Summary: Onsite analysis pipeline for the CTA LST-1
5
5
  Author: María Láinez, José Enrique Ruiz, Lab Saha, Andrés Baquero, José Luis Contreras, Maximilian Linhoff
6
6
  Author-email: Daniel Morcuende <dmorcuen@ucm.es>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lstosa
3
- Version: 0.11.0
3
+ Version: 0.11.2
4
4
  Summary: Onsite analysis pipeline for the CTA LST-1
5
5
  Author: María Láinez, José Enrique Ruiz, Lab Saha, Andrés Baquero, José Luis Contreras, Maximilian Linhoff
6
6
  Author-email: Daniel Morcuende <dmorcuen@ucm.es>
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.11.0'
21
- __version_tuple__ = version_tuple = (0, 11, 0)
20
+ __version__ = version = '0.11.2'
21
+ __version_tuple__ = version_tuple = (0, 11, 2)
@@ -73,16 +73,16 @@ class Telescope:
73
73
 
74
74
  if self.is_closed():
75
75
  log.info(f"{self.telescope} is already closed! Ignoring {self.telescope}")
76
- return
76
+ sys.exit(0)
77
77
  if not analysis_path(self.telescope).exists():
78
78
  log.warning(
79
79
  f"Analysis directory does not exist for {self.telescope}! "
80
80
  f"Ignoring {self.telescope}"
81
81
  )
82
- return
82
+ sys.exit(0)
83
83
  if not self.lock_automatic_sequencer() and not ignore_cronlock:
84
84
  log.warning(f"{self.telescope} already locked! Ignoring {self.telescope}")
85
- return
85
+ sys.exit(0)
86
86
  if not self.simulate_sequencer(date, config_file, test, no_gainsel):
87
87
  log.warning(
88
88
  f"Simulation of the sequencer failed "
@@ -207,7 +207,7 @@ def dl1ab(run_str: str, dl1b_config: Path, dl1_prod_id: str) -> int:
207
207
  f"Cat-B calibration did not finish yet for run {run_str[:5]}. "
208
208
  "Please try again later."
209
209
  )
210
- sys.exit(1)
210
+ sys.exit(0)
211
211
 
212
212
  if options.simulate:
213
213
  return 0
@@ -22,7 +22,17 @@ def number_of_pending_jobs():
22
22
 
23
23
 
24
24
  def run_script(
25
- script: str, date, config: Path, no_dl2: bool, no_gainsel: bool, no_calib: bool, simulate: bool, force: bool
25
+ script: str,
26
+ date,
27
+ config: Path,
28
+ no_dl2: bool,
29
+ no_gainsel: bool,
30
+ no_calib: bool,
31
+ no_dl1ab: bool,
32
+ simulate: bool,
33
+ force: bool,
34
+ overwrite_tailcuts: bool,
35
+ overwrite_catb: bool,
26
36
  ):
27
37
  """Run the sequencer for a given date."""
28
38
  osa_config = Path(config).resolve()
@@ -38,12 +48,21 @@ def run_script(
38
48
  if no_calib:
39
49
  cmd.append("--no-calib")
40
50
 
51
+ if no_dl1ab:
52
+ cmd.append("--no-dl1ab")
53
+
41
54
  if simulate:
42
55
  cmd.append("--simulate")
43
56
 
44
57
  if force:
45
58
  cmd.append("--force")
46
59
 
60
+ if overwrite_tailcuts:
61
+ cmd.append("--overwrite-tailcuts")
62
+
63
+ if overwrite_catb:
64
+ cmd.append("--overwrite-catB")
65
+
47
66
  # Append the telescope to the command in the last place
48
67
  cmd.append("LST1")
49
68
 
@@ -69,8 +88,11 @@ def get_list_of_dates(dates_file):
69
88
  @click.option("--no-dl2", is_flag=True, help="Do not run the DL2 step.")
70
89
  @click.option("--no-gainsel", is_flag=True, help="Do not require gain selection to be finished.")
71
90
  @click.option("--no-calib", is_flag=True, help="Do not run the calibration step.")
91
+ @click.option("--no-dl1ab", is_flag=True, help="Do not run the DL1AB step.")
72
92
  @click.option("-s", "--simulate", is_flag=True, help="Activate simulation mode.")
73
93
  @click.option("-f", "--force", is_flag=True, help="Force the autocloser to close the day.")
94
+ @click.option("--overwrite-tailcuts", is_flag=True, help="Overwrite the tailcuts config file if it already exists.")
95
+ @click.option("--overwrite-catB", is_flag=True, help="Overwrite the Cat-B calibration files if they already exist.")
74
96
  @click.option(
75
97
  "-c",
76
98
  "--config",
@@ -79,7 +101,7 @@ def get_list_of_dates(dates_file):
79
101
  help="Path to the OSA config file.",
80
102
  )
81
103
  @click.argument(
82
- "script", type=click.Choice(["sequencer", "closer", "copy_datacheck", "autocloser"])
104
+ "script", type=click.Choice(["sequencer", "closer", "copy_datacheck", "autocloser", "sequencer_catB_tailcuts"])
83
105
  )
84
106
  @click.argument("dates-file", type=click.Path(exists=True))
85
107
  def main(
@@ -89,9 +111,12 @@ def main(
89
111
  no_dl2: bool = False,
90
112
  no_gainsel: bool = False,
91
113
  no_calib: bool = False,
114
+ no_dl1ab: bool = False,
92
115
  simulate: bool = False,
93
116
  force: bool = False,
94
- ):
117
+ overwrite_tailcuts: bool = False,
118
+ overwrite_catb: bool = False,
119
+ ):
95
120
  """
96
121
  Loop over the dates listed in the input file and launch the script for each of them.
97
122
  The input file should list the dates in the format YYYY-MM-DD one date per line.
@@ -107,7 +132,19 @@ def main(
107
132
  # Avoid running jobs while it is still night time
108
133
  wait_for_daytime()
109
134
 
110
- run_script(script, date, config, no_dl2, no_gainsel, no_calib, simulate, force)
135
+ run_script(
136
+ script,
137
+ date,
138
+ config,
139
+ no_dl2,
140
+ no_gainsel,
141
+ no_calib,
142
+ no_dl1ab,
143
+ simulate,
144
+ force,
145
+ overwrite_tailcuts,
146
+ overwrite_catb,
147
+ )
111
148
  log.info("Waiting 1 minute to launch the process for the next date...\n")
112
149
  time.sleep(60)
113
150
 
@@ -50,6 +50,18 @@ parser.add_argument(
50
50
  default=False,
51
51
  help="Simulate launching of the sequencer_catB_tailcuts script.",
52
52
  )
53
+ parser.add_argument(
54
+ "--overwrite-tailcuts",
55
+ action="store_true",
56
+ default=False,
57
+ help="Overwrite the tailcuts config file if it already exists.",
58
+ )
59
+ parser.add_argument(
60
+ "--overwrite-catB",
61
+ action="store_true",
62
+ default=False,
63
+ help="Overwrite the Cat-B calibration files if they already exist.",
64
+ )
53
65
  parser.add_argument(
54
66
  "tel_id",
55
67
  choices=["ST", "LST1", "LST2", "all"],
@@ -105,7 +117,7 @@ def launch_catB_calibration(run_id: int):
105
117
  before and it finished successfully, it creates a catB_{run}.closed file.
106
118
  """
107
119
  job_id = get_catB_last_job_id(run_id)
108
- if job_id:
120
+ if job_id and not options.overwrite_catB:
109
121
  job_status = get_sacct_output(run_sacct(job_id=job_id))["State"]
110
122
  if job_status.item() in ["RUNNING", "PENDING"]:
111
123
  log.debug(f"Job {job_id} (corresponding to run {run_id:05d}) is still running.")
@@ -123,8 +135,11 @@ def launch_catB_calibration(run_id: int):
123
135
 
124
136
  else:
125
137
  if catB_calibration_file_exists(run_id):
126
- log.info(f"Cat-B calibration file already produced for run {run_id:05d}.")
127
- return
138
+ if not options.overwrite_catB:
139
+ log.info(f"Cat-B calibration file already produced for run {run_id:05d}.")
140
+ return
141
+ else:
142
+ log.info(f"Cat-B calibration file already produced for run {run_id:05d}. Overwriting it.")
128
143
 
129
144
  command = cfg.get("lstchain", "catB_calibration")
130
145
  if cfg.getboolean("lstchain", "use_lstcam_env_for_CatB_calib"):
@@ -156,6 +171,9 @@ def launch_catB_calibration(run_id: int):
156
171
  cmd.append(f"--dl1-dir={analysis_dir}")
157
172
  cmd.append(f"--lstchain-version={lstchain_version[1:]}")
158
173
 
174
+ if options.overwrite_catB:
175
+ cmd.append("--yes")
176
+
159
177
  if not options.simulate:
160
178
  job = sp.run(cmd, encoding="utf-8", capture_output=True, text=True, check=True)
161
179
  job_id = job.stdout.strip()
@@ -210,6 +228,8 @@ def main():
210
228
  opts = parser.parse_args()
211
229
  options.tel_id = opts.tel_id
212
230
  options.simulate = opts.simulate
231
+ options.overwrite_tailcuts = opts.overwrite_tailcuts
232
+ options.overwrite_catB = opts.overwrite_catB
213
233
  options.date = opts.date
214
234
  options.date = set_default_date_if_needed()
215
235
  options.configfile = opts.config.resolve()
@@ -231,8 +251,13 @@ def main():
231
251
  # launch catB calibration and tailcut finder in parallel
232
252
  if cfg.getboolean("lstchain", "apply_catB_calibration") and not catB_closed_file_exists(run_id):
233
253
  launch_catB_calibration(run_id)
234
- if not cfg.getboolean("lstchain", "apply_standard_dl1b_config") and not tailcuts_config_file_exists(run_id):
235
- launch_tailcuts_finder(run_id)
254
+ if not cfg.getboolean("lstchain", "apply_standard_dl1b_config"):
255
+ if tailcuts_config_file_exists(run_id) and not options.overwrite_tailcuts:
256
+ log.debug(
257
+ f"Tailcuts config file already exists for run {run_id:05d}. Use --overwrite-tailcuts to overwrite it."
258
+ )
259
+ else:
260
+ launch_tailcuts_finder(run_id)
236
261
 
237
262
 
238
263
  if __name__ == "__main__":
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes