How to generate a good run list and retrieve any QAQC variables or defectΒΆ

The following example shows how to use the Calculator class.

from km3dq_common.grl_library import get_good_run_list

# The list of detectors and data quality tags are available at the
# location:

detector = "D0ORCA015"
dataquality_tag = "neutrino2024"

# It is possible to retrieve for each run any QAQC variables or defect.
# The QAQC files are available at the location:
# The assigned defects are available at the location:

additional_variables = ["hrv", "meanrate", "rmsrate"]

g = get_good_run_list(detector, dataquality_tag, additional_variables)

# Print the conditions used to derive the good run list
print(f"Veto conditions       : {g['var_prop']['veto_thresholds']}")
print(f"Qscore conditions     : {g['var_prop']['qsco_thresholds']}")
print(f"Good runs conditions  : {g['var_prop']['good_thresholds']}")

# Print the good run list
print(f"Run list: {g['good']['run_list']}")
print(f"Livetime: {g['good']['livetime']}")

# Print the additional info of a random run
run_number = 15500
for i_var in additional_variables:
    print(f"Run {run_number}: {i_var} = {g['add_info'][i_var][run_number]:.2f}")

Gallery generated by Sphinx-Gallery