lstosa 0.10.17__py3-none-any.whl → 0.10.19__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.
Files changed (41) hide show
  1. {lstosa-0.10.17.dist-info → lstosa-0.10.19.dist-info}/METADATA +4 -4
  2. {lstosa-0.10.17.dist-info → lstosa-0.10.19.dist-info}/RECORD +41 -40
  3. {lstosa-0.10.17.dist-info → lstosa-0.10.19.dist-info}/WHEEL +1 -1
  4. {lstosa-0.10.17.dist-info → lstosa-0.10.19.dist-info}/entry_points.txt +1 -0
  5. osa/_version.py +9 -4
  6. osa/configs/options.py +2 -0
  7. osa/configs/sequencer.cfg +16 -6
  8. osa/conftest.py +127 -3
  9. osa/high_level/significance.py +3 -3
  10. osa/high_level/tests/test_significance.py +3 -0
  11. osa/job.py +48 -25
  12. osa/nightsummary/extract.py +11 -2
  13. osa/nightsummary/tests/test_extract.py +3 -0
  14. osa/paths.py +102 -23
  15. osa/provenance/capture.py +1 -1
  16. osa/provenance/config/definition.yaml +7 -0
  17. osa/provenance/utils.py +22 -7
  18. osa/scripts/autocloser.py +0 -10
  19. osa/scripts/calibration_pipeline.py +13 -8
  20. osa/scripts/closer.py +132 -53
  21. osa/scripts/copy_datacheck.py +5 -3
  22. osa/scripts/datasequence.py +45 -71
  23. osa/scripts/provprocess.py +16 -7
  24. osa/scripts/sequencer.py +34 -26
  25. osa/scripts/sequencer_catB_tailcuts.py +223 -0
  26. osa/scripts/sequencer_webmaker.py +4 -0
  27. osa/scripts/simulate_processing.py +4 -7
  28. osa/scripts/tests/test_osa_scripts.py +76 -27
  29. osa/scripts/update_source_catalog.py +5 -2
  30. osa/tests/test_jobs.py +29 -12
  31. osa/tests/test_paths.py +6 -6
  32. osa/utils/cliopts.py +37 -32
  33. osa/utils/register.py +18 -13
  34. osa/utils/tests/test_utils.py +14 -0
  35. osa/utils/utils.py +173 -56
  36. osa/workflow/dl3.py +1 -2
  37. osa/workflow/stages.py +16 -11
  38. osa/workflow/tests/test_dl3.py +2 -1
  39. osa/workflow/tests/test_stages.py +7 -4
  40. {lstosa-0.10.17.dist-info → lstosa-0.10.19.dist-info}/LICENSE +0 -0
  41. {lstosa-0.10.17.dist-info → lstosa-0.10.19.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lstosa
3
- Version: 0.10.17
3
+ Version: 0.10.19
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>
@@ -13,14 +13,13 @@ Classifier: Intended Audience :: Science/Research
13
13
  Classifier: Topic :: Scientific/Engineering :: Astronomy
14
14
  Classifier: Topic :: Scientific/Engineering :: Physics
15
15
  Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.9
17
16
  Classifier: Programming Language :: Python :: 3.10
18
17
  Classifier: Programming Language :: Python :: 3.11
19
- Requires-Python: >=3.9
18
+ Requires-Python: >=3.10
20
19
  Description-Content-Type: text/markdown
21
20
  License-File: LICENSE
22
21
  Requires-Dist: astropy ~=5.0
23
- Requires-Dist: lstchain >=0.10.7
22
+ Requires-Dist: lstchain >=0.10.15
24
23
  Requires-Dist: matplotlib
25
24
  Requires-Dist: numpy
26
25
  Requires-Dist: pandas
@@ -34,6 +33,7 @@ Requires-Dist: toml
34
33
  Requires-Dist: pymongo
35
34
  Requires-Dist: gammapy ~=1.1
36
35
  Requires-Dist: tenacity
36
+ Requires-Dist: lstcam-calib
37
37
  Provides-Extra: all
38
38
  Requires-Dist: lstosa[dev,doc,test] ; extra == 'all'
39
39
  Provides-Extra: dev
@@ -1,9 +1,9 @@
1
1
  osa/__init__.py,sha256=crotf1NMTfNdZuCua_5T_jk3kvZrAAwVw4FPrfxv994,193
2
- osa/_version.py,sha256=ABKJYUGMPpvTv997h6_suQBPUEllYc0-HCxNxXE2p0M,415
3
- osa/conftest.py,sha256=NBeGqTUBRqCPirDSDPny4bf1e_OJXbiePazHwaoQPY4,20072
4
- osa/job.py,sha256=vl7kBRM8Oe5YK2onUWGtGmHWX0AEktS2sbOuS5fsbgU,27074
2
+ osa/_version.py,sha256=gsDX6Vx41ZfzjkEsqUgSArRLpmFS2PhEyTjZlZ9nXLc,515
3
+ osa/conftest.py,sha256=6H8p9We221Em-z7XM8pwP9LohcVsbCujfJsQWE4vevY,24280
4
+ osa/job.py,sha256=48Wc0wZdfyL2jH8qleVVJ1KtKml0G1i-uHRTD-TMX7Y,27626
5
5
  osa/osadb.py,sha256=pkCuYbEG-moHG0uQHxwB7giQAv2XTld4HJ5gdn1F1hA,2422
6
- osa/paths.py,sha256=R-LwBlyoIJ-PuTJ8vcSYWMwzQY7YrgXq7gan0zhVzPY,14399
6
+ osa/paths.py,sha256=BR3TiZcNhTDM7S00FW-NT8aIGkYhxkOuwbrO6iqPovs,17702
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
@@ -11,73 +11,74 @@ osa/veto.py,sha256=HMaojHSRT0HG0FBGG38su3xz2_ejsVKU1QktAzx28aA,3090
11
11
  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
- osa/configs/options.py,sha256=CyL7WnHiC_pvB3mnjRF7Wg43uPzQgmwlbvIqkRzlDLA,524
15
- osa/configs/sequencer.cfg,sha256=ZHgY1GvIHkdQIg0GtR5iSNXb1C0giDObxL1SH77G1Io,4991
14
+ osa/configs/options.py,sha256=WbsyKhOs1Ud4Yt21O8KcISUvJYmhipa8vl_pxD_TZf4,558
15
+ osa/configs/sequencer.cfg,sha256=LuCfftplgxNCla1P0zP9gbVMw3-LegtYmjqSXioyk8Y,5432
16
16
  osa/high_level/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  osa/high_level/selection_cuts.toml,sha256=ReSmcKtOPZY5JsZ9ExnxYdz7OrJEB8gghCbzHmeOyFg,128
18
- osa/high_level/significance.py,sha256=Y1jokkHCo-D_qSqxKiQzc6KJSmivznaJRS2xY-txNIo,9039
19
- osa/high_level/tests/test_significance.py,sha256=xsiY6rIfwEHnvxzh0_kUfFz4W5ungipzMTY00ENv_uk,510
18
+ osa/high_level/significance.py,sha256=yZS3U6J5TSAbwup58TwJgLh3rDbzroLHNvJWuHplukw,9017
19
+ osa/high_level/tests/test_significance.py,sha256=nTHgwnL2zkQJduJuWXC4J4N8DlAghOidQki7njZmpSI,572
20
20
  osa/nightsummary/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  osa/nightsummary/database.py,sha256=6-1Y0Rw67QQtp0ekoynX9CVpImfECEUO64sA3fw24og,4276
22
- osa/nightsummary/extract.py,sha256=H6v8rKqOIRxo3rjf4u39zJReBMRba55wmAvB3Ssbx98,10965
22
+ osa/nightsummary/extract.py,sha256=vFkRGFpnYnnGTjyfKR5eIfUtK4aoyCiwCtNhob1Xgh8,11493
23
23
  osa/nightsummary/nightsummary.py,sha256=rPEN_J-rJSgsoCR_ONaW4PB9vjJzZvHgw0a7sYOA7wE,2666
24
24
  osa/nightsummary/set_source_coordinates.py,sha256=e2UT_I_Epm8vte22TasIp28A3KRdcl4dgV4NjlIxwak,1579
25
25
  osa/nightsummary/tests/test_database.py,sha256=w5Fts-H0eTi1KPV6Of0V2ZOD849Ie14KRe4wFhc9Hh0,242
26
- osa/nightsummary/tests/test_extract.py,sha256=Wrmfz_1axagqpix8l4k4a3QXKmA1WQf0F0SNujqgNbs,1763
26
+ osa/nightsummary/tests/test_extract.py,sha256=l49ZbDyu6JvPaMeT-KJG9jfNCJj-Ziji0fVKOylMw2I,1825
27
27
  osa/nightsummary/tests/test_nightsummary.py,sha256=0bgGJtlXzwclO2ma9I3X315X0X1bDkjqCaYcp3fay1s,987
28
28
  osa/nightsummary/tests/test_source_coordinates.py,sha256=doyF2e93RnFScPbG79aUmtHLCdGg-5oW8D5qqNDzivw,942
29
29
  osa/provenance/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
- osa/provenance/capture.py,sha256=PFN1SDU1HN4yW5Y7V5PshuS_IdoioktXCpKYWXzjH18,22348
30
+ osa/provenance/capture.py,sha256=WATpVqHU3dIvxD64piqGd8PLlyN8syXn512omVNZrQs,22368
31
31
  osa/provenance/io.py,sha256=8VAVKmE2S3YHcxwDC8PJ4hO6ogfz08EflAeprLGkp3Y,9471
32
- osa/provenance/utils.py,sha256=yohpB1XHMY9iZQGxw8rEVk_yzv77UeYWEit5GgRvUjU,8738
33
- osa/provenance/config/definition.yaml,sha256=DSwqNln1jEXV8aUh7ca2r7ArMkpaMJi1xbHEz0hUcao,20538
32
+ osa/provenance/utils.py,sha256=7coX3-dM5xsJsYI2xXUSwIczBD9XdHZSyt8dcSRDoMM,9312
33
+ osa/provenance/config/definition.yaml,sha256=6USKM92kjLpF8cy0TFl2d1WRjowjOmtCclN4oPL6-sY,20705
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=Z4x4yfDA2Xkr-6ld57L4VjWcVse-sLqkGuE6ZFgSXps,14716
38
- osa/scripts/calibration_pipeline.py,sha256=g9o1chqCRRSo7GNuQZRABjGnJYjZyfhkPgRLPmuV994,5703
39
- osa/scripts/closer.py,sha256=C_80hfkkUnWMGx2YUbK1grFKUSMahpVPN8NIuSOloF0,18821
40
- osa/scripts/copy_datacheck.py,sha256=tfDs6oTdPbii4BOXp6bTHuED0xNJeqaPFrv6Ed7ZnWc,3104
41
- osa/scripts/datasequence.py,sha256=gXAp8arbLPEK-sca9VnME6-2XfUzBFIoEFchlUZYrXI,9260
37
+ osa/scripts/autocloser.py,sha256=_NGhk_ehJUu1BaC-rkGziTgCeb_B8Eb_fqLccOEmznw,14386
38
+ osa/scripts/calibration_pipeline.py,sha256=9bl_EyH-Bjuw-iqSMMujxuK_8kb_EiA8oF1Qk6yt76Y,5884
39
+ osa/scripts/closer.py,sha256=Q9RAGCfnmvCe6bWQFwLKGWHxRBMGwdcOnEMBTEPzzDo,21574
40
+ osa/scripts/copy_datacheck.py,sha256=rAJu5-5oJxspynjYqVWLDKnXTF7Ib9xtzSf3_DiIHsk,3212
41
+ osa/scripts/datasequence.py,sha256=VKeZnA2OTl3PgtiTpYdw4GiB6gpbfWiqLdZSaBCmNyw,8592
42
42
  osa/scripts/gain_selection.py,sha256=h6ylGc8o1iDtKUpidrRJlD2lrL-59auCyBNHX1ytwUg,23236
43
43
  osa/scripts/gainsel_webmaker.py,sha256=40_DX7RUmImX-31iqRTFPEUvdVXXPSKp0xMEJWuAu80,5006
44
- osa/scripts/provprocess.py,sha256=mufkZe6_qwH3DGqTFxINIc01hciF5RMpw3n_Mp7vwXU,18629
44
+ osa/scripts/provprocess.py,sha256=Zv8sHTOgGNuEzu1QPUF142VQbHyfOsrxO073-xA6KG8,19107
45
45
  osa/scripts/reprocess_longterm.py,sha256=wMfc3UVwickkGFiviIhOlB9ebMIqQPWoUrgg8hQ78Lg,2138
46
46
  osa/scripts/reprocessing.py,sha256=A97kqX7QtD7ewoUvFhmSaQVVIfplViGhzTtOenTx37w,3630
47
- osa/scripts/sequencer.py,sha256=f1_CcJg8dukTkesGBzxS0xwgQoNxqQoaDp4WzIZjGmQ,11589
48
- osa/scripts/sequencer_webmaker.py,sha256=gdBYxB85wZIH01ZZKAnlygMiqBEChR1gTHmCGdA08Xo,4792
47
+ osa/scripts/sequencer.py,sha256=zqjj-tczp6EevnTnjdmKrJ_YLMc-esl24b8Tx71UNbk,11685
48
+ osa/scripts/sequencer_catB_tailcuts.py,sha256=yAZvdZQxIlu1irF9yYaogSsfgQc-lazhsBwa3sEIyqw,8950
49
+ osa/scripts/sequencer_webmaker.py,sha256=a9okC-l9UMJHELTLLM2Q933-JELFOhXEbbH1Kbp1E8g,4936
49
50
  osa/scripts/show_run_summary.py,sha256=SoDLVKdQHOJkfenFguBOfXf10Gyv7heXSQAFnDVZqMs,2468
50
- osa/scripts/simulate_processing.py,sha256=NiRVYiwZENt_mnKncytgJT23_-tJMb1B5PswM12nnX4,6941
51
- osa/scripts/update_source_catalog.py,sha256=GHwWFc-y6S4KkUJxUVM5drdAnVDD0-n3D-Tv3CCmh4E,7218
51
+ osa/scripts/simulate_processing.py,sha256=D3b0kjyUS6Lm7pkQNJ-tJzQMveTwoPabfBBW80RMqN0,6828
52
+ osa/scripts/update_source_catalog.py,sha256=ch45tfWBuvcvRqz01hzIBMJuuLArXSN4Hb-Y3Jx18Lk,7427
52
53
  osa/scripts/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
- osa/scripts/tests/test_osa_scripts.py,sha256=POeWVOy3luhF8suC29Jk2mZNiEsECapOe2tfgwYrmco,13911
54
+ osa/scripts/tests/test_osa_scripts.py,sha256=oejLd4ZTcCWGHTyw4Xmxjy2WvsvweSmqLaBAjjxXegU,15067
54
55
  osa/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
- osa/tests/test_jobs.py,sha256=tdgZE21jisCvtlB6oAqXbV4sM1KPMG5tD-Rmcaf5OWo,15488
56
+ osa/tests/test_jobs.py,sha256=ozrMBjHujDhEMzEvJE7WynChqjbBTcORHsHmFXozeWk,16112
56
57
  osa/tests/test_osa.py,sha256=QCOsjUgPuNMHoef3Ym2sDXVjun2LaBrfKyroAIH-os8,415
57
58
  osa/tests/test_osadb.py,sha256=pJHV1dxxblGH2sjS-JPDPTkMn-ew1MzbioCFyg7wbB8,1599
58
- osa/tests/test_paths.py,sha256=sFCxG5uPGLcto76E7X1I26-kRx5faxgHGh9z8LvHz2M,3173
59
+ osa/tests/test_paths.py,sha256=jd3bc2T7bwaY25aCef7w5q-9bUhxKOR327Z4Ch4e7eY,3161
59
60
  osa/tests/test_raw.py,sha256=WkgwEc_vY0D6nREo-BSm6F-5xDpqidMC0DkS86pXlRU,1058
60
61
  osa/tests/test_report.py,sha256=OY-EsrXytoS6esfjUeLnIAmCMIw9EzoGD-elySafyhE,1365
61
62
  osa/tests/test_veto.py,sha256=UIsooji_5Z8TtAhc0UlD2VqheVd9DBufuMxinJ3e0w8,1066
62
63
  osa/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
63
- osa/utils/cliopts.py,sha256=4uBf4gfUDARWzhzlobPERGn6Pv1ONWdpAXOKxh_Dtm4,14533
64
+ osa/utils/cliopts.py,sha256=KdGsezB8iqKxPn6s3K5-P1gxO-PRa_iM4ALl9qQgXcc,14805
64
65
  osa/utils/iofile.py,sha256=kJ7KB1suynhS2cTf7EeHwhMXq3delC_ls2HFpCzvsZo,2021
65
66
  osa/utils/logging.py,sha256=1WcNPjjslo3y25jcEY_fe0yXOeJ6frZrGLAy1GJpu_k,1491
66
67
  osa/utils/mail.py,sha256=uQfqPQdiOVHTvEAXr9H15a7-g9DtYVNKjMEb9GnI0oY,554
67
- osa/utils/register.py,sha256=bQdZeawUSoe1xdaWQ2rp7itZSlzLMuilQiRTywbcdBc,6202
68
- osa/utils/utils.py,sha256=KYNOln6t3J8DzZ31YjmK6TnGhHI9n3doptQTvERrUpI,7341
68
+ osa/utils/register.py,sha256=h6JmCyRdL-6WaTVexq2ibS2rFN3j-bisHb-qZWz6g9s,6373
69
+ osa/utils/utils.py,sha256=97QJ4RXprAQdnAFakDaRBYQKb3LzqGf5exnQKEvoxwo,12974
69
70
  osa/utils/tests/test_iofile.py,sha256=e35_EqJerp-dEOrOqwXEUZCc5P_9llf2QfveltagfIk,399
70
- osa/utils/tests/test_utils.py,sha256=4S4OESdF3wHPOMA5A_B6Zp_O4FZKizL581SmlMUVm2I,1959
71
+ osa/utils/tests/test_utils.py,sha256=ybngpeUyzHgr96Gcx8r2g5oHFTo3aDQIwkC5aE9Ztic,2357
71
72
  osa/webserver/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
72
73
  osa/webserver/utils.py,sha256=ymB2wTzsFkPH4ebUcz_zK_zyolpnBzEbWGYwCvbaHf0,2155
73
74
  osa/workflow/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
74
- osa/workflow/dl3.py,sha256=kz7L5jcKHFJ--UdQ8HQKLzWO6nxc2LLOTz42ExcqzTk,9921
75
- osa/workflow/stages.py,sha256=4UkUajy4Qk-l-1la3LBDpYugK2HQEPmyUnDTBIVW0jE,7082
76
- osa/workflow/tests/test_dl3.py,sha256=aY5bb-8OcZGAXG3JPCZihChzkA_GsWjRIa31BHZn3Dg,299
77
- osa/workflow/tests/test_stages.py,sha256=TmC00XFACWZp740TQeFaokWi3C50ovj_XGiySWrrdZk,3944
78
- lstosa-0.10.17.dist-info/LICENSE,sha256=h6iWot11EtMvaDaS_AvCHKLTNByO5wEbMyNj1c90y1c,1519
79
- lstosa-0.10.17.dist-info/METADATA,sha256=JKqAqWFRR5uoCAMRGiax3RN5Mf8oZjfodbYShHxs2wM,7349
80
- lstosa-0.10.17.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
81
- lstosa-0.10.17.dist-info/entry_points.txt,sha256=qfARj13Vqt3I-E0tXuJwyC79cv84bjCwEj5uK67vWts,981
82
- lstosa-0.10.17.dist-info/top_level.txt,sha256=_Tj8zVHdrOoWZuuWTHbDpNofxW0imUmKdlXhnxsXJek,4
83
- lstosa-0.10.17.dist-info/RECORD,,
75
+ osa/workflow/dl3.py,sha256=ZMXPrdJA0WOxDiHEW9sdM2vmYix8R3eSMTGc6o42yxg,9860
76
+ osa/workflow/stages.py,sha256=ILg91VyNXcy--si7CpDa1UFRiugqIH6nKl10Ru2zZVc,7422
77
+ osa/workflow/tests/test_dl3.py,sha256=81Vt4lNxNjdKi_ehzymqfFWFjncw7GuQcix9S0Yigaw,384
78
+ osa/workflow/tests/test_stages.py,sha256=x8bG02FLNKQI5hbJghxBhrJQDbgSsxpjM3isWHXdKTc,3986
79
+ lstosa-0.10.19.dist-info/LICENSE,sha256=h6iWot11EtMvaDaS_AvCHKLTNByO5wEbMyNj1c90y1c,1519
80
+ lstosa-0.10.19.dist-info/METADATA,sha256=yCR-oxa_FYawyHtxZGvXOTELHs2ewGrJ9j3WxgSxZhM,7329
81
+ lstosa-0.10.19.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
82
+ lstosa-0.10.19.dist-info/entry_points.txt,sha256=CzDKpLjZZQm8jJBxOVpMR8Czpgg_Yh-k6IPETp30VZE,1048
83
+ lstosa-0.10.19.dist-info/top_level.txt,sha256=_Tj8zVHdrOoWZuuWTHbDpNofxW0imUmKdlXhnxsXJek,4
84
+ lstosa-0.10.19.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.3.0)
2
+ Generator: setuptools (75.3.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -11,6 +11,7 @@ provprocess = osa.scripts.provprocess:main
11
11
  reprocess_longterm = osa.scripts.reprocess_longterm:main
12
12
  reprocessing = osa.scripts.reprocessing:main
13
13
  sequencer = osa.scripts.sequencer:main
14
+ sequencer_catB_tailcuts = osa.scripts.sequencer_catB_tailcuts:main
14
15
  sequencer_webmaker = osa.scripts.sequencer_webmaker:main
15
16
  show_run_summary = osa.scripts.show_run_summary:main
16
17
  show_run_summary_tcu = osa.scripts.show_run_summary_tcu:main
osa/_version.py CHANGED
@@ -1,8 +1,13 @@
1
- # file generated by setuptools_scm
1
+ # file generated by setuptools-scm
2
2
  # don't change, don't track in version control
3
+
4
+ __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
5
+
3
6
  TYPE_CHECKING = False
4
7
  if TYPE_CHECKING:
5
- from typing import Tuple, Union
8
+ from typing import Tuple
9
+ from typing import Union
10
+
6
11
  VERSION_TUPLE = Tuple[Union[int, str], ...]
7
12
  else:
8
13
  VERSION_TUPLE = object
@@ -12,5 +17,5 @@ __version__: str
12
17
  __version_tuple__: VERSION_TUPLE
13
18
  version_tuple: VERSION_TUPLE
14
19
 
15
- __version__ = version = '0.10.17'
16
- __version_tuple__ = version_tuple = (0, 10, 17)
20
+ __version__ = version = '0.10.19'
21
+ __version_tuple__ = version_tuple = (0, 10, 19)
osa/configs/options.py CHANGED
@@ -15,6 +15,8 @@ verbose = None
15
15
  warning = None
16
16
  nocheck = None
17
17
  no_dl2 = None
18
+ no_dl1ab = None
19
+ no_gainsel = None
18
20
  prod_id = None
19
21
  dl1_prod_id = None
20
22
  dl2_prod_id = None
osa/configs/sequencer.cfg CHANGED
@@ -14,14 +14,18 @@ DRIVE_DIR: %(MONITORING)s/DrivePositioning
14
14
  RUN_SUMMARY_DIR: %(MONITORING)s/RunSummary
15
15
  RUN_CATALOG: %(MONITORING)s/RunCatalog
16
16
  PEDESTAL_FINDER_DIR: %(BASE)s/auxiliary/PedestalFinder
17
+ TAILCUTS_FINDER_DIR: %(BASE)s/auxiliary/TailCuts
17
18
  ANALYSIS_DIR: %(BASE)s/running_analysis
18
- CALIB_BASE_DIR: %(MONITORING)s/PixelCalibration/Cat-A
19
- CALIB_DIR: %(CALIB_BASE_DIR)s/calibration
20
- PEDESTAL_DIR: %(CALIB_BASE_DIR)s/drs4_baseline
19
+ CALIB_BASE_DIR: %(MONITORING)s/PixelCalibration
20
+ CAT_A_CALIB_BASE: %(CALIB_BASE_DIR)s/Cat-A
21
+ CAT_A_CALIB_DIR: %(CAT_A_CALIB_BASE)s/calibration
22
+ CAT_A_PEDESTAL_DIR: %(CAT_A_CALIB_BASE)s/drs4_baseline
23
+ CAT_B_CALIB_BASE: %(CALIB_BASE_DIR)s/Cat-B
21
24
  DL1_DIR: %(BASE)s/DL1
22
25
  DL1AB_DIR: %(BASE)s/DL1
23
26
  DL2_DIR: %(BASE)s/DL2
24
27
  DL3_DIR: %(BASE)s/DL3
28
+ RF_MODELS: %(BASE)s/models/AllSky
25
29
  OSA_DIR: %(BASE)s/OSA
26
30
  CLOSER_DIR: %(OSA_DIR)s/Closer
27
31
  HIGH_LEVEL_DIR: %(OSA_DIR)s/HighLevel
@@ -41,8 +45,11 @@ DL2_PROD_ID: model2
41
45
 
42
46
  [lstchain]
43
47
  # Calibration steps in calibration pipeline script
44
- drs4_baseline: onsite_create_drs4_pedestal_file
45
- charge_calibration: onsite_create_calibration_file
48
+ #drs4_baseline: onsite_create_drs4_pedestal_file
49
+ #charge_calibration: onsite_create_calibration_file
50
+ drs4_baseline: lstcam_calib_onsite_create_drs4_pedestal_file
51
+ charge_calibration: lstcam_calib_onsite_create_calibration_file
52
+ catB_calibration: onsite_create_cat_B_calibration_file
46
53
  use_ff_heuristic_id: False
47
54
 
48
55
  # Data processing steps in datasequence script
@@ -50,15 +57,18 @@ r0_to_dl1: lstchain_data_r0_to_dl1
50
57
  dl1ab: lstchain_dl1ab
51
58
  check_dl1: lstchain_check_dl1
52
59
  dl1_to_dl2: lstchain_dl1_to_dl2
60
+ tailcuts_finder: lstchain_find_tailcuts
53
61
 
54
62
  # To be set by the user
55
63
  dl1a_config: /software/lstchain/data/lstchain_standard_config.json
56
64
  store_image_dl1ab: True
57
65
  merge_dl1_datacheck: True
66
+ apply_catB_calibration: False
67
+ apply_standard_dl1b_config: False
58
68
  use_ff_heuristic_gain_selection: False
59
69
  dl1b_config: /software/lstchain/data/lstchain_standard_config.json
60
70
  dl2_config: /software/lstchain/data/lstchain_standard_config.json
61
- rf_models: /data/models/prod5/zenith_20deg/20201023_v0.6.3
71
+ mc_prod: 20240918_v0.10.12_allsky_
62
72
  dl3_config: /software/lstchain/data/dl3_std_config.json
63
73
  max_tries: 3
64
74
 
osa/conftest.py CHANGED
@@ -31,8 +31,8 @@ import lstchain
31
31
  date = datetime.fromisoformat("2020-01-17")
32
32
  nightdir = date_to_dir(date)
33
33
  prod_id = "v0.1.0"
34
- dl1_prod_id = cfg.get("LST1", "DL1_PROD_ID")
35
- dl2_prod_id = cfg.get("LST1", "DL2_PROD_ID")
34
+ dl1_prod_id = "tailcut84"
35
+ dl2_prod_id = "tailcut84/nsb_tuning_0.14"
36
36
 
37
37
 
38
38
  @pytest.fixture(scope="session")
@@ -412,6 +412,9 @@ def sequence_list(
412
412
  r0_data,
413
413
  pedestal_ids_file,
414
414
  merged_run_summary,
415
+ dl1b_config_files,
416
+ tailcuts_log_files,
417
+ rf_models,
415
418
  ):
416
419
  """Creates a sequence list from a run summary file."""
417
420
  options.directory = running_analysis_dir
@@ -574,10 +577,131 @@ def database(osa_dir):
574
577
 
575
578
 
576
579
  @pytest.fixture(scope="session")
577
- def gain_selection_flag_file(osa_dir):
580
+ def rf_models_allsky_basedir(base_test_dir):
581
+ directory = base_test_dir / "models/AllSky"
582
+ directory.mkdir(parents=True, exist_ok=True)
583
+ return directory
584
+
585
+
586
+ @pytest.fixture(scope="session")
587
+ def rf_model_path(rf_models_allsky_basedir):
588
+ mc_prod = "20240131_allsky_v0.10.5_all_dec_base"
589
+ declination_str = "dec_2276"
590
+ rf_model_path = rf_models_allsky_basedir / mc_prod / declination_str
591
+ rf_model_path.mkdir(parents=True, exist_ok=True)
592
+ return rf_model_path
578
593
 
594
+
595
+ @pytest.fixture(scope="session")
596
+ def gain_selection_flag_file(osa_dir):
579
597
  GainSel_dir = osa_dir / "GainSel" / "20200117"
580
598
  GainSel_dir.mkdir(parents=True, exist_ok=True)
581
599
  file = GainSel_dir / "GainSelFinished.txt"
582
600
  file.touch()
583
601
  return file
602
+
603
+
604
+ @pytest.fixture(scope="session")
605
+ def catB_closed_file(running_analysis_dir):
606
+
607
+ catB_closed_file = running_analysis_dir / "catB_00003.closed"
608
+ catB_closed_file.touch()
609
+ return catB_closed_file
610
+
611
+
612
+ @pytest.fixture(scope="session")
613
+ def catB_calib_base_dir(monitoring_dir):
614
+
615
+ catB_calib_base_dir = monitoring_dir / "PixelCalibration" / "Cat-B"
616
+ catB_calib_base_dir.mkdir(parents=True, exist_ok=True)
617
+ return catB_calib_base_dir
618
+
619
+
620
+ @pytest.fixture(scope="session")
621
+ def catB_calibration_file(catB_calib_dir):
622
+
623
+ catB_calib_dir = catB_calib_base_dir / "calibration" / nightdir / prod_id
624
+ catB_calib_file = catB_calib_dir / "cat_B_calibration_filters_52.Run00003.h5"
625
+ catB_calib_file.touch()
626
+ return catB_calib_file
627
+
628
+
629
+ @pytest.fixture(scope="session")
630
+ def tailcuts_finder_dir(base_test_dir):
631
+ tailcuts_finder_dir = base_test_dir / "auxiliary" / "TailCuts"
632
+ tailcuts_finder_dir.mkdir(parents=True, exist_ok=True)
633
+ return tailcuts_finder_dir
634
+
635
+
636
+ @pytest.fixture(scope="session")
637
+ def dl1b_config_files(tailcuts_finder_dir):
638
+ config_information = dedent(
639
+ """\
640
+ {
641
+ "tailcuts_clean_with_pedestal_threshold": {
642
+ "picture_thresh": 8,
643
+ "boundary_thresh": 4,
644
+ "sigma": 2.5,
645
+ "keep_isolated_pixels": false,
646
+ "min_number_picture_neighbors": 2,
647
+ "use_only_main_island": false,
648
+ "delta_time": 2
649
+ },
650
+ "dynamic_cleaning": {
651
+ "apply": true,
652
+ "threshold": 267,
653
+ "fraction_cleaning_intensity": 0.03
654
+ }
655
+ }"""
656
+ )
657
+ config_file1 = tailcuts_finder_dir / "dl1ab_Run01807.json"
658
+ config_file1.touch()
659
+ config_file1.write_text(config_information)
660
+ config_file2 = tailcuts_finder_dir / "dl1ab_Run01808.json"
661
+ config_file2.touch()
662
+ config_file2.write_text(config_information)
663
+ config_file3 = tailcuts_finder_dir / "dl1ab_Run04185.json"
664
+ config_file3.touch()
665
+ config_file3.write_text(config_information)
666
+ return config_file1, config_file2, config_file3
667
+
668
+
669
+ @pytest.fixture(scope="session")
670
+ def tailcuts_log_files(tailcuts_finder_dir):
671
+ log_information = dedent(
672
+ """\
673
+ Median of 95% quantile of pedestal charge: 5.416 p.e.
674
+
675
+ Additional NSB rate (over dark MC): 0.2221 p.e./ns
676
+ lstchain_find_tailcuts finished successfully!
677
+ """
678
+ )
679
+ log_file1 = tailcuts_finder_dir / "log_find_tailcuts_Run01807.log"
680
+ log_file1.touch()
681
+ log_file1.write_text(log_information)
682
+ log_file2 = tailcuts_finder_dir / "log_find_tailcuts_Run01808.log"
683
+ log_file2.touch()
684
+ log_file2.write_text(log_information)
685
+ log_file3 = tailcuts_finder_dir / "log_find_tailcuts_Run04185.log"
686
+ log_file3.touch()
687
+ log_file3.write_text(log_information)
688
+ return log_file1, log_file2, log_file3
689
+
690
+
691
+ @pytest.fixture(scope="session")
692
+ def rf_models_base_dir(base_test_dir):
693
+ directory = base_test_dir / "models/AllSky"
694
+ directory.mkdir(parents=True, exist_ok=True)
695
+ return directory
696
+
697
+
698
+ @pytest.fixture(scope="session")
699
+ def rf_models(rf_models_base_dir):
700
+ rf_models_prefix = cfg.get("lstchain", "mc_prod")
701
+ rf_models_path1 = rf_models_base_dir / f"{rf_models_prefix}nsb_tuning_0.00"
702
+ rf_models_path1.mkdir(parents=True, exist_ok=True)
703
+ rf_models_path2 = rf_models_base_dir / f"{rf_models_prefix}nsb_tuning_0.14/dec_2276"
704
+ rf_models_path2.mkdir(parents=True, exist_ok=True)
705
+ rf_models_path3 = rf_models_base_dir / f"{rf_models_prefix}nsb_tuning_0.14/dec_4822"
706
+ rf_models_path3.mkdir(parents=True, exist_ok=True)
707
+ return rf_models_path1, rf_models_path2, rf_models_path3
@@ -26,7 +26,8 @@ from osa.configs import options
26
26
  from osa.configs.config import cfg
27
27
  from osa.nightsummary.extract import get_source_list
28
28
  from osa.paths import DEFAULT_CFG, destination_dir, analysis_path
29
- from osa.utils.cliopts import get_prod_id, get_dl2_prod_id
29
+ from osa.utils.cliopts import get_prod_id
30
+ from osa.paths import get_dl2_prod_id
30
31
  from osa.utils.logging import myLogger
31
32
  from osa.utils.utils import date_to_dir, YESTERDAY
32
33
 
@@ -209,7 +210,6 @@ def main(
209
210
  flat_date = date_to_dir(date)
210
211
  options.tel_id = telescope
211
212
  options.prod_id = get_prod_id()
212
- options.dl2_prod_id = get_dl2_prod_id()
213
213
  options.directory = analysis_path(options.tel_id)
214
214
  dl2_directory = Path(cfg.get("LST1", "DL2_DIR"))
215
215
  highlevel_directory = destination_dir("HIGH_LEVEL", create_dir=True)
@@ -232,7 +232,7 @@ def main(
232
232
  dl2_directory
233
233
  / flat_date
234
234
  / options.prod_id
235
- / options.dl2_prod_id
235
+ / get_dl2_prod_id(run)
236
236
  / f"dl2_LST-1.Run{run:05d}.h5"
237
237
  )
238
238
  df = pd.concat([df, pd.read_hdf(input_file, key=dl2_params_lstcam_key)])
@@ -10,6 +10,9 @@ def test_significance(
10
10
  systematic_correction_files,
11
11
  pedestal_ids_file,
12
12
  merged_run_summary,
13
+ dl1b_config_files,
14
+ tailcuts_log_files,
15
+ rf_models,
13
16
  ):
14
17
  output = sp.run(
15
18
  ["theta2_significance", "-d", "2020-01-17", "-s", "LST1"],
osa/job.py CHANGED
@@ -5,6 +5,7 @@ import logging
5
5
  import shutil
6
6
  import subprocess as sp
7
7
  import time
8
+ import re
8
9
  from io import StringIO
9
10
  from pathlib import Path
10
11
  from textwrap import dedent
@@ -20,10 +21,16 @@ from osa.paths import (
20
21
  get_drive_file,
21
22
  get_summary_file,
22
23
  get_pedestal_ids_file,
24
+ get_dl1_prod_id_and_config,
23
25
  )
24
26
  from osa.utils.iofile import write_to_file
25
27
  from osa.utils.logging import myLogger
26
- from osa.utils.utils import date_to_dir, time_to_seconds, stringify, date_to_iso
28
+ from osa.utils.utils import (
29
+ date_to_dir,
30
+ time_to_seconds,
31
+ stringify,
32
+ date_to_iso,
33
+ )
27
34
 
28
35
  log = myLogger(logging.getLogger(__name__))
29
36
 
@@ -92,7 +99,15 @@ def are_all_jobs_correctly_finished(sequence_list):
92
99
  flag = True
93
100
  analysis_directory = Path(options.directory)
94
101
  for sequence in sequence_list:
95
- history_files_list = analysis_directory.rglob(f"*{sequence.seq}*.history")
102
+ history_files_list = analysis_directory.rglob(f"*{sequence.run}*.history")
103
+
104
+ if not options.test:
105
+ try:
106
+ next(history_files_list)
107
+ except StopIteration:
108
+ log.debug("No history files found.")
109
+ flag = False
110
+
96
111
  for history_file in history_files_list:
97
112
  # TODO: s.history should be SubRunObj attribute not RunObj
98
113
  # s.history only working for CALIBRATION sequence (run-wise), since it is
@@ -103,10 +118,11 @@ def are_all_jobs_correctly_finished(sequence_list):
103
118
  if out == 0:
104
119
  log.debug(f"Job {sequence.seq} ({sequence.type}) correctly finished")
105
120
  continue
106
- if out == 1 and options.no_dl2:
121
+
122
+ if out == 2 and options.no_dl1ab:
107
123
  log.debug(
108
124
  f"Job {sequence.seq} ({sequence.type}) correctly "
109
- f"finished up to DL1ab, but --no-dl2 option selected"
125
+ f"finished up to DL1A, but --no-dl1ab option selected"
110
126
  )
111
127
  continue
112
128
 
@@ -166,10 +182,9 @@ def historylevel(history_file: Path, data_type: str):
166
182
  - Sequence completed when reaching level 0
167
183
 
168
184
  Workflow for DATA sequences:
169
- - R0->DL1, level 4->3
170
- - DL1->DL1AB, level 3->2
171
- - DATACHECK, level 2->1
172
- - DL1->DL2, level 1->0
185
+ - R0->DL1, level 3->2
186
+ - DL1->DL1AB, level 2->1
187
+ - DATACHECK, level 1->0
173
188
  - Sequence completed when reaching level 0
174
189
 
175
190
  Parameters
@@ -188,7 +203,7 @@ def historylevel(history_file: Path, data_type: str):
188
203
  # into account not only the last history line but also the others.
189
204
 
190
205
  if data_type == "DATA":
191
- level = 4
206
+ level = 3
192
207
  elif data_type == "PEDCALIB":
193
208
  level = 2
194
209
  else:
@@ -197,6 +212,11 @@ def historylevel(history_file: Path, data_type: str):
197
212
  exit_status = 0
198
213
 
199
214
  if history_file.exists():
215
+ if data_type == "DATA":
216
+ match = re.search(r"sequence_LST1_(\d+)\.\d+", str(history_file))
217
+ elif data_type == "PEDCALIB":
218
+ match = re.search(r"sequence_LST1_(\d+)\.history", str(history_file))
219
+ run_id = int(match.group(1))
200
220
  for line in history_file.read_text().splitlines():
201
221
  words = line.split()
202
222
  try:
@@ -214,24 +234,18 @@ def historylevel(history_file: Path, data_type: str):
214
234
  level = 0 if exit_status == 0 else 1
215
235
  # Data sequence
216
236
  elif program == cfg.get("lstchain", "r0_to_dl1"):
217
- level = 3 if exit_status == 0 else 4
237
+ level = 2 if exit_status == 0 else 3
218
238
  elif program == cfg.get("lstchain", "dl1ab"):
219
- if (exit_status == 0) and (prod_id == options.dl1_prod_id):
220
- log.debug(f"DL1ab prod ID: {options.dl1_prod_id} already produced")
221
- level = 2
239
+ dl1_prod_id = get_dl1_prod_id_and_config(run_id)[0]
240
+ if (exit_status == 0) and (prod_id == dl1_prod_id):
241
+ log.debug(f"DL1ab prod ID: {dl1_prod_id} already produced")
242
+ level = 1
222
243
  else:
223
- level = 3
224
- log.debug(f"DL1ab prod ID: {options.dl1_prod_id} not produced yet")
244
+ level = 2
245
+ log.debug(f"DL1ab prod ID: {dl1_prod_id} not produced yet")
225
246
  break
226
247
  elif program == cfg.get("lstchain", "check_dl1"):
227
- level = 1 if exit_status == 0 else 2
228
- elif program == cfg.get("lstchain", "dl1_to_dl2"):
229
- if (exit_status == 0) and (prod_id == options.dl2_prod_id):
230
- log.debug(f"DL2 prod ID: {options.dl2_prod_id} already produced")
231
- level = 0
232
- else:
233
- level = 1
234
- log.debug(f"DL2 prod ID: {options.dl2_prod_id} not produced yet")
248
+ level = 0 if exit_status == 0 else 1
235
249
 
236
250
  else:
237
251
  log.warning(f"Program name not identified: {program}")
@@ -423,8 +437,8 @@ def data_sequence_job_template(sequence):
423
437
  commandargs.append("-s")
424
438
  if options.configfile:
425
439
  commandargs.extend(("--config", f"{Path(options.configfile).resolve()}"))
426
- if sequence.type == "DATA" and options.no_dl2:
427
- commandargs.append("--no-dl2")
440
+ if sequence.type == "DATA" and options.no_dl1ab:
441
+ commandargs.append("--no-dl1ab")
428
442
 
429
443
  commandargs.extend(
430
444
  (
@@ -439,6 +453,14 @@ def data_sequence_job_template(sequence):
439
453
  )
440
454
  )
441
455
 
456
+ if not options.no_dl1ab:
457
+ dl1_prod_id, dl1b_config = get_dl1_prod_id_and_config(sequence.run)
458
+ sequence.dl1_prod_id = dl1_prod_id
459
+ sequence.dl1b_config = dl1b_config
460
+
461
+ commandargs.append(f"--dl1b-config={sequence.dl1b_config}")
462
+ commandargs.append(f"--dl1-prod-id={sequence.dl1_prod_id}")
463
+
442
464
  content = job_header + "\n" + PYTHON_IMPORTS
443
465
 
444
466
  if not options.test:
@@ -727,6 +749,7 @@ def get_closer_sacct_output(sacct_output) -> pd.DataFrame:
727
749
  | (sacct_output["JobName"].str.contains("lstchain_longterm_dl1_check"))
728
750
  | (sacct_output["JobName"].str.contains("lstchain_cherenkov_transparency"))
729
751
  | (sacct_output["JobName"].str.contains("provproces"))
752
+ | (sacct_output["JobName"].str.contains("lstchain_dl1_to_dl2"))
730
753
  ]
731
754
 
732
755
  try:
@@ -23,9 +23,9 @@ from osa.configs.datamodel import Sequence
23
23
  from osa.job import sequence_filenames
24
24
  from osa.nightsummary import database
25
25
  from osa.nightsummary.nightsummary import run_summary_table
26
- from osa.paths import sequence_calibration_files, get_run_date
26
+ from osa.paths import sequence_calibration_files, get_run_date, get_dl1_prod_id_and_config, get_dl2_prod_id
27
27
  from osa.utils.logging import myLogger
28
- from osa.utils.utils import date_to_iso, date_to_dir
28
+ from osa.utils.utils import date_to_iso, date_to_dir, get_RF_model
29
29
 
30
30
  log = myLogger(logging.getLogger(__name__))
31
31
 
@@ -263,6 +263,15 @@ def extract_sequences(date: datetime, run_obj_list: List[RunObj]) -> List[Sequen
263
263
  f"Data sequence {sequence.seq} from run {run.run} whose parent is "
264
264
  f"{sequence.parent} (DRS4 {required_drs4_run} & Ped-Cal {required_pedcal_run})"
265
265
  )
266
+ if not options.no_dl1ab and sequence.type=="DATA":
267
+ dl1_prod_id, dl1b_config = get_dl1_prod_id_and_config(sequence.run)
268
+ sequence.dl1_prod_id = dl1_prod_id
269
+ sequence.dl1b_config = dl1b_config
270
+
271
+ if not options.no_dl2 and not options.no_dl1ab and sequence.type=="DATA":
272
+ sequence.dl2_prod_id = get_dl2_prod_id(sequence.run)
273
+ sequence.rf_model = get_RF_model(sequence.run)
274
+
266
275
  sequence_list.append(sequence)
267
276
 
268
277
  # Add the calibration file names
@@ -11,6 +11,9 @@ def test_source_list(
11
11
  systematic_correction_files,
12
12
  pedestal_ids_file,
13
13
  merged_run_summary,
14
+ dl1b_config_files,
15
+ tailcuts_log_files,
16
+ rf_models,
14
17
  ):
15
18
  """Test that the list of name of sources is correct."""
16
19
  from osa.nightsummary.extract import get_source_list