lstosa 0.10.5__py3-none-any.whl → 0.10.6__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lstosa
3
- Version: 0.10.5
3
+ Version: 0.10.6
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,9 +1,9 @@
1
1
  osa/__init__.py,sha256=crotf1NMTfNdZuCua_5T_jk3kvZrAAwVw4FPrfxv994,193
2
- osa/_version.py,sha256=JrZYbNAlpJOYXO5cv0MZXjpyEhQ6EOMM22X9FTSLwks,413
2
+ osa/_version.py,sha256=0ek8_w_jF04UB6FpW1K7d1RgH0zQMd77H5TbKzdthjI,413
3
3
  osa/conftest.py,sha256=b_26FciV8NZAdHj2S10E8cE4bettinLJY83Roe1a5L4,19358
4
4
  osa/job.py,sha256=acdiaRlHsc2GLyz2Oz_RBiawJo9QKK-tsajYdM7X0_Q,25393
5
5
  osa/osadb.py,sha256=pkCuYbEG-moHG0uQHxwB7giQAv2XTld4HJ5gdn1F1hA,2422
6
- osa/paths.py,sha256=PwH_mQ4PHSCQ2YLwCXG2IrGezey4w7pzhkuR25oRXfs,11902
6
+ osa/paths.py,sha256=nkXPUdQAzIlvB71lOERiPjgET58fj5DEbWazWqKbIJw,11869
7
7
  osa/raw.py,sha256=ZNIsuqfx5ljoz_hwhSuafdKf-wr8-cxRJmel-A2endg,1337
8
8
  osa/report.py,sha256=sL2V7n8Y_UUaSDbWJY2o4UxDb4FU5AaFIRR8R25DB8o,4634
9
9
  osa/version.py,sha256=9T2TtuGBQeOy5PJDxMCeGlqx5baxLaq47VmFTDc09z8,796
@@ -36,11 +36,11 @@ osa/provenance/config/logger.yaml,sha256=hy_lH3DfbRFh2VM_iawI-c-3wE0cjTRHy465C2e
36
36
  osa/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
37
  osa/scripts/autocloser.py,sha256=j7nRvglIv_Ol_GJzbcfqPHquBIWwQU515GkDRfc6_ho,14540
38
38
  osa/scripts/calibration_pipeline.py,sha256=g9o1chqCRRSo7GNuQZRABjGnJYjZyfhkPgRLPmuV994,5703
39
- osa/scripts/closer.py,sha256=n0GRxQ6DHYykyL4FvT24Qar80-FbX6b0ymJOEez-r3c,15091
39
+ osa/scripts/closer.py,sha256=eZLUlqot4EXwL9IlU21tKRZ2GvZ4i8ill0c2QdEkoDY,15219
40
40
  osa/scripts/copy_datacheck.py,sha256=tfDs6oTdPbii4BOXp6bTHuED0xNJeqaPFrv6Ed7ZnWc,3104
41
41
  osa/scripts/datasequence.py,sha256=gXAp8arbLPEK-sca9VnME6-2XfUzBFIoEFchlUZYrXI,9260
42
- osa/scripts/gain_selection.py,sha256=KcyxRJrsy4vOHYGukDGKFXRm6FV1TGu8n_nvmCIfyrw,7990
43
- osa/scripts/provprocess.py,sha256=02vJmQvl7W3e4oAzzzSwOVo9okXLCwYPNqe6jKeaoLA,18480
42
+ osa/scripts/gain_selection.py,sha256=BmNjtfeCFw5OGymaLG1PFPDcn8-yDOG6fWaifOCOHLM,8095
43
+ osa/scripts/provprocess.py,sha256=pKR3wf3krAGmeHen_au2RmqJJtNBcX29J3XPQYKrHRE,18536
44
44
  osa/scripts/reprocess_longterm.py,sha256=wMfc3UVwickkGFiviIhOlB9ebMIqQPWoUrgg8hQ78Lg,2138
45
45
  osa/scripts/reprocessing.py,sha256=D-J8Rl3GrkWpxYkk6ci79oJOMewgGdxLkQgaHCAZuqs,3417
46
46
  osa/scripts/sequencer.py,sha256=6Cg-eIExk0eN8-HXkO6DBeFEWOI-FznDueqJEpbEzos,8163
@@ -60,7 +60,7 @@ osa/tests/test_raw.py,sha256=WkgwEc_vY0D6nREo-BSm6F-5xDpqidMC0DkS86pXlRU,1058
60
60
  osa/tests/test_report.py,sha256=OY-EsrXytoS6esfjUeLnIAmCMIw9EzoGD-elySafyhE,1365
61
61
  osa/tests/test_veto.py,sha256=UIsooji_5Z8TtAhc0UlD2VqheVd9DBufuMxinJ3e0w8,1066
62
62
  osa/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
63
- osa/utils/cliopts.py,sha256=5J-dIzavSOhw0i5VHyJRN-Pri7ipXHKP8omYzB61Ptg,13506
63
+ osa/utils/cliopts.py,sha256=Xqh-9w2o1iSHfwO0jHEW0AXQ9VeEw6X6IGLNAPKoNyc,13699
64
64
  osa/utils/iofile.py,sha256=kJ7KB1suynhS2cTf7EeHwhMXq3delC_ls2HFpCzvsZo,2021
65
65
  osa/utils/logging.py,sha256=1WcNPjjslo3y25jcEY_fe0yXOeJ6frZrGLAy1GJpu_k,1491
66
66
  osa/utils/mail.py,sha256=uQfqPQdiOVHTvEAXr9H15a7-g9DtYVNKjMEb9GnI0oY,554
@@ -75,9 +75,9 @@ osa/workflow/dl3.py,sha256=kz7L5jcKHFJ--UdQ8HQKLzWO6nxc2LLOTz42ExcqzTk,9921
75
75
  osa/workflow/stages.py,sha256=WYgUM2XDIaUjCc4_Zs_VSGW6gk73EaKcHk6ZMnPds74,6692
76
76
  osa/workflow/tests/test_dl3.py,sha256=aY5bb-8OcZGAXG3JPCZihChzkA_GsWjRIa31BHZn3Dg,299
77
77
  osa/workflow/tests/test_stages.py,sha256=TmC00XFACWZp740TQeFaokWi3C50ovj_XGiySWrrdZk,3944
78
- lstosa-0.10.5.dist-info/LICENSE,sha256=h6iWot11EtMvaDaS_AvCHKLTNByO5wEbMyNj1c90y1c,1519
79
- lstosa-0.10.5.dist-info/METADATA,sha256=84gLrevLiO4mmPjC9P-sIFCw_qLR02ehCQv71TqPxcw,7354
80
- lstosa-0.10.5.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
81
- lstosa-0.10.5.dist-info/entry_points.txt,sha256=e5x7xddaqZhfdZPsErhHInqR4UGHsxXIlylEbTie0_8,928
82
- lstosa-0.10.5.dist-info/top_level.txt,sha256=_Tj8zVHdrOoWZuuWTHbDpNofxW0imUmKdlXhnxsXJek,4
83
- lstosa-0.10.5.dist-info/RECORD,,
78
+ lstosa-0.10.6.dist-info/LICENSE,sha256=h6iWot11EtMvaDaS_AvCHKLTNByO5wEbMyNj1c90y1c,1519
79
+ lstosa-0.10.6.dist-info/METADATA,sha256=Z1GxQGKizr5McPZEq-mhPLuYRmNjzLV8teV87W62kdA,7354
80
+ lstosa-0.10.6.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
81
+ lstosa-0.10.6.dist-info/entry_points.txt,sha256=e5x7xddaqZhfdZPsErhHInqR4UGHsxXIlylEbTie0_8,928
82
+ lstosa-0.10.6.dist-info/top_level.txt,sha256=_Tj8zVHdrOoWZuuWTHbDpNofxW0imUmKdlXhnxsXJek,4
83
+ lstosa-0.10.6.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.41.2)
2
+ Generator: bdist_wheel (0.42.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
osa/_version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.10.5'
16
- __version_tuple__ = version_tuple = (0, 10, 5)
15
+ __version__ = version = '0.10.6'
16
+ __version_tuple__ = version_tuple = (0, 10, 6)
osa/paths.py CHANGED
@@ -9,9 +9,8 @@ from typing import List
9
9
  import lstchain
10
10
  from astropy.table import Table
11
11
  from lstchain.onsite import (find_systematics_correction_file,
12
- find_time_calibration_file)
13
- from lstchain.scripts.onsite.onsite_create_calibration_file import \
14
- search_filter
12
+ find_time_calibration_file,
13
+ find_filter_wheels)
15
14
 
16
15
  from osa.configs import options
17
16
  from osa.configs.config import DEFAULT_CFG, cfg
@@ -142,7 +141,7 @@ def get_calibration_filename(run_id: int, prod_id: str) -> Path:
142
141
  mongodb = cfg.get("database", "caco_db")
143
142
  try:
144
143
  # Cast run_id to int to avoid problems with numpy int64 encoding in MongoDB
145
- options.filters = search_filter(int(run_id), mongodb)
144
+ options.filters = find_filter_wheels(int(run_id), mongodb)
146
145
  except IOError:
147
146
  log.warning("No filter information found in database. Assuming positions 52.")
148
147
  options.filters = 52
osa/scripts/closer.py CHANGED
@@ -193,7 +193,6 @@ def post_process_files(seq_list: list):
193
193
  output_files_set = set(Path(options.directory).rglob("*Run*"))
194
194
 
195
195
  DL1AB_RE = re.compile(rf"{options.dl1_prod_id}/dl1.*.(?:h5|hdf5|hdf)")
196
- DL2_RE = re.compile(f"{options.dl2_prod_id}/dl2.*.(?:h5|hdf5|hdf)")
197
196
  MUONS_RE = re.compile(r"muons.*.fits")
198
197
  DATACHECK_RE = re.compile(r"datacheck_dl1.*.(?:h5|hdf5|hdf)")
199
198
  INTERLEAVED_RE = re.compile(r"interleaved.*.(?:h5|hdf5|hdf)")
@@ -201,13 +200,16 @@ def post_process_files(seq_list: list):
201
200
  pattern_files = dict(
202
201
  [
203
202
  ("DL1AB", DL1AB_RE),
204
- ("DL2", DL2_RE),
205
203
  ("MUON", MUONS_RE),
206
204
  ("DATACHECK", DATACHECK_RE),
207
205
  ("INTERLEAVED", INTERLEAVED_RE),
208
206
  ]
209
207
  )
210
208
 
209
+ if not options.no_dl2:
210
+ DL2_RE = re.compile(f"{options.dl2_prod_id}/dl2.*.(?:h5|hdf5|hdf)")
211
+ pattern_files["DL2"] = DL2_RE
212
+
211
213
  for concept, pattern_re in pattern_files.items():
212
214
  log.info(f"Post processing {concept} files, {len(output_files_set)} files left")
213
215
 
@@ -368,6 +370,9 @@ def extract_provenance(seq_list):
368
370
  nightdir,
369
371
  options.prod_id,
370
372
  ]
373
+ if options.no_dl2:
374
+ cmd.append("--no-dl2")
375
+
371
376
  if not options.simulate and not options.test and shutil.which("sbatch") is not None:
372
377
  subprocess.run(cmd, check=True)
373
378
  else:
@@ -206,8 +206,8 @@ def check_failed_jobs(date: str, output_basedir: Path = None):
206
206
  @click.option("--check", is_flag=True, default=False, help="Check for failed jobs.")
207
207
  @click.argument("dates-file", type=click.Path(exists=True, path_type=Path))
208
208
  @click.argument("output-basedir", type=click.Path(path_type=Path))
209
- @click.option("-s", "--start-time", type=int, default=10)
210
- @click.option("-e", "--end-time", type=int, default=18)
209
+ @click.option("-s", "--start-time", type=int, default=10, help="Time to (re)start gain selection in HH format.")
210
+ @click.option("-e", "--end-time", type=int, default=18, help="Time to stop gain selection in HH format.")
211
211
  def main(
212
212
  dates_file: Path = None,
213
213
  output_basedir: Path = None,
@@ -442,15 +442,17 @@ def produce_provenance(session_log_filename, base_filename):
442
442
  calibration_to_dl1 = define_paths(
443
443
  "calibration_to_dl1", PATH_DL1, options.dl1_prod_id, base_filename
444
444
  )
445
- calibration_to_dl2 = define_paths(
446
- "calibration_to_dl2", PATH_DL2, options.dl2_prod_id, base_filename
447
- )
448
445
  calibration_to_dl1_lines = calibration_lines + dl1_lines[1:]
449
446
  lines_dl1 = copy.deepcopy(calibration_to_dl1_lines)
450
- calibration_to_dl2_lines = calibration_to_dl1_lines + dl1_dl2_lines[1:]
451
- lines_dl2 = copy.deepcopy(calibration_to_dl2_lines)
452
447
  produce_provenance_files(lines_dl1, calibration_to_dl1)
453
- produce_provenance_files(lines_dl2, calibration_to_dl2)
448
+
449
+ if not options.no_dl2:
450
+ calibration_to_dl2 = define_paths(
451
+ "calibration_to_dl2", PATH_DL2, options.dl2_prod_id, base_filename
452
+ )
453
+ calibration_to_dl2_lines = calibration_to_dl1_lines + dl1_dl2_lines[1:]
454
+ lines_dl2 = copy.deepcopy(calibration_to_dl2_lines)
455
+ produce_provenance_files(lines_dl2, calibration_to_dl2)
454
456
 
455
457
 
456
458
  def main():
osa/utils/cliopts.py CHANGED
@@ -326,6 +326,12 @@ def provprocess_argparser():
326
326
  dest="quit",
327
327
  help="use this flag to reset session and remove log file",
328
328
  )
329
+ parser.add_argument(
330
+ "--no-dl2",
331
+ action="store_true",
332
+ default=False,
333
+ help="Do not produce DL2 files (default False)",
334
+ )
329
335
  parser.add_argument(
330
336
  "drs4_pedestal_run_id", help="Number of the drs4_pedestal used in the calibration"
331
337
  )
@@ -354,6 +360,7 @@ def provprocessparsing():
354
360
  options.configfile = opts.config.resolve()
355
361
  options.filter = opts.filter
356
362
  options.quit = opts.quit
363
+ options.no_dl2 = opts.no_dl2
357
364
  set_prod_ids()
358
365
 
359
366