From 53469188ca095bd3d2ce932d045ece72d7fde3a3 Mon Sep 17 00:00:00 2001
From: Michiel Cottaar <MichielCottaar@protonmail.com>
Date: Tue, 30 Jul 2024 16:30:18 +0100
Subject: [PATCH] Default value of TR/repetition_time is the duration of the
 sequence

---
 src/containers/base_sequences.jl | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/containers/base_sequences.jl b/src/containers/base_sequences.jl
index 9d024e7..50a6881 100644
--- a/src/containers/base_sequences.jl
+++ b/src/containers/base_sequences.jl
@@ -168,6 +168,8 @@ get_index_single_TR(s::Sequence, i::Integer) = s.blocks[i][2]
 Base.getindex(seq::Sequence, sym::Symbol) = seq[findfirst(p -> p[1] == sym, seq.blocks)]
 nrepeat(::Sequence) = 0
 
+@defvar repetition_time(seq::Sequence) = duration(seq)
+
 to_block_pair(pair::Pair) = pair[1] => to_block(pair[2])
 to_block_pair(other) = nothing => to_block(other)
 
-- 
GitLab