From 2b41a7716acf6d5473e4a1be0ad0bb5b46dd6c75 Mon Sep 17 00:00:00 2001 From: Luigi Pertoldi Date: Fri, 8 Dec 2023 12:25:32 +0100 Subject: [PATCH] Add new example --- docs/source/kitchen-sink.rst | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/source/kitchen-sink.rst b/docs/source/kitchen-sink.rst index fdbbe9b..0694960 100644 --- a/docs/source/kitchen-sink.rst +++ b/docs/source/kitchen-sink.rst @@ -104,6 +104,36 @@ When did physics run 3 of LEGEND-200 period 4 start? >>> to_datetime(lmeta.dataprod.runinfo.p04.r003.phy.start_key) datetime.datetime(2023, 5, 1, 20, 59, 51) +What is the current amount of exposure of HPGes usable for analysis? +-------------------------------------------------------------------------------------- + +.. code-block:: python + :linenos: + + exposure = 0 + + for period, runs in lmeta.dataprod.config.analysis_runs.items(): + for run in runs: + if "phy" not in lmeta.dataprod.runinfo[period][run]: + continue + + runinfo = lmeta.dataprod.runinfo[period][run].phy + chmap = lmeta.channelmap(runinfo.start_key).map("system", unique=False).geds + + for _, gedet in chmap.items(): + if gedet.analysis.usability not in ("off", "ac"): + exposure += ( + gedet.production.mass_in_g + / 1000 + * runinfo.livetime_in_s + / 60 + / 60 + / 24 + / 365 + ) + + print(exposure, "kg yr") + What is the exposure of each single HPGe usable for analysis over a selection of runs? --------------------------------------------------------------------------------------