lstosa 0.10.13__py3-none-any.whl → 0.10.15__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.13
3
+ Version: 0.10.15
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,7 +1,7 @@
1
1
  osa/__init__.py,sha256=crotf1NMTfNdZuCua_5T_jk3kvZrAAwVw4FPrfxv994,193
2
- osa/_version.py,sha256=c5Lgl5D7jKlT_lWX9E4XMtEyMNdztYHiVhsN32Kvd8g,415
2
+ osa/_version.py,sha256=zLN3_5vILM2SpYp9rDAVJoNlgXr6RmLnoGoKrqnkdX8,415
3
3
  osa/conftest.py,sha256=NBeGqTUBRqCPirDSDPny4bf1e_OJXbiePazHwaoQPY4,20072
4
- osa/job.py,sha256=OnjF88kTVdURcrIR9iPenATNx2HteDFlAKtOX4fD144,26603
4
+ osa/job.py,sha256=vl7kBRM8Oe5YK2onUWGtGmHWX0AEktS2sbOuS5fsbgU,27074
5
5
  osa/osadb.py,sha256=pkCuYbEG-moHG0uQHxwB7giQAv2XTld4HJ5gdn1F1hA,2422
6
6
  osa/paths.py,sha256=R-LwBlyoIJ-PuTJ8vcSYWMwzQY7YrgXq7gan0zhVzPY,14399
7
7
  osa/raw.py,sha256=ZNIsuqfx5ljoz_hwhSuafdKf-wr8-cxRJmel-A2endg,1337
@@ -12,7 +12,7 @@ osa/configs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  osa/configs/config.py,sha256=cX0Vr4sorBVQ2KRqPIRSEGENKH_uC5lrgVHx1hp6YTk,1148
13
13
  osa/configs/datamodel.py,sha256=L_WRM91PBlMrtuE30akh7YR-56P0g9D994qzKSfhNJc,1950
14
14
  osa/configs/options.py,sha256=CyL7WnHiC_pvB3mnjRF7Wg43uPzQgmwlbvIqkRzlDLA,524
15
- osa/configs/sequencer.cfg,sha256=vG-6VS2osCccEsY58JgaqqADUDz-k8-9tD3NDitscR4,4871
15
+ osa/configs/sequencer.cfg,sha256=ZHgY1GvIHkdQIg0GtR5iSNXb1C0giDObxL1SH77G1Io,4991
16
16
  osa/high_level/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  osa/high_level/selection_cuts.toml,sha256=ReSmcKtOPZY5JsZ9ExnxYdz7OrJEB8gghCbzHmeOyFg,128
18
18
  osa/high_level/significance.py,sha256=Y1jokkHCo-D_qSqxKiQzc6KJSmivznaJRS2xY-txNIo,9039
@@ -39,19 +39,20 @@ osa/scripts/calibration_pipeline.py,sha256=g9o1chqCRRSo7GNuQZRABjGnJYjZyfhkPgRLP
39
39
  osa/scripts/closer.py,sha256=p11tq2YJLwsRK_CBWXU1465ArzLJ0qWlUCnubGqLPUo,18277
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=w9ymJrADcp5G6YTBYSwPy_3ZFdenYv2KChv3s_GMnAc,13809
42
+ osa/scripts/gain_selection.py,sha256=YIxSSkROox9Xqdgtz9yTFzhWg5F0Qx1ZEJkauaQF2Y8,22871
43
+ osa/scripts/gainsel_webmaker.py,sha256=40_DX7RUmImX-31iqRTFPEUvdVXXPSKp0xMEJWuAu80,5006
43
44
  osa/scripts/provprocess.py,sha256=mufkZe6_qwH3DGqTFxINIc01hciF5RMpw3n_Mp7vwXU,18629
44
45
  osa/scripts/reprocess_longterm.py,sha256=wMfc3UVwickkGFiviIhOlB9ebMIqQPWoUrgg8hQ78Lg,2138
45
- osa/scripts/reprocessing.py,sha256=D-J8Rl3GrkWpxYkk6ci79oJOMewgGdxLkQgaHCAZuqs,3417
46
- osa/scripts/sequencer.py,sha256=GM6B17YQNJfBOosWx0gpXBy4fIwga3DC4T2nGapGQEU,8763
47
- osa/scripts/sequencer_webmaker.py,sha256=YticifQRicxCp5YMeOaP4L8ZRWl7KF2raceVrCf2Ras,4765
46
+ osa/scripts/reprocessing.py,sha256=A97kqX7QtD7ewoUvFhmSaQVVIfplViGhzTtOenTx37w,3630
47
+ osa/scripts/sequencer.py,sha256=zLG_lZ4Nh0oOhTr3TeAG3RsG-iDBOwvt68Vemn-KpGI,10572
48
+ osa/scripts/sequencer_webmaker.py,sha256=gdBYxB85wZIH01ZZKAnlygMiqBEChR1gTHmCGdA08Xo,4792
48
49
  osa/scripts/show_run_summary.py,sha256=SoDLVKdQHOJkfenFguBOfXf10Gyv7heXSQAFnDVZqMs,2468
49
50
  osa/scripts/simulate_processing.py,sha256=NiRVYiwZENt_mnKncytgJT23_-tJMb1B5PswM12nnX4,6941
50
51
  osa/scripts/update_source_catalog.py,sha256=GHwWFc-y6S4KkUJxUVM5drdAnVDD0-n3D-Tv3CCmh4E,7218
51
52
  osa/scripts/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
52
- osa/scripts/tests/test_osa_scripts.py,sha256=7xms2Jq2ZalU5kiHBBbtFOxBzXhrybsNlT16nEtFTxU,12926
53
+ osa/scripts/tests/test_osa_scripts.py,sha256=8rOHbujP-eutTM4QOdDvKbQEPon3gSzteua1PAgKO1E,13790
53
54
  osa/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
- osa/tests/test_jobs.py,sha256=F0jsHZ9BYB_cCHHxlXyO9v1E5_-mBJhuFtshtsAtnXo,15260
55
+ osa/tests/test_jobs.py,sha256=tdgZE21jisCvtlB6oAqXbV4sM1KPMG5tD-Rmcaf5OWo,15488
55
56
  osa/tests/test_osa.py,sha256=QCOsjUgPuNMHoef3Ym2sDXVjun2LaBrfKyroAIH-os8,415
56
57
  osa/tests/test_osadb.py,sha256=pJHV1dxxblGH2sjS-JPDPTkMn-ew1MzbioCFyg7wbB8,1599
57
58
  osa/tests/test_paths.py,sha256=sFCxG5uPGLcto76E7X1I26-kRx5faxgHGh9z8LvHz2M,3173
@@ -59,7 +60,7 @@ osa/tests/test_raw.py,sha256=WkgwEc_vY0D6nREo-BSm6F-5xDpqidMC0DkS86pXlRU,1058
59
60
  osa/tests/test_report.py,sha256=OY-EsrXytoS6esfjUeLnIAmCMIw9EzoGD-elySafyhE,1365
60
61
  osa/tests/test_veto.py,sha256=UIsooji_5Z8TtAhc0UlD2VqheVd9DBufuMxinJ3e0w8,1066
61
62
  osa/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
- osa/utils/cliopts.py,sha256=PFxGh89SJBWjvqrWit05JFUeXnNz4w_ZXqVp4uZwlcc,14319
63
+ osa/utils/cliopts.py,sha256=4uBf4gfUDARWzhzlobPERGn6Pv1ONWdpAXOKxh_Dtm4,14533
63
64
  osa/utils/iofile.py,sha256=kJ7KB1suynhS2cTf7EeHwhMXq3delC_ls2HFpCzvsZo,2021
64
65
  osa/utils/logging.py,sha256=1WcNPjjslo3y25jcEY_fe0yXOeJ6frZrGLAy1GJpu_k,1491
65
66
  osa/utils/mail.py,sha256=uQfqPQdiOVHTvEAXr9H15a7-g9DtYVNKjMEb9GnI0oY,554
@@ -74,9 +75,9 @@ osa/workflow/dl3.py,sha256=kz7L5jcKHFJ--UdQ8HQKLzWO6nxc2LLOTz42ExcqzTk,9921
74
75
  osa/workflow/stages.py,sha256=WYgUM2XDIaUjCc4_Zs_VSGW6gk73EaKcHk6ZMnPds74,6692
75
76
  osa/workflow/tests/test_dl3.py,sha256=aY5bb-8OcZGAXG3JPCZihChzkA_GsWjRIa31BHZn3Dg,299
76
77
  osa/workflow/tests/test_stages.py,sha256=TmC00XFACWZp740TQeFaokWi3C50ovj_XGiySWrrdZk,3944
77
- lstosa-0.10.13.dist-info/LICENSE,sha256=h6iWot11EtMvaDaS_AvCHKLTNByO5wEbMyNj1c90y1c,1519
78
- lstosa-0.10.13.dist-info/METADATA,sha256=_1DEBMLyudnTjOHqjqJXNun16SP7dmLWWzZfm28B7Z0,7349
79
- lstosa-0.10.13.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
80
- lstosa-0.10.13.dist-info/entry_points.txt,sha256=e5x7xddaqZhfdZPsErhHInqR4UGHsxXIlylEbTie0_8,928
81
- lstosa-0.10.13.dist-info/top_level.txt,sha256=_Tj8zVHdrOoWZuuWTHbDpNofxW0imUmKdlXhnxsXJek,4
82
- lstosa-0.10.13.dist-info/RECORD,,
78
+ lstosa-0.10.15.dist-info/LICENSE,sha256=h6iWot11EtMvaDaS_AvCHKLTNByO5wEbMyNj1c90y1c,1519
79
+ lstosa-0.10.15.dist-info/METADATA,sha256=MMb8yy_4losD6R4MOaW8kHk0R5xz_C-q-kby_yVzKNk,7349
80
+ lstosa-0.10.15.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
81
+ lstosa-0.10.15.dist-info/entry_points.txt,sha256=qfARj13Vqt3I-E0tXuJwyC79cv84bjCwEj5uK67vWts,981
82
+ lstosa-0.10.15.dist-info/top_level.txt,sha256=_Tj8zVHdrOoWZuuWTHbDpNofxW0imUmKdlXhnxsXJek,4
83
+ lstosa-0.10.15.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (75.2.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -6,6 +6,7 @@ copy_datacheck = osa.scripts.copy_datacheck:main
6
6
  datasequence = osa.scripts.datasequence:main
7
7
  dl3_stage = osa.workflow.dl3:main
8
8
  gain_selection = osa.scripts.gain_selection:main
9
+ gainsel_webmaker = osa.scripts.gainsel_webmaker:main
9
10
  provprocess = osa.scripts.provprocess:main
10
11
  reprocess_longterm = osa.scripts.reprocess_longterm:main
11
12
  reprocessing = osa.scripts.reprocessing:main
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.13'
16
- __version_tuple__ = version_tuple = (0, 10, 13)
15
+ __version__ = version = '0.10.15'
16
+ __version_tuple__ = version_tuple = (0, 10, 15)
osa/configs/sequencer.cfg CHANGED
@@ -29,6 +29,7 @@ LONGTERM_DIR: %(OSA_DIR)s/DL1DataCheck_LongTerm
29
29
  MERGED_SUMMARY: %(OSA_DIR)s/Catalog/merged_RunSummary.ecsv
30
30
  SEQUENCER_WEB_DIR: %(OSA_DIR)s/SequencerWeb
31
31
  GAIN_SELECTION_FLAG_DIR: %(OSA_DIR)s/GainSel
32
+ GAIN_SELECTION_WEB_DIR: %(OSA_DIR)s/GainSelWeb
32
33
 
33
34
  # To be set by the user. Using PROD-ID will overcome the automatic
34
35
  # fetching of lstchain version. Otherwise leave it empty (and without the colon symbol).
@@ -54,6 +55,7 @@ dl1_to_dl2: lstchain_dl1_to_dl2
54
55
  dl1a_config: /software/lstchain/data/lstchain_standard_config.json
55
56
  store_image_dl1ab: True
56
57
  merge_dl1_datacheck: True
58
+ use_ff_heuristic_gain_selection: False
57
59
  dl1b_config: /software/lstchain/data/lstchain_standard_config.json
58
60
  dl2_config: /software/lstchain/data/lstchain_standard_config.json
59
61
  rf_models: /data/models/prod5/zenith_20deg/20201023_v0.6.3
@@ -70,11 +72,13 @@ electron: /path/to/DL2/electron_mc_testing.h5
70
72
  PARTITION_PEDCALIB: short, long
71
73
  PARTITION_DATA: short, long
72
74
  MEMSIZE_PEDCALIB: 3GB
73
- MEMSIZE_DATA: 16GB
75
+ MEMSIZE_DATA: 6GB
76
+ MEMSIZE_GAINSEL: 2GB
74
77
  WALLTIME: 1:15:00
75
78
  # Days from current day up to which the jobs are fetched from the queue.
76
79
  # Default is None (left empty).
77
80
  STARTTIME_DAYS_SACCT:
81
+ ACCOUNT: dpps
78
82
 
79
83
  [WEBSERVER]
80
84
  # Set the server address and port to transfer the datacheck plots
osa/job.py CHANGED
@@ -342,6 +342,7 @@ def scheduler_env_variables(sequence, scheduler="slurm"):
342
342
 
343
343
  sbatch_parameters.append(f"--partition={cfg.get('SLURM', f'PARTITION_{sequence.type}')}")
344
344
  sbatch_parameters.append(f"--mem-per-cpu={cfg.get('SLURM', f'MEMSIZE_{sequence.type}')}")
345
+ sbatch_parameters.append(f"--account={cfg.get('SLURM', 'ACCOUNT')}")
345
346
 
346
347
  return ["#SBATCH " + line for line in sbatch_parameters]
347
348
 
@@ -652,7 +653,7 @@ def get_squeue_output(squeue_output: StringIO) -> pd.DataFrame:
652
653
  return df
653
654
 
654
655
 
655
- def run_sacct() -> StringIO:
656
+ def run_sacct(job_id: str = None) -> StringIO:
656
657
  """Run sacct to obtain the job information."""
657
658
  if shutil.which("sacct") is None:
658
659
  log.warning("No job info available since sacct command is not available")
@@ -667,13 +668,18 @@ def run_sacct() -> StringIO:
667
668
  "-o",
668
669
  ",".join(FORMAT_SLURM),
669
670
  ]
671
+
672
+ if job_id:
673
+ sacct_cmd.append("--jobs")
674
+ sacct_cmd.append(job_id)
675
+
670
676
  if cfg.get("SLURM", "STARTTIME_DAYS_SACCT"):
671
677
  days = int(cfg.get("SLURM", "STARTTIME_DAYS_SACCT"))
672
678
  start_date = (datetime.date.today() - datetime.timedelta(days=days)).isoformat()
673
679
  sacct_cmd.extend(["--starttime", start_date])
674
680
 
675
681
  return StringIO(sp.check_output(sacct_cmd).decode())
676
-
682
+
677
683
 
678
684
  def get_sacct_output(sacct_output: StringIO) -> pd.DataFrame:
679
685
  """
@@ -808,3 +814,12 @@ def update_sequence_state(sequence, filtered_job_info: pd.DataFrame) -> None:
808
814
  sequence.exit = "0:15"
809
815
  elif any("RUNNING" in job for job in filtered_job_info.State):
810
816
  sequence.state = "RUNNING"
817
+
818
+
819
+ def job_finished_in_timeout(job_id: str) -> bool:
820
+ """Return True if the input job_id finished in TIMEOUT state."""
821
+ job_status = get_sacct_output(run_sacct(job_id=job_id))["State"]
822
+ if job_id and job_status.item() == "TIMEOUT":
823
+ return True
824
+ else:
825
+ return False