From edbeb2f8e9607c4e2db59ac4616c9aaeb2f0dc11 Mon Sep 17 00:00:00 2001
From: Michiel Cottaar <michiel.cottaar@ndcn.ox.ac.uk>
Date: Sat, 27 Jan 2024 17:35:59 +0000
Subject: [PATCH] Add docstrings

---
 src/containers/containers.jl |  8 ++++++++
 src/containers/sequences.jl  |  6 ++++++
 src/gradients/gradients.jl   | 10 ++++++++++
 3 files changed, 24 insertions(+)

diff --git a/src/containers/containers.jl b/src/containers/containers.jl
index 591b9f0..e134de9 100644
--- a/src/containers/containers.jl
+++ b/src/containers/containers.jl
@@ -1,5 +1,13 @@
+"""
+Defines [`ContainerBlock`](@ref) sub-types, i.e., [`BuildingBlocks`](@ref) objects that contain other BuildingBlocks.
+
+The most important of these is [`Sequence`](@ref).
+
+To get the children blocks use [`get_children_blocks`](@ref).
+"""
 module Containers
 include("sequences.jl")
+import ..BuildingBlocks: ContainerBlock, get_children_blocks
 
 import .Sequences: Sequence
 end
\ No newline at end of file
diff --git a/src/containers/sequences.jl b/src/containers/sequences.jl
index d7f908c..0422e06 100644
--- a/src/containers/sequences.jl
+++ b/src/containers/sequences.jl
@@ -1,3 +1,6 @@
+"""
+Define the [`Sequence`](@ref) building block.
+"""
 module Sequences
 import JuMP: Model, @constraint
 import ...BuildSequences: @global_model_constructor
@@ -12,6 +15,9 @@ Represents a series of [`BuildingBlock`](@ref) objects run in turn.
 
 Providing a [`Scanner`](@ref) will lead to [`scanner_constraints!`](@ref) to be called on all building blocks.
 
+This can be used as a top-level NMR/MRI sequence (in which case the [`TR`](@ref) variable is relevant)
+or be embedded as a [`BuildingBlock`](@ref) into higher-order `Sequence` or other [`ContainerBlock`](@ref) objects.
+
 ## Variables
 - [`TR`](@ref): repetition time of sequence in ms.
 """
diff --git a/src/gradients/gradients.jl b/src/gradients/gradients.jl
index 8c6dbb6..38edafa 100644
--- a/src/gradients/gradients.jl
+++ b/src/gradients/gradients.jl
@@ -1,8 +1,18 @@
+"""
+Module defining sub-types of the [`GradientBlock`](@ref), i.e., any [`BuildingBlock`](@ref) that only defines a gradient profile.
+
+- [`PulsedGradient`](@ref)
+- [`InstantGradientBlock`](@ref)
+
+Arbitrary gradient waveforms can be store din a [`ConcreteBlock`](@ref)
+"""
 module Gradients
 include("integrate_gradients.jl")
 include("pulsed_gradients.jl")
 include("instant_gradients.jl")
 
+import ..BuildingBlock: GradientBlock
+
 import .PulsedGradients: PulsedGradient
 import .InstantGradients: InstantGradientBlock
 end
\ No newline at end of file
-- 
GitLab