Skip to content

Commit

Permalink
DOC: added docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaushik Malapati authored and Kaushik Malapati committed Oct 25, 2023
1 parent e7a1a82 commit 2eceb5f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pcdsdevices/tpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}


Expand Down

0 comments on commit 2eceb5f

Please sign in to comment.