From 2eceb5f599dbc0a8fc73e795be1dd6e370ead6d5 Mon Sep 17 00:00:00 2001 From: Kaushik Malapati Date: Wed, 25 Oct 2023 15:48:18 -0700 Subject: [PATCH] DOC: added docstrings --- pcdsdevices/tpr.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcdsdevices/tpr.py b/pcdsdevices/tpr.py index dc67f497df7..f18ae78527e 100644 --- a/pcdsdevices/tpr.py +++ b/pcdsdevices/tpr.py @@ -12,14 +12,17 @@ def _get_delay(mds: MultiDerivedSignal, items: SignalToValue) -> float: + """Calculates delay in ns from ticks and taps""" return items[mds.attrs[0]] * TPR_TICK_NS + items[mds.attrs[1] * TPR_TAP_NS] def _get_width(mds: MultiDerivedSignal, items: SignalToValue) -> float: + """Calculates width in ns from ticks""" return items[mds.attrs[0]] * TPR_TICK_NS def _put_last(mds: MultiDerivedSignal, value: float) -> SignalToValue: + """Only writes value to last attr""" return {mds.attrs[-1]: value}