Common libraries for km3dq packages¶
The grl_library
library¶
The grl_library.py
library is the main library to extract good-run lists. It can be also easily used in any script. It allows to retrieve in the same time as the grl any QAQC variable or DQ defect for all dataset runs.
The QAQC variable names are slightly different from the ones stored in the file. Here they are:
git jpp uuid detectorid run livetime utcmin utcmax trigger3dmuon trigger3dshower triggermxshower triggernb writel0 writel1 writel2 writesn jdaqtimeslice jdaqtimeslicel0 jdaqtimeslicel1 jdaqtimeslicel2 jdaqtimeslicesn jdaqsummaryslice jdaqevent jtriggerreprocessor jtrigger3dshower jtriggermxshower jtrigger3dmuon jtriggernb in_sync oos daq whiterabbitstatus hrv fifo pmts meanrate rmsrate in_usync out_usync event_duration timestampdiff timestampdiff_r triggerrate pmts_norm acoustics ahrs JDAQJTProc
Example:
grl=get_good_run_list("D0ORCA015", "mass_processing", ["utcmin", "def_operation/Unusable"])
A mode detailed example is available in examples/grl_create.py
The config_library
library¶
The config_library
library is the main configuration library. It especially makes use of the files stored in the Config
directory:
dataquality_tag.toml
: description of the various data-quality tag.grl.toml
: description of the good-run-list tag. It includes the veto/Q-score definitions and the GRL-generation conditions. It is not NOT recommanded to modify the current GRL tag; a specific`my_grl`
tag is available for your custom GRL production. The file also includes the Y-range used by the dataquality-basicPlots.py script; the latter can be edited for your own purposes.defect.toml
,facts.toml
anddet_fact.toml
: description of the data-quality defects, facts and detector facts. To be edited only by experts.
For more details about the configuration, please have a look at the presentation at the 7/2/2024 meeting.
The lw_db_library
library¶
The lw_db_library
library contains functions to read and decode the files stored in the light weight database
(text files hosted on the SFTP server).
The detector_fact_classes
and detector_status_classes
classes¶
The classes are used for the detector-status development. They are used in the `km3dq_lw_db <https://git.km3net.de/btrocme/km3dq_lw_db/`_ (detector-fact filling) and km3net-detectorstatus (detector fact/status Gui) libraries.
Installation¶
It is recommended to first create an isolated virtualenvironment to not interfere with other Python projects:
git clone https://git.km3net.de/btrocme/km3dq_common
cd km3dq_common
python3 -m venv venv
. venv/bin/activate
Install directly from the Git server via pip
(no cloneing needed):
pip install git+https://git.km3net.de/btrocme/km3dq_common
Or clone the repository and run:
make install
To install all the development dependencies, in case you want to contribute or run the test suite:
make install-dev
make test
—
Created with ``cookiecutter https://git.km3net.de/templates/python-project``