lstosa 0.10.17__tar.gz → 0.10.19__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 (133) hide show
  1. {lstosa-0.10.17 → lstosa-0.10.19}/PKG-INFO +4 -4
  2. {lstosa-0.10.17 → lstosa-0.10.19}/environment.yml +4 -3
  3. lstosa-0.10.19/extra/history_files/sequence_LST1_04183.history +2 -0
  4. lstosa-0.10.19/extra/history_files/sequence_LST1_04185.0001.history +3 -0
  5. {lstosa-0.10.17 → lstosa-0.10.19}/extra/history_files/sequence_LST1_04185.0010.history +1 -1
  6. {lstosa-0.10.17 → lstosa-0.10.19}/pyproject.toml +4 -3
  7. {lstosa-0.10.17 → lstosa-0.10.19}/src/lstosa.egg-info/PKG-INFO +4 -4
  8. {lstosa-0.10.17 → lstosa-0.10.19}/src/lstosa.egg-info/SOURCES.txt +2 -0
  9. {lstosa-0.10.17 → lstosa-0.10.19}/src/lstosa.egg-info/entry_points.txt +1 -0
  10. {lstosa-0.10.17 → lstosa-0.10.19}/src/lstosa.egg-info/requires.txt +2 -1
  11. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/_version.py +9 -4
  12. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/configs/options.py +2 -0
  13. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/configs/sequencer.cfg +16 -6
  14. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/conftest.py +127 -3
  15. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/high_level/significance.py +3 -3
  16. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/high_level/tests/test_significance.py +3 -0
  17. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/job.py +48 -25
  18. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/nightsummary/extract.py +11 -2
  19. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/nightsummary/tests/test_extract.py +3 -0
  20. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/paths.py +102 -23
  21. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/provenance/capture.py +1 -1
  22. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/provenance/config/definition.yaml +7 -0
  23. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/provenance/utils.py +22 -7
  24. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/scripts/autocloser.py +0 -10
  25. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/scripts/calibration_pipeline.py +13 -8
  26. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/scripts/closer.py +132 -53
  27. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/scripts/copy_datacheck.py +5 -3
  28. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/scripts/datasequence.py +45 -71
  29. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/scripts/provprocess.py +16 -7
  30. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/scripts/sequencer.py +34 -26
  31. lstosa-0.10.19/src/osa/scripts/sequencer_catB_tailcuts.py +223 -0
  32. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/scripts/sequencer_webmaker.py +4 -0
  33. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/scripts/simulate_processing.py +4 -7
  34. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/scripts/tests/test_osa_scripts.py +76 -27
  35. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/scripts/update_source_catalog.py +5 -2
  36. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/tests/test_jobs.py +29 -12
  37. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/tests/test_paths.py +6 -6
  38. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/utils/cliopts.py +37 -32
  39. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/utils/register.py +18 -13
  40. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/utils/tests/test_utils.py +14 -0
  41. lstosa-0.10.19/src/osa/utils/utils.py +404 -0
  42. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/workflow/dl3.py +1 -2
  43. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/workflow/stages.py +16 -11
  44. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/workflow/tests/test_dl3.py +2 -1
  45. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/workflow/tests/test_stages.py +7 -4
  46. lstosa-0.10.17/extra/history_files/sequence_LST1_04183.history +0 -2
  47. lstosa-0.10.17/src/osa/utils/utils.py +0 -287
  48. {lstosa-0.10.17 → lstosa-0.10.19}/.coveragerc +0 -0
  49. {lstosa-0.10.17 → lstosa-0.10.19}/.gitignore +0 -0
  50. {lstosa-0.10.17 → lstosa-0.10.19}/.mailmap +0 -0
  51. {lstosa-0.10.17 → lstosa-0.10.19}/.pre-commit-config.yaml +0 -0
  52. {lstosa-0.10.17 → lstosa-0.10.19}/.readthedocs.yml +0 -0
  53. {lstosa-0.10.17 → lstosa-0.10.19}/LICENSE +0 -0
  54. {lstosa-0.10.17 → lstosa-0.10.19}/MANIFEST.in +0 -0
  55. {lstosa-0.10.17 → lstosa-0.10.19}/README.md +0 -0
  56. {lstosa-0.10.17 → lstosa-0.10.19}/codemeta.json +0 -0
  57. {lstosa-0.10.17 → lstosa-0.10.19}/crontab/crontab.txt +0 -0
  58. {lstosa-0.10.17 → lstosa-0.10.19}/dev/mysql.py +0 -0
  59. {lstosa-0.10.17 → lstosa-0.10.19}/docs/Makefile +0 -0
  60. {lstosa-0.10.17 → lstosa-0.10.19}/docs/_static/logo_lstosa.png +0 -0
  61. {lstosa-0.10.17 → lstosa-0.10.19}/docs/authors.rst +0 -0
  62. {lstosa-0.10.17 → lstosa-0.10.19}/docs/components/index.rst +0 -0
  63. {lstosa-0.10.17 → lstosa-0.10.19}/docs/conf.py +0 -0
  64. {lstosa-0.10.17 → lstosa-0.10.19}/docs/configuration.rst +0 -0
  65. {lstosa-0.10.17 → lstosa-0.10.19}/docs/contribute.rst +0 -0
  66. {lstosa-0.10.17 → lstosa-0.10.19}/docs/documents/index.rst +0 -0
  67. {lstosa-0.10.17 → lstosa-0.10.19}/docs/howto/index.rst +0 -0
  68. {lstosa-0.10.17 → lstosa-0.10.19}/docs/index.rst +0 -0
  69. {lstosa-0.10.17 → lstosa-0.10.19}/docs/introduction/index.rst +0 -0
  70. {lstosa-0.10.17 → lstosa-0.10.19}/docs/introduction/reduction_steps_lstchain.png +0 -0
  71. {lstosa-0.10.17 → lstosa-0.10.19}/docs/jobs.rst +0 -0
  72. {lstosa-0.10.17 → lstosa-0.10.19}/docs/make.bat +0 -0
  73. {lstosa-0.10.17 → lstosa-0.10.19}/docs/nightsummary.rst +0 -0
  74. {lstosa-0.10.17 → lstosa-0.10.19}/docs/provenance.rst +0 -0
  75. {lstosa-0.10.17 → lstosa-0.10.19}/docs/references.rst +0 -0
  76. {lstosa-0.10.17 → lstosa-0.10.19}/docs/reports.rst +0 -0
  77. {lstosa-0.10.17 → lstosa-0.10.19}/docs/scripts/index.rst +0 -0
  78. {lstosa-0.10.17 → lstosa-0.10.19}/docs/troubleshooting/index.rst +0 -0
  79. {lstosa-0.10.17 → lstosa-0.10.19}/docs/utils.rst +0 -0
  80. {lstosa-0.10.17 → lstosa-0.10.19}/docs/veto.rst +0 -0
  81. {lstosa-0.10.17 → lstosa-0.10.19}/docs/workflow/LSTOSA_flow.png +0 -0
  82. {lstosa-0.10.17 → lstosa-0.10.19}/docs/workflow/index.rst +0 -0
  83. {lstosa-0.10.17 → lstosa-0.10.19}/extra/example_sequencer.txt +0 -0
  84. {lstosa-0.10.17 → lstosa-0.10.19}/extra/history_files/sequence_LST1_04183_failed.history +0 -0
  85. {lstosa-0.10.17 → lstosa-0.10.19}/extra/history_files/sequence_LST1_04183_oneline.history +0 -0
  86. {lstosa-0.10.17 → lstosa-0.10.19}/extra/sacct_output.csv +0 -0
  87. {lstosa-0.10.17 → lstosa-0.10.19}/extra/squeue_output.csv +0 -0
  88. {lstosa-0.10.17 → lstosa-0.10.19}/setup.cfg +0 -0
  89. {lstosa-0.10.17 → lstosa-0.10.19}/src/lstosa.egg-info/dependency_links.txt +0 -0
  90. {lstosa-0.10.17 → lstosa-0.10.19}/src/lstosa.egg-info/top_level.txt +0 -0
  91. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/__init__.py +0 -0
  92. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/configs/__init__.py +0 -0
  93. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/configs/config.py +0 -0
  94. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/configs/datamodel.py +0 -0
  95. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/high_level/__init__.py +0 -0
  96. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/high_level/selection_cuts.toml +0 -0
  97. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/nightsummary/__init__.py +0 -0
  98. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/nightsummary/database.py +0 -0
  99. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/nightsummary/nightsummary.py +0 -0
  100. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/nightsummary/set_source_coordinates.py +0 -0
  101. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/nightsummary/tests/test_database.py +0 -0
  102. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/nightsummary/tests/test_nightsummary.py +0 -0
  103. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/nightsummary/tests/test_source_coordinates.py +0 -0
  104. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/osadb.py +0 -0
  105. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/provenance/__init__.py +0 -0
  106. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/provenance/config/environment.yaml +0 -0
  107. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/provenance/config/logger.yaml +0 -0
  108. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/provenance/io.py +0 -0
  109. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/raw.py +0 -0
  110. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/report.py +0 -0
  111. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/scripts/__init__.py +0 -0
  112. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/scripts/gain_selection.py +0 -0
  113. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/scripts/gainsel_webmaker.py +0 -0
  114. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/scripts/reprocess_longterm.py +0 -0
  115. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/scripts/reprocessing.py +0 -0
  116. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/scripts/show_run_summary.py +0 -0
  117. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/scripts/tests/__init__.py +0 -0
  118. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/tests/__init__.py +0 -0
  119. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/tests/test_osa.py +0 -0
  120. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/tests/test_osadb.py +0 -0
  121. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/tests/test_raw.py +0 -0
  122. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/tests/test_report.py +0 -0
  123. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/tests/test_veto.py +0 -0
  124. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/utils/__init__.py +0 -0
  125. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/utils/iofile.py +0 -0
  126. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/utils/logging.py +0 -0
  127. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/utils/mail.py +0 -0
  128. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/utils/tests/test_iofile.py +0 -0
  129. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/version.py +0 -0
  130. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/veto.py +0 -0
  131. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/webserver/__init__.py +0 -0
  132. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/webserver/utils.py +0 -0
  133. {lstosa-0.10.17 → lstosa-0.10.19}/src/osa/workflow/__init__.py +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: test
38
38
  Requires-Dist: pytest; extra == "test"
39
39
  Requires-Dist: pytest-cov; extra == "test"
@@ -21,12 +21,13 @@ dependencies:
21
21
  - click
22
22
  - pymongo
23
23
  - scikit-learn=1.2
24
- - protobuf=3.20
25
- - ctapipe_io_lst=0.22
24
+ - ctapipe_io_lst >=0.25.1,<0.26a0
26
25
  - ctaplot~=0.6.4
27
26
  - pyirf~=0.10
28
- - lstchain>=0.10.7
27
+ - lstchain>=0.10.15
29
28
  - tenacity
29
+ - pip:
30
+ - lstcam_calib
30
31
  # dev dependencies
31
32
  - pytest
32
33
  - pytest-cov
@@ -0,0 +1,2 @@
1
+ 04179 lstcam_calib_onsite_create_drs4_pedestal_file v0.7.0 2021-12-19 22:11 None None 0
2
+ 04183 lstcam_calib_onsite_create_calibration_file v0.7.0 2021-12-19 22:11 None None 0
@@ -0,0 +1,3 @@
1
+ 04185.0001 lstchain_data_r0_to_dl1 v0.7.0 Thu Mar 25 12:53:40 UTC 2021 calibration.Run04183.0000.hdf5 drs4_pedestal.Run04179.0000.fits 0
2
+ 04185.0001 lstchain_dl1ab tailcut105 Thu Mar 25 13:06:09 UTC 2021 dl1_LST-1.Run04185.0001.h5 lstchain_standard_config_tailcut84.json 0
3
+ 04185.0001 lstchain_check_dl1 tailcut105 Thu Mar 25 13:07:02 UTC 2021 dl1_LST-1.Run04185.0001.h5 None 0
@@ -1,4 +1,4 @@
1
1
  04185.0010 lstchain_data_r0_to_dl1 v0.7.0 Thu Mar 25 12:53:40 UTC 2021 calibration.Run04183.0000.hdf5 drs4_pedestal.Run04179.0000.fits 0
2
2
  04185.0010 lstchain_dl1ab tailcut84 Thu Mar 25 13:06:09 UTC 2021 dl1_LST-1.Run04185.0010.h5 lstchain_standard_config_tailcut84.json 0
3
3
  04185.0010 lstchain_check_dl1 tailcut84 Thu Mar 25 13:07:02 UTC 2021 dl1_LST-1.Run04185.0010.h5 None 0
4
- 04185.0010 lstchain_dl1_to_dl2 model1 Thu Mar 25 13:07:02 UTC 2021 dl1_LST-1.Run04185.0010.h5 None 0
4
+ 04185.0010 lstchain_dl1_to_dl2 tailcut84/nsb_tuning_0.14 Thu Mar 25 13:07:02 UTC 2021 dl1_LST-1.Run04185.0010.h5 None 0
@@ -26,15 +26,14 @@ classifiers = [
26
26
  "Topic :: Scientific/Engineering :: Astronomy",
27
27
  "Topic :: Scientific/Engineering :: Physics",
28
28
  "Programming Language :: Python :: 3",
29
- "Programming Language :: Python :: 3.9",
30
29
  "Programming Language :: Python :: 3.10",
31
30
  "Programming Language :: Python :: 3.11",
32
31
  ]
33
32
 
34
- requires-python = ">=3.9"
33
+ requires-python = ">=3.10"
35
34
  dependencies = [
36
35
  "astropy~=5.0",
37
- "lstchain>=0.10.7",
36
+ "lstchain>=0.10.15",
38
37
  "matplotlib",
39
38
  "numpy",
40
39
  "pandas",
@@ -48,6 +47,7 @@ dependencies = [
48
47
  "pymongo",
49
48
  "gammapy~=1.1",
50
49
  "tenacity",
50
+ "lstcam_calib",
51
51
  ]
52
52
 
53
53
  dynamic = ["version"]
@@ -76,6 +76,7 @@ reprocess_longterm = "osa.scripts.reprocess_longterm:main"
76
76
  gain_selection = "osa.scripts.gain_selection:main"
77
77
  update_source_catalog = "osa.scripts.update_source_catalog:main"
78
78
  gainsel_webmaker = "osa.scripts.gainsel_webmaker:main"
79
+ sequencer_catB_tailcuts = "osa.scripts.sequencer_catB_tailcuts:main"
79
80
 
80
81
  [tool.setuptools.packages.find]
81
82
  where = ["src"]
@@ -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: test
38
38
  Requires-Dist: pytest; extra == "test"
39
39
  Requires-Dist: pytest-cov; extra == "test"
@@ -41,6 +41,7 @@ extra/squeue_output.csv
41
41
  extra/history_files/sequence_LST1_04183.history
42
42
  extra/history_files/sequence_LST1_04183_failed.history
43
43
  extra/history_files/sequence_LST1_04183_oneline.history
44
+ extra/history_files/sequence_LST1_04185.0001.history
44
45
  extra/history_files/sequence_LST1_04185.0010.history
45
46
  src/lstosa.egg-info/PKG-INFO
46
47
  src/lstosa.egg-info/SOURCES.txt
@@ -95,6 +96,7 @@ src/osa/scripts/provprocess.py
95
96
  src/osa/scripts/reprocess_longterm.py
96
97
  src/osa/scripts/reprocessing.py
97
98
  src/osa/scripts/sequencer.py
99
+ src/osa/scripts/sequencer_catB_tailcuts.py
98
100
  src/osa/scripts/sequencer_webmaker.py
99
101
  src/osa/scripts/show_run_summary.py
100
102
  src/osa/scripts/simulate_processing.py
@@ -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
@@ -1,5 +1,5 @@
1
1
  astropy~=5.0
2
- lstchain>=0.10.7
2
+ lstchain>=0.10.15
3
3
  matplotlib
4
4
  numpy
5
5
  pandas
@@ -13,6 +13,7 @@ toml
13
13
  pymongo
14
14
  gammapy~=1.1
15
15
  tenacity
16
+ lstcam_calib
16
17
 
17
18
  [all]
18
19
  lstosa[dev,doc,test]
@@ -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)
@@ -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
@@ -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
 
@@ -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"],
@@ -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