Skip to content

Commit

Permalink
Further refined documentation for calc_duration.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gabuzi authored and btasdelen committed Dec 4, 2023
1 parent 30e281d commit 03db4c2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pypulseq/calc_duration.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@

def calc_duration(*args: SimpleNamespace) -> float:
"""
Calculate the duration of an event or block. The duration of a block is given by the maximum duration of its events.
Calculate the duration of an event or block.
The duration of an event is the
time taken by the actual event itself plus its delay.
If multiple events are provided, the calculated duration is for a block
comprised of these events, which is given by the maximum duration of the events.
Although it is possible to provide events that can't be actually be combined into a block
(e.g. multiple events of the same type), the result is still the maximum duration of all events.
Parameters
----------
Expand Down

0 comments on commit 03db4c2

Please sign in to comment.