lstosa 0.11.0__py3-none-any.whl → 0.11.2__py3-none-any.whl
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.
- {lstosa-0.11.0.dist-info → lstosa-0.11.2.dist-info}/METADATA +1 -1
- {lstosa-0.11.0.dist-info → lstosa-0.11.2.dist-info}/RECORD +11 -11
- osa/_version.py +2 -2
- osa/scripts/autocloser.py +3 -3
- osa/scripts/datasequence.py +1 -1
- osa/scripts/reprocessing.py +41 -4
- osa/scripts/sequencer_catB_tailcuts.py +30 -5
- {lstosa-0.11.0.dist-info → lstosa-0.11.2.dist-info}/LICENSE +0 -0
- {lstosa-0.11.0.dist-info → lstosa-0.11.2.dist-info}/WHEEL +0 -0
- {lstosa-0.11.0.dist-info → lstosa-0.11.2.dist-info}/entry_points.txt +0 -0
- {lstosa-0.11.0.dist-info → lstosa-0.11.2.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: lstosa
|
|
3
|
-
Version: 0.11.
|
|
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,5 +1,5 @@
|
|
|
1
1
|
osa/__init__.py,sha256=crotf1NMTfNdZuCua_5T_jk3kvZrAAwVw4FPrfxv994,193
|
|
2
|
-
osa/_version.py,sha256=
|
|
2
|
+
osa/_version.py,sha256=1Ph4pvOzDnjh4d_nPyelQAADT24a8meFvWDaUi3ljuY,513
|
|
3
3
|
osa/conftest.py,sha256=AdSHdWqjeMTgIeZEF8fdw6eSliySouivMWCPIqUV2os,24667
|
|
4
4
|
osa/job.py,sha256=gLf-e7QRIvNhjGRINDTR5-k2PyYQqbEvPnUcg0DaVdw,27791
|
|
5
5
|
osa/osadb.py,sha256=pkCuYbEG-moHG0uQHxwB7giQAv2XTld4HJ5gdn1F1hA,2422
|
|
@@ -34,18 +34,18 @@ osa/provenance/config/definition.yaml,sha256=6USKM92kjLpF8cy0TFl2d1WRjowjOmtCclN
|
|
|
34
34
|
osa/provenance/config/environment.yaml,sha256=kPM6ucPyLZLDFzkwFWoY0C6vmAArG98U-P1UAl89bgE,246
|
|
35
35
|
osa/provenance/config/logger.yaml,sha256=hy_lH3DfbRFh2VM_iawI-c-3wE0cjTRHy465C2eFfnQ,510
|
|
36
36
|
osa/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
37
|
-
osa/scripts/autocloser.py,sha256=
|
|
37
|
+
osa/scripts/autocloser.py,sha256=yjROBHDMbKHu0HAb0UW_3pZ-K9R20gQJTlMzKCA9dvU,14401
|
|
38
38
|
osa/scripts/calibration_pipeline.py,sha256=oWX2L9WIofVHp5qYsX3YMfwoslfiUgnXtWA2EI8KuG4,6056
|
|
39
39
|
osa/scripts/closer.py,sha256=vhoe9wkvPvMc5O_kXqAiBuWeqm_KrBpYzgb9zs9ZORw,21718
|
|
40
40
|
osa/scripts/copy_datacheck.py,sha256=rAJu5-5oJxspynjYqVWLDKnXTF7Ib9xtzSf3_DiIHsk,3212
|
|
41
|
-
osa/scripts/datasequence.py,sha256=
|
|
41
|
+
osa/scripts/datasequence.py,sha256=0EZYlkX7ouaD66Ia2a5SWKbL0Fhlk8p4knKh0TG-2Gw,8592
|
|
42
42
|
osa/scripts/gain_selection.py,sha256=PUG1J2V2SIboVKXJ-u4-h_XJyOGzfurazPu37M7lmhA,23238
|
|
43
43
|
osa/scripts/gainsel_webmaker.py,sha256=40_DX7RUmImX-31iqRTFPEUvdVXXPSKp0xMEJWuAu80,5006
|
|
44
44
|
osa/scripts/provprocess.py,sha256=Zv8sHTOgGNuEzu1QPUF142VQbHyfOsrxO073-xA6KG8,19107
|
|
45
45
|
osa/scripts/reprocess_longterm.py,sha256=wMfc3UVwickkGFiviIhOlB9ebMIqQPWoUrgg8hQ78Lg,2138
|
|
46
|
-
osa/scripts/reprocessing.py,sha256=
|
|
46
|
+
osa/scripts/reprocessing.py,sha256=IL30e2McFA0EGbzvkTXdzmKJGBTbafYlCA-PsafyzyY,4571
|
|
47
47
|
osa/scripts/sequencer.py,sha256=2t-fcD1pTvYV54vFSxxKID-L7pkRg7geXo-E43cnL6M,11927
|
|
48
|
-
osa/scripts/sequencer_catB_tailcuts.py,sha256=
|
|
48
|
+
osa/scripts/sequencer_catB_tailcuts.py,sha256=zVBuCBiiIoO3HKHbJ0zqaDtuwxkxcziR4T5i-2WyDX8,10476
|
|
49
49
|
osa/scripts/sequencer_webmaker.py,sha256=a9okC-l9UMJHELTLLM2Q933-JELFOhXEbbH1Kbp1E8g,4936
|
|
50
50
|
osa/scripts/show_run_summary.py,sha256=ofznLdoFHKQB-TELD6g5zMqD_TE9M9BuJR12zHvNdXE,2518
|
|
51
51
|
osa/scripts/simulate_processing.py,sha256=D3b0kjyUS6Lm7pkQNJ-tJzQMveTwoPabfBBW80RMqN0,6828
|
|
@@ -76,9 +76,9 @@ osa/workflow/dl3.py,sha256=ZMXPrdJA0WOxDiHEW9sdM2vmYix8R3eSMTGc6o42yxg,9860
|
|
|
76
76
|
osa/workflow/stages.py,sha256=ILg91VyNXcy--si7CpDa1UFRiugqIH6nKl10Ru2zZVc,7422
|
|
77
77
|
osa/workflow/tests/test_dl3.py,sha256=81Vt4lNxNjdKi_ehzymqfFWFjncw7GuQcix9S0Yigaw,384
|
|
78
78
|
osa/workflow/tests/test_stages.py,sha256=aslfOIjf-rvf3r9N7NtimaOKkVB6K1M3bidgHOzRkMs,3985
|
|
79
|
-
lstosa-0.11.
|
|
80
|
-
lstosa-0.11.
|
|
81
|
-
lstosa-0.11.
|
|
82
|
-
lstosa-0.11.
|
|
83
|
-
lstosa-0.11.
|
|
84
|
-
lstosa-0.11.
|
|
79
|
+
lstosa-0.11.2.dist-info/LICENSE,sha256=h6iWot11EtMvaDaS_AvCHKLTNByO5wEbMyNj1c90y1c,1519
|
|
80
|
+
lstosa-0.11.2.dist-info/METADATA,sha256=EiJmaibt0JPYuEQlXDwbpK3JEeZGLajGf8b9K79LQ5A,7302
|
|
81
|
+
lstosa-0.11.2.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
|
82
|
+
lstosa-0.11.2.dist-info/entry_points.txt,sha256=CzDKpLjZZQm8jJBxOVpMR8Czpgg_Yh-k6IPETp30VZE,1048
|
|
83
|
+
lstosa-0.11.2.dist-info/top_level.txt,sha256=_Tj8zVHdrOoWZuuWTHbDpNofxW0imUmKdlXhnxsXJek,4
|
|
84
|
+
lstosa-0.11.2.dist-info/RECORD,,
|
osa/_version.py
CHANGED
osa/scripts/autocloser.py
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 "
|
osa/scripts/datasequence.py
CHANGED
osa/scripts/reprocessing.py
CHANGED
|
@@ -22,7 +22,17 @@ def number_of_pending_jobs():
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
def run_script(
|
|
25
|
-
script: str,
|
|
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(
|
|
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
|
-
|
|
127
|
-
|
|
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")
|
|
235
|
-
|
|
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
|