lstosa 0.11.6__tar.gz → 0.11.7__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.
- {lstosa-0.11.6 → lstosa-0.11.7}/PKG-INFO +1 -1
- lstosa-0.11.7/crontab/crontab.txt +97 -0
- lstosa-0.11.7/crontab/launchers/launch_GainSel.sh +41 -0
- lstosa-0.11.7/crontab/launchers/launch_GainSelCheck.sh +60 -0
- lstosa-0.11.7/crontab/launchers/launch_SequencerWeb.sh +51 -0
- lstosa-0.11.7/crontab/osa-env.sh +10 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/lstosa.egg-info/PKG-INFO +1 -1
- {lstosa-0.11.6 → lstosa-0.11.7}/src/lstosa.egg-info/SOURCES.txt +5 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/_version.py +3 -3
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/configs/sequencer.cfg +2 -1
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/conftest.py +4 -4
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/paths.py +55 -7
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/scripts/closer.py +5 -5
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/scripts/gain_selection.py +6 -4
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/scripts/gainsel_webmaker.py +4 -0
- lstosa-0.11.7/src/osa/scripts/interleaved_date.py +212 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/scripts/reprocess_longterm.py +1 -1
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/scripts/tests/test_osa_scripts.py +4 -4
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/webserver/utils.py +2 -2
- lstosa-0.11.6/crontab/crontab.txt +0 -83
- {lstosa-0.11.6 → lstosa-0.11.7}/.coveragerc +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/.gitignore +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/.mailmap +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/.pre-commit-config.yaml +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/.readthedocs.yml +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/LICENSE +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/MANIFEST.in +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/README.md +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/codemeta.json +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/crontab/crontab-orig.txt +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/dev/mysql.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/docs/Makefile +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/docs/_static/logo_lstosa.png +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/docs/authors.rst +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/docs/components/index.rst +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/docs/conf.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/docs/configuration.rst +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/docs/contribute.rst +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/docs/documents/index.rst +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/docs/howto/index.rst +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/docs/index.rst +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/docs/introduction/index.rst +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/docs/introduction/reduction_steps_lstchain.png +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/docs/jobs.rst +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/docs/make.bat +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/docs/nightsummary.rst +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/docs/provenance.rst +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/docs/references.rst +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/docs/reports.rst +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/docs/scripts/index.rst +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/docs/troubleshooting/index.rst +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/docs/utils.rst +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/docs/veto.rst +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/docs/workflow/LSTOSA_flow.png +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/docs/workflow/index.rst +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/environment-lstcam.yml +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/environment.yml +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/extra/example_sequencer.txt +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/extra/history_files/sequence_LST1_04183.history +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/extra/history_files/sequence_LST1_04183_failed.history +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/extra/history_files/sequence_LST1_04183_oneline.history +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/extra/history_files/sequence_LST1_04185.0001.history +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/extra/history_files/sequence_LST1_04185.0010.history +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/extra/sacct_output.csv +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/extra/squeue_output.csv +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/pyproject.toml +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/setup.cfg +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/lstosa.egg-info/dependency_links.txt +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/lstosa.egg-info/entry_points.txt +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/lstosa.egg-info/requires.txt +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/lstosa.egg-info/top_level.txt +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/__init__.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/configs/__init__.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/configs/config.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/configs/datamodel.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/configs/options.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/high_level/__init__.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/high_level/selection_cuts.toml +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/high_level/significance.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/high_level/tests/test_significance.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/job.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/nightsummary/__init__.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/nightsummary/database.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/nightsummary/extract.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/nightsummary/nightsummary.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/nightsummary/set_source_coordinates.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/nightsummary/tests/test_database.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/nightsummary/tests/test_extract.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/nightsummary/tests/test_nightsummary.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/nightsummary/tests/test_source_coordinates.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/osadb.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/provenance/__init__.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/provenance/capture.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/provenance/config/definition.yaml +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/provenance/config/environment.yaml +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/provenance/config/logger.yaml +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/provenance/io.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/provenance/utils.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/raw.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/report.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/scripts/__init__.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/scripts/autocloser.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/scripts/calibration_pipeline.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/scripts/copy_datacheck.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/scripts/datasequence.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/scripts/provprocess.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/scripts/reprocessing.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/scripts/sequencer.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/scripts/sequencer_catB_tailcuts.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/scripts/sequencer_webmaker.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/scripts/show_run_summary.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/scripts/simulate_processing.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/scripts/tests/__init__.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/scripts/update_source_catalog.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/tests/__init__.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/tests/test_jobs.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/tests/test_osa.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/tests/test_osadb.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/tests/test_paths.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/tests/test_raw.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/tests/test_report.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/tests/test_veto.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/utils/__init__.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/utils/cliopts.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/utils/iofile.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/utils/logging.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/utils/mail.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/utils/register.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/utils/tests/test_iofile.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/utils/tests/test_utils.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/utils/utils.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/version.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/veto.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/webserver/__init__.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/workflow/__init__.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/workflow/dl3.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/workflow/stages.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/workflow/tests/test_dl3.py +0 -0
- {lstosa-0.11.6 → lstosa-0.11.7}/src/osa/workflow/tests/test_stages.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: lstosa
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.7
|
|
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>
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
SHELL=/usr/bin/bash
|
|
2
|
+
BASH_ENV="/local/home/lstanalyzer/.bashrc"
|
|
3
|
+
CRON_ENV="/local/home/lstanalyzer/osa-env.sh"
|
|
4
|
+
CRON_TZ=UTC
|
|
5
|
+
# Update astropy auxiliary data (e.g. IERS) every week
|
|
6
|
+
0 0 * * SUN source /fefs/aswg/lstosa/utils/osa-conda; python /fefs/aswg/data/aux/astropy/get_iers_data.py > /dev/null 2>&1
|
|
7
|
+
#
|
|
8
|
+
# lstosa jobs
|
|
9
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
10
|
+
# [COPY OBS OVERVIEW] Copy observations overview and daily camera checks to lst1 datacheck webserver
|
|
11
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
12
|
+
00 09 * * * /usr/bin/bash /fefs/aswg/lstosa/misc/copy_camera_daily_check_to_www.sh >/dev/null 2>&1
|
|
13
|
+
#
|
|
14
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
15
|
+
# [RUN SUMMARY] Produce the run summary file at the end of the observations to make sure it contains all the runs taken
|
|
16
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
17
|
+
55 06 * * * obsdate=`date +\%Y\%m\%d -d yesterday`; export obsdate; source /fefs/aswg/lstosa/utils/osa-conda; lstchain_create_run_summary -d $obsdate -o /fefs/onsite/data/lst-pipe/LSTN-01/monitoring/RunSummary --r0-path=/fefs/onsite/data/R0/LSTN-01/lst-arraydaq/events --overwrite > /dev/null 2>&1
|
|
18
|
+
#
|
|
19
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
20
|
+
# [MERGED RUN SUMMARY] Produce the merged run summary file containing all the runs taken by the LST.
|
|
21
|
+
# This only appends the runs of the given date.
|
|
22
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
23
|
+
00 07 * * * obsdate=`date +\%Y\%m\%d -d yesterday`; source /fefs/aswg/lstosa/utils/osa-conda; lstchain_merge_run_summaries -d $obsdate /fefs/onsite/data/lst-pipe/LSTN-01/OSA/Catalog/merged_RunSummary.ecsv --monitoring-path=/fefs/onsite/data/lst-pipe/LSTN-01/monitoring > /dev/null 2>&1
|
|
24
|
+
#
|
|
25
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
26
|
+
# [GAIN SELECTION] Launch Gain Selection process
|
|
27
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
28
|
+
32 07-18 * * * . "$CRON_ENV"; /fefs/aswg/workspace/maria.rivero/crontabs/launchers/launch_GainSel.sh
|
|
29
|
+
#
|
|
30
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
31
|
+
# [GAIN SELECTION CHECK & GAIN SEL WEB MAKER] Make gain selection check and xhtml table and copy it to the lst1 webserver
|
|
32
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
33
|
+
00,15,30,45 08-19 * * * . "$CRON_ENV"; /fefs/aswg/workspace/maria.rivero/crontabs/launchers/launch_GainSelCheck.sh
|
|
34
|
+
#
|
|
35
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
36
|
+
# [SIMULATED SEQUENCER] Launch sequencer once in the morning simulated. It also produces the run summary file if not found.
|
|
37
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
38
|
+
05 08 * * * obsdate=`date +\%Y-\%m-\%d -d yesterday`; export obsdate; source /fefs/aswg/lstosa/utils/osa-conda; sequencer -c /fefs/aswg/lstosa/cfg/sequencer_v0.11.cfg -s -d $obsdate LST1 > /dev/null 2>&1
|
|
39
|
+
#
|
|
40
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
41
|
+
# [SEQUENCER 1] Run only up to DL1A
|
|
42
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
43
|
+
20,50 07-19 * * * obsdate=`date +\%Y-\%m-\%d -d yesterday`; export obsdate; source /fefs/aswg/lstosa/utils/osa-conda; sequencer -c /fefs/aswg/lstosa/cfg/sequencer_v0.11.cfg --no-dl1ab -d $obsdate LST1 >> /fefs/onsite/data/lst-pipe/LSTN-01/OSA/Sequencer_log/${obsdate}_1_LST1.log 2>&1
|
|
44
|
+
#
|
|
45
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
46
|
+
# [SEQUENCER_CATB_TAILCUTS] Runs from DL1A, produces Cat-B calibration and tailcut files
|
|
47
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
48
|
+
10,50 07-20 * * * obsdate=`date +\%Y-\%m-\%d -d yesterday`; export obsdate; source /fefs/aswg/lstosa/utils/osa-conda; sequencer_catB_tailcuts -c /fefs/aswg/lstosa/cfg/sequencer_v0.11.cfg -d $obsdate LST1 -v >> /fefs/onsite/data/lst-pipe/LSTN-01/OSA/Sequencer_log/${obsdate}_tailcuts_LST1.log 2>&1
|
|
49
|
+
#
|
|
50
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
51
|
+
# [SEQUENCER 2] Finishes the processing producing DL1AB and DL2
|
|
52
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
53
|
+
59,30 08-20 * * * obsdate=`date +\%Y-\%m-\%d -d yesterday`; export obsdate; source /fefs/aswg/lstosa/utils/osa-conda; sequencer -c /fefs/aswg/lstosa/cfg/sequencer_v0.11.cfg -d $obsdate LST1 >> /fefs/onsite/data/lst-pipe/LSTN-01/OSA/Sequencer_log/${obsdate}_2_LST1.log 2>&1
|
|
54
|
+
#
|
|
55
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
56
|
+
# [SEQUENCER WEB] Make sequencer xhtml table and copy it to the lst1 webserver
|
|
57
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
58
|
+
*/20 07-22 * * * . "$CRON_ENV"; /fefs/aswg/workspace/maria.rivero/crontabs/launchers/launch_SequencerWeb.sh
|
|
59
|
+
#
|
|
60
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
61
|
+
# [AUTOCLOSER] Launch the closer without forcing it (no -f option).
|
|
62
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
63
|
+
25,55 9-23 * * * obsdate=`date +\%Y-\%m-\%d -d yesterday`; export obsdate; source /fefs/aswg/lstosa/utils/osa-conda; autocloser -c /fefs/aswg/lstosa/cfg/sequencer_v0.11.cfg -d $obsdate LST1 >> /fefs/onsite/data/lst-pipe/LSTN-01/OSA/Autocloser_log/${obsdate}_LST1.log 2>&1
|
|
64
|
+
#
|
|
65
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
66
|
+
# [COPY DATACHECK] Copy the available calibration and DL1 datacheck to the LST1 webserver.
|
|
67
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
68
|
+
05,25,45 07-23 * * * obsdate=`date +\%Y-\%m-\%d -d yesterday`; export obsdate; source /fefs/aswg/lstosa/utils/osa-conda; copy_datacheck -c /fefs/aswg/lstosa/cfg/sexquencer_v0.11.cfg -d $obsdate LST1 > /dev/null 2>&1
|
|
69
|
+
#
|
|
70
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
71
|
+
# [SOURCE CATALOG]
|
|
72
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
73
|
+
52 10-23 * * * obsdate=`date +\%Y-\%m-\%d -d yesterday`; export obsdate; source /fefs/aswg/lstosa/utils/osa-conda; update_source_catalog -c /fefs/aswg/lstosa/cfg/sequencer_v0.11.cfg -d $obsdate > /fefs/onsite/data/lst-pipe/LSTN-01/monitoring/RunCatalog/log/Source-catalog-$obsdate 2>&1
|
|
74
|
+
#
|
|
75
|
+
# ------------------------------------------------------------------------------------------------------------------------
|
|
76
|
+
# [COPY CUMULATIVE LST-1 OBSERVATION TIME]
|
|
77
|
+
# (added by Daniel Morcuende on 2024-04-05)
|
|
78
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
79
|
+
0 18 * * FRI /usr/bin/bash /fefs/aswg/lstosa/misc/update_cumulative_obs_time.sh >/dev/null 2>&1
|
|
80
|
+
#
|
|
81
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
82
|
+
#TROUBLESHOOTING
|
|
83
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
84
|
+
#*/20 7-22 * * * obsdate=`date +\%Y-\%m-\%d`; cd /fefs/aswg/lstosa/troubleshooting/ && /fefs/aswg/software/conda/bin/python troubleshooting.py >> /fefs/aswg/lstosa/troubleshooting/log/cron_log_${obsdate}.log 2>&1
|
|
85
|
+
#
|
|
86
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
87
|
+
# Daniel Morcuende (2023-11-08) periodically remove leftover jobs kept in the SLURM as pending after job dependency not
|
|
88
|
+
# satisfied because of failure (Reason in squeue: 'DependencyNeverSatisfied').
|
|
89
|
+
# It does only look for lstosa jobs launched by sequencer with the prefix "LST1_" and also the merging jobs launched by
|
|
90
|
+
# autocloser like "longterm_dl1_datacheck".
|
|
91
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
92
|
+
*/30 * * * * /local/home/lstanalyzer/remove_dependency_never_satisfied_jobs.sh > /dev/null 2>&1
|
|
93
|
+
#
|
|
94
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
95
|
+
# Restart camera processing of calibration runs in realtime in case it was killed for whatever reason
|
|
96
|
+
# -------------------------------------------------------------------------------------------------------------------------
|
|
97
|
+
04 * * * * cd /local/home/lstanalyzer/camera/lst-camera-watchers;./lst1_watcher_restarter
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# --------------------------------------------------------------------
|
|
4
|
+
# Launch Gain Selection process given an observation date (OBS_DATE),
|
|
5
|
+
# configuration file (CFG), and after activating the conda environment
|
|
6
|
+
# (CONDA_ENV); these three parameters are exported from osa-env.sh
|
|
7
|
+
# Please note that Gain Selection will start up to 6 AM (when the night has ended),
|
|
8
|
+
# and Gain Selection register is saved in {OBS_DATE}_LST1.log
|
|
9
|
+
# --------------------------------------------------------------------
|
|
10
|
+
|
|
11
|
+
obsdate=$(date +\%Y\%m\%d -d yesterday)
|
|
12
|
+
|
|
13
|
+
LOGDIR="${LSTN1}/OSA/GainSel_log"
|
|
14
|
+
WORKDIR="${LSTN1}/OSA/GainSel/${obsdate}"
|
|
15
|
+
|
|
16
|
+
LOGFILE="${LOGDIR}/${OBS_DATE}_LST1.log"
|
|
17
|
+
FLAG_FILE="${WORKDIR}/GainSelFinished.txt"
|
|
18
|
+
|
|
19
|
+
# -------------------------
|
|
20
|
+
# Check GainSelFinished file exists
|
|
21
|
+
# -------------------------
|
|
22
|
+
if [ -e "$FLAG_FILE" ]; then
|
|
23
|
+
echo "GainSelFinished.txt exists for ${OBS_DATE}" >> "$LOGFILE"
|
|
24
|
+
exit
|
|
25
|
+
fi
|
|
26
|
+
# -------------------------
|
|
27
|
+
# Environment
|
|
28
|
+
# -------------------------
|
|
29
|
+
source "$CONDA_ENV"
|
|
30
|
+
|
|
31
|
+
# -------------------------
|
|
32
|
+
# Run GAIN SELECTION
|
|
33
|
+
# -------------------------
|
|
34
|
+
{
|
|
35
|
+
gain_selection \
|
|
36
|
+
--no-queue-check \
|
|
37
|
+
-c "$CFG" \
|
|
38
|
+
-d "$OBS_DATE" \
|
|
39
|
+
-s 6
|
|
40
|
+
|
|
41
|
+
} >> "$LOGFILE" 2>&1
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# --------------------------------------------------------------------
|
|
4
|
+
# Check Gain Selection process given an observation date (OBS_DATE),
|
|
5
|
+
# configuration file (CFG), and after activating the conda environment
|
|
6
|
+
# (CONDA_ENV); these three parameters are exported from osa-env.sh;
|
|
7
|
+
# When Gain Selection has finished, it
|
|
8
|
+
# creates a flag file for the given date: GainSelFinished.txt
|
|
9
|
+
# ...
|
|
10
|
+
# Make gain selection xhtml table and copy it to the lst1 webserver.
|
|
11
|
+
# --------------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
obsdate=$(date +\%Y\%m\%d -d yesterday)
|
|
14
|
+
|
|
15
|
+
WORKDIR="${LSTN1}/OSA/GainSel/${obsdate}"
|
|
16
|
+
FLAG_FILE="${WORKDIR}/GainSelFinished.txt"
|
|
17
|
+
|
|
18
|
+
LOGDIR="${LSTN1}/OSA/GainSel_log"
|
|
19
|
+
LOGFILE="${LOGDIR}/${OBS_DATE}_check_LST1.log"
|
|
20
|
+
LOGFILE_WEB="${LOGDIR}/GainSelWeb_${OBS_DATE}_LST1.log"
|
|
21
|
+
|
|
22
|
+
GS_HTML="${LSTN1}/OSA/GainSelWeb/osa_gainsel_status_${OBS_DATE}.html"
|
|
23
|
+
GS_LSTOSA="/home/www/html/datacheck/lstosa/gainsel.xhtml"
|
|
24
|
+
|
|
25
|
+
# ---------------------------------
|
|
26
|
+
# Check GainSelFinished file exists
|
|
27
|
+
# ---------------------------------
|
|
28
|
+
if [ -e "$FLAG_FILE" ]; then
|
|
29
|
+
echo "GainSelFinished.txt exists for ${OBS_DATE}" >> "$LOGFILE"
|
|
30
|
+
exit
|
|
31
|
+
fi
|
|
32
|
+
|
|
33
|
+
# -------------------------
|
|
34
|
+
# Environment
|
|
35
|
+
# -------------------------
|
|
36
|
+
source "$CONDA_ENV"
|
|
37
|
+
|
|
38
|
+
# -------------------------
|
|
39
|
+
# Run GAIN SELECTION CHECK
|
|
40
|
+
# -------------------------
|
|
41
|
+
{
|
|
42
|
+
gain_selection --check \
|
|
43
|
+
-c "$CFG" \
|
|
44
|
+
-d "$OBS_DATE"
|
|
45
|
+
|
|
46
|
+
} >> "$LOGFILE" 2>&1
|
|
47
|
+
|
|
48
|
+
# -------------------------
|
|
49
|
+
# Update GAIN SELECTION WEB
|
|
50
|
+
# -------------------------
|
|
51
|
+
{
|
|
52
|
+
gainsel_webmaker \
|
|
53
|
+
-c "$CFG"
|
|
54
|
+
} >> "$LOGFILE_WEB" 2>&1
|
|
55
|
+
|
|
56
|
+
{
|
|
57
|
+
if [ $? = 0 ]; then
|
|
58
|
+
scp "$GS_HTML" datacheck:"$GS_LSTOSA"
|
|
59
|
+
fi
|
|
60
|
+
} >> "$LOGFILE_WEB" 2>&1
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# --------------------------------------------------------------------
|
|
4
|
+
# Make sequencer xhtml table and copy it to the lst1 webserver
|
|
5
|
+
# --------------------------------------------------------------------
|
|
6
|
+
|
|
7
|
+
obsdate=$(date +\%Y\%m\%d -d yesterday)
|
|
8
|
+
LOGDIR="${LSTN1}/OSA/Minor_logs/"
|
|
9
|
+
LOGFILE="${LOGDIR}/${obsdate}_sequencer-web.log"
|
|
10
|
+
LOGFILE2="${LOGDIR}/${obsdate}_sequencer-web_2.log"
|
|
11
|
+
|
|
12
|
+
HTMLDIR="${LSTN1}/OSA/SequencerWeb/"
|
|
13
|
+
HTMLFILE="${HTMLDIR}/osa_status_${obsdate}.html"
|
|
14
|
+
HTMLFILE2="${HTMLDIR}/osa_status_2_${obsdate}.html"
|
|
15
|
+
|
|
16
|
+
SEQUENCER_WEB="/home/www/html/datacheck/lstosa/sequencer.xhtml"
|
|
17
|
+
SEQUENCER2_WEB="/home/www/html/datacheck/lstosa/sequencer_2.xhtml"
|
|
18
|
+
|
|
19
|
+
# -------------------------
|
|
20
|
+
# Environment
|
|
21
|
+
# -------------------------
|
|
22
|
+
source "$CONDA_ENV"
|
|
23
|
+
|
|
24
|
+
# -------------------------
|
|
25
|
+
# Run SEQUENCER WEBMAKER
|
|
26
|
+
# -------------------------
|
|
27
|
+
{
|
|
28
|
+
sequencer_webmaker \
|
|
29
|
+
-c "$CFG"
|
|
30
|
+
} >> "$LOGFILE" 2>&1
|
|
31
|
+
|
|
32
|
+
{
|
|
33
|
+
if [ $? = 0 ]; then
|
|
34
|
+
scp "$HTMLFILE" datacheck:"$SEQUENCER_WEB"
|
|
35
|
+
fi
|
|
36
|
+
} >> "$LOGFILE" 2>&1
|
|
37
|
+
|
|
38
|
+
# -------------------------
|
|
39
|
+
# Run SEQUENCER WEBMAKER 2
|
|
40
|
+
# -------------------------
|
|
41
|
+
|
|
42
|
+
{
|
|
43
|
+
sequencer_webmaker_2 \
|
|
44
|
+
-c "$CFG"
|
|
45
|
+
} >> "$LOGFILE2" 2>&1
|
|
46
|
+
|
|
47
|
+
{
|
|
48
|
+
if [ $? = 0 ]; then
|
|
49
|
+
scp "$HTMLFILE2" datacheck:"$SEQUENCER2_WEB"
|
|
50
|
+
fi
|
|
51
|
+
} >> "$LOGFILE2" 2>&1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: lstosa
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.7
|
|
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>
|
|
@@ -12,6 +12,10 @@ environment.yml
|
|
|
12
12
|
pyproject.toml
|
|
13
13
|
crontab/crontab-orig.txt
|
|
14
14
|
crontab/crontab.txt
|
|
15
|
+
crontab/osa-env.sh
|
|
16
|
+
crontab/launchers/launch_GainSel.sh
|
|
17
|
+
crontab/launchers/launch_GainSelCheck.sh
|
|
18
|
+
crontab/launchers/launch_SequencerWeb.sh
|
|
15
19
|
dev/mysql.py
|
|
16
20
|
docs/Makefile
|
|
17
21
|
docs/authors.rst
|
|
@@ -94,6 +98,7 @@ src/osa/scripts/copy_datacheck.py
|
|
|
94
98
|
src/osa/scripts/datasequence.py
|
|
95
99
|
src/osa/scripts/gain_selection.py
|
|
96
100
|
src/osa/scripts/gainsel_webmaker.py
|
|
101
|
+
src/osa/scripts/interleaved_date.py
|
|
97
102
|
src/osa/scripts/provprocess.py
|
|
98
103
|
src/osa/scripts/reprocess_longterm.py
|
|
99
104
|
src/osa/scripts/reprocessing.py
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.11.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 11,
|
|
31
|
+
__version__ = version = '0.11.7'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 11, 7)
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'g38091dd33'
|
|
@@ -26,11 +26,12 @@ DL1_DIR: %(BASE)s/DL1
|
|
|
26
26
|
DL1AB_DIR: %(BASE)s/DL1
|
|
27
27
|
DL2_DIR: %(BASE)s/DL2
|
|
28
28
|
DL3_DIR: %(BASE)s/DL3
|
|
29
|
+
DATACHECK_DIR: %(DL1_DIR)s/datacheck_files
|
|
29
30
|
RF_MODELS: %(BASE)s/models/AllSky
|
|
30
31
|
OSA_DIR: %(BASE)s/OSA
|
|
31
32
|
CLOSER_DIR: %(OSA_DIR)s/Closer
|
|
32
33
|
HIGH_LEVEL_DIR: %(OSA_DIR)s/HighLevel
|
|
33
|
-
LONGTERM_DIR: %(
|
|
34
|
+
LONGTERM_DIR: %(DATACHECK_DIR)s/night_wise
|
|
34
35
|
MERGED_SUMMARY: %(OSA_DIR)s/Catalog/merged_RunSummary.ecsv
|
|
35
36
|
SOURCE_CATALOG: %(OSA_DIR)s/Catalog
|
|
36
37
|
SEQUENCER_WEB_DIR: %(OSA_DIR)s/SequencerWeb
|
|
@@ -511,15 +511,15 @@ def datacheck_dl1_files(base_test_dir):
|
|
|
511
511
|
|
|
512
512
|
|
|
513
513
|
@pytest.fixture(scope="session")
|
|
514
|
-
def longterm_dir(
|
|
515
|
-
directory =
|
|
514
|
+
def longterm_dir(datacheck_dir):
|
|
515
|
+
directory = datacheck_dir / prod_id / date_to_dir(date)
|
|
516
516
|
directory.mkdir(parents=True, exist_ok=True)
|
|
517
517
|
return directory
|
|
518
518
|
|
|
519
519
|
|
|
520
520
|
@pytest.fixture(scope="session")
|
|
521
|
-
def
|
|
522
|
-
directory = base_test_dir / "
|
|
521
|
+
def datacheck_dir(base_test_dir):
|
|
522
|
+
directory = base_test_dir / "DL1" / "datacheck_files" / "night_wise"
|
|
523
523
|
directory.mkdir(parents=True, exist_ok=True)
|
|
524
524
|
return directory
|
|
525
525
|
|
|
@@ -388,18 +388,66 @@ def is_job_completed(job_id: str):
|
|
|
388
388
|
return False
|
|
389
389
|
|
|
390
390
|
|
|
391
|
-
def create_longterm_symlink(
|
|
391
|
+
def create_longterm_symlink():
|
|
392
392
|
"""If the created longterm DL1 datacheck file corresponds to the latest
|
|
393
393
|
version available, make symlink to it in the "all" common directory."""
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
394
|
+
|
|
395
|
+
nightdir = utils.date_to_dir(options.date)
|
|
396
|
+
longterm_dir = Path(cfg.get("LST1", "LONGTERM_DIR"))
|
|
397
|
+
output_dir = Path(cfg.get("LST1", "DATACHECK_DIR"))
|
|
398
|
+
|
|
399
|
+
extensions = ["h5", "log", "html"]
|
|
400
|
+
|
|
401
|
+
for ext in extensions:
|
|
402
|
+
linked_longterm_file = output_dir / f"night_wise/DL1_datacheck_{nightdir}.{ext}"
|
|
403
|
+
all_longterm_files = longterm_dir.rglob(f"v*/{nightdir}/DL1_datacheck_{nightdir}.{ext}")
|
|
399
404
|
latest_version_file = get_latest_version_file(all_longterm_files)
|
|
400
|
-
log.info("Symlink the latest version longterm DL1 datacheck file in the common directory.")
|
|
401
405
|
linked_longterm_file.unlink(missing_ok=True)
|
|
402
406
|
linked_longterm_file.symlink_to(latest_version_file)
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
def create_runwise_datacheck_symlinks():
|
|
410
|
+
"""Create symlinks of the run-wise datacheck files in the "datacheck" directory."""
|
|
411
|
+
nightdir = utils.date_to_dir(options.date)
|
|
412
|
+
dl1_dir = Path(cfg.get("LST1", "DL1_DIR")) / nightdir / options.prod_id
|
|
413
|
+
output_dir = Path(cfg.get("LST1", "DATACHECK_DIR")) / nightdir
|
|
414
|
+
output_dir.mkdir(parents=True, exist_ok=True)
|
|
415
|
+
|
|
416
|
+
patterns = [
|
|
417
|
+
"tailcut*/datacheck/datacheck_dl1_LST-1.Run?????.pdf",
|
|
418
|
+
"tailcut*/datacheck/datacheck_dl1_LST-1.Run?????.h5",
|
|
419
|
+
]
|
|
420
|
+
|
|
421
|
+
for pattern in patterns:
|
|
422
|
+
for input_file in dl1_dir.rglob(pattern):
|
|
423
|
+
output_file = output_dir / input_file.name
|
|
424
|
+
if not output_file.is_symlink():
|
|
425
|
+
output_file.symlink_to(input_file.resolve())
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
def create_muons_symlinks():
|
|
429
|
+
"""Create symlinks of the muon files in the "datacheck" directory."""
|
|
430
|
+
nightdir = utils.date_to_dir(options.date)
|
|
431
|
+
muons_dir = destination_dir("MUON", create_dir=False)
|
|
432
|
+
muons_file_list = muons_dir.rglob("muons_LST-1*.fits")
|
|
433
|
+
output_dir = Path(cfg.get("LST1", "DATACHECK_DIR")) / nightdir / "muons"
|
|
434
|
+
output_dir.mkdir(parents=True, exist_ok=True)
|
|
435
|
+
|
|
436
|
+
for input_file in muons_file_list:
|
|
437
|
+
output_file = output_dir / input_file.name
|
|
438
|
+
if not output_file.is_symlink():
|
|
439
|
+
print(f"input file exists: {input_file.exists()}")
|
|
440
|
+
output_file.symlink_to(input_file.resolve())
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
def create_datacheck_symlinks(cherenkov_job_id: str=None):
|
|
444
|
+
"""Once all steps of autocloser have finished successfully, create symlinks of the run-wise
|
|
445
|
+
and night-wise datacheck files, and of the muon files in the "datacheck" directory."""
|
|
446
|
+
if not cherenkov_job_id or is_job_completed(cherenkov_job_id):
|
|
447
|
+
log.info("Creating symlinks of the datacheck and muon files in the common directory.")
|
|
448
|
+
create_longterm_symlink()
|
|
449
|
+
create_runwise_datacheck_symlinks()
|
|
450
|
+
create_muons_symlinks()
|
|
403
451
|
else:
|
|
404
452
|
log.warning(f"Job {cherenkov_job_id} (lstchain_cherenkov_transparency) did not finish successfully.")
|
|
405
453
|
|
|
@@ -26,7 +26,7 @@ from osa.nightsummary.extract import extract_runs, extract_sequences
|
|
|
26
26
|
from osa.nightsummary.nightsummary import run_summary_table
|
|
27
27
|
from osa.paths import (
|
|
28
28
|
destination_dir,
|
|
29
|
-
|
|
29
|
+
create_datacheck_symlinks,
|
|
30
30
|
dl1_datacheck_longterm_file_exits
|
|
31
31
|
)
|
|
32
32
|
from osa.raw import is_raw_data_available
|
|
@@ -161,7 +161,7 @@ def post_process(seq_tuple):
|
|
|
161
161
|
|
|
162
162
|
if dl1_datacheck_longterm_file_exits() and not options.test:
|
|
163
163
|
if cfg.getboolean("lstchain", "create_longterm_symlink"):
|
|
164
|
-
|
|
164
|
+
create_datacheck_symlinks()
|
|
165
165
|
|
|
166
166
|
else:
|
|
167
167
|
# Close the sequences
|
|
@@ -187,7 +187,7 @@ def post_process(seq_tuple):
|
|
|
187
187
|
longterm_job_id = daily_datacheck(daily_longterm_cmd(list_job_id))
|
|
188
188
|
cherenkov_job_id = cherenkov_transparency(cherenkov_transparency_cmd(longterm_job_id))
|
|
189
189
|
if cfg.getboolean("lstchain", "create_longterm_symlink"):
|
|
190
|
-
|
|
190
|
+
create_datacheck_symlinks(cherenkov_job_id)
|
|
191
191
|
|
|
192
192
|
time.sleep(600)
|
|
193
193
|
|
|
@@ -584,7 +584,7 @@ def merge_muon_files(sequence_list):
|
|
|
584
584
|
def daily_longterm_cmd(parent_job_ids: List[str]) -> List[str]:
|
|
585
585
|
"""Build the daily longterm command."""
|
|
586
586
|
nightdir = date_to_dir(options.date)
|
|
587
|
-
datacheck_dir = destination_dir("DATACHECK", create_dir=False, dl1_prod_id="
|
|
587
|
+
datacheck_dir = destination_dir("DATACHECK", create_dir=False, dl1_prod_id="tailcut*")
|
|
588
588
|
muons_dir = destination_dir("MUON", create_dir=False)
|
|
589
589
|
longterm_dir = Path(cfg.get("LST1", "LONGTERM_DIR")) / options.prod_id / nightdir
|
|
590
590
|
longterm_output_file = longterm_dir / f"DL1_datacheck_{nightdir}.h5"
|
|
@@ -629,7 +629,7 @@ def daily_datacheck(cmd: List[str]):
|
|
|
629
629
|
def cherenkov_transparency_cmd(longterm_job_id: str) -> List[str]:
|
|
630
630
|
"""Build the cherenkov transparency command."""
|
|
631
631
|
nightdir = date_to_dir(options.date)
|
|
632
|
-
datacheck_dir = destination_dir("DATACHECK", create_dir=False, dl1_prod_id="
|
|
632
|
+
datacheck_dir = destination_dir("DATACHECK", create_dir=False, dl1_prod_id="tailcut*")
|
|
633
633
|
longterm_dir = Path(cfg.get("LST1", "LONGTERM_DIR")) / options.prod_id / nightdir
|
|
634
634
|
longterm_datacheck_file = longterm_dir / f"DL1_datacheck_{nightdir}.h5"
|
|
635
635
|
slurm_account = cfg.get("SLURM", "ACCOUNT")
|
|
@@ -334,21 +334,23 @@ def update_history_file(run_id: str, subrun: str, log_dir: Path, history_file: P
|
|
|
334
334
|
log.debug(f"Cannot find a job_id for the run {run_id:05d}.{subrun:04d}")
|
|
335
335
|
else:
|
|
336
336
|
job_status = get_sacct_output(run_sacct(job_id=job_id))["State"]
|
|
337
|
+
now = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
|
338
|
+
|
|
337
339
|
if job_status.item() in ["RUNNING", "PENDING"]:
|
|
338
340
|
log.info(f"Job {job_id} is still running.")
|
|
339
341
|
return
|
|
340
|
-
|
|
342
|
+
|
|
341
343
|
elif job_status.item() == "COMPLETED":
|
|
342
344
|
log.debug(f"Job {job_id} finished successfully, updating history file.")
|
|
343
345
|
string_to_write = (
|
|
344
|
-
f"{run_id:05d}.{subrun:04d} gain_selection 0\n"
|
|
346
|
+
f"{now} | {run_id:05d}.{subrun:04d} gain_selection 0\n"
|
|
345
347
|
)
|
|
346
348
|
append_to_file(history_file, string_to_write)
|
|
347
|
-
|
|
349
|
+
|
|
348
350
|
else:
|
|
349
351
|
log.info(f"Job {job_id} failed, updating history file.")
|
|
350
352
|
string_to_write = (
|
|
351
|
-
f"{run_id:05d}.{subrun:04d} gain_selection 1\n"
|
|
353
|
+
f"{now} | {run_id:05d}.{subrun:04d} gain_selection 1\n"
|
|
352
354
|
)
|
|
353
355
|
append_to_file(history_file, string_to_write)
|
|
354
356
|
|
|
@@ -144,6 +144,10 @@ def main():
|
|
|
144
144
|
content = "<p>No data found</p>"
|
|
145
145
|
log.warning(f"No data found for date {date}, creating an empty HTML file.")
|
|
146
146
|
|
|
147
|
+
elif len(Table.read(run_summary_file)[Table.read(run_summary_file)["run_type"] == "DATA"]) == 0:
|
|
148
|
+
content = "<p>Only calibration events were taken</p>"
|
|
149
|
+
log.warning(f"No DATA runs for date {date}, creating an empty HTML file.")
|
|
150
|
+
|
|
147
151
|
else:
|
|
148
152
|
# Get the table with the gain selection check report in HTML format:
|
|
149
153
|
table_gain_selection_jobs = check_failed_jobs(options.date)
|