From 335ee69d1df13662674c84cc2eb56ca464174bdf Mon Sep 17 00:00:00 2001
From: Michiel Cottaar <MichielCottaar@protonmail.com>
Date: Wed, 15 May 2024 11:40:14 +0100
Subject: [PATCH] Write intro to MRIBuilder

---
 docs/make.jl      |  1 +
 docs/src/api.md   |  5 +++++
 docs/src/index.md | 29 +++++++++++++++++++++++++----
 3 files changed, 31 insertions(+), 4 deletions(-)
 create mode 100644 docs/src/api.md

diff --git a/docs/make.jl b/docs/make.jl
index f068424..80a5d7c 100644
--- a/docs/make.jl
+++ b/docs/make.jl
@@ -17,6 +17,7 @@ makedocs(;
     ),
     pages=[
         "Home" => "index.md",
+        "API" => "api.md",
     ],
     warnonly=Documenter.except(:example_block),
 )
diff --git a/docs/src/api.md b/docs/src/api.md
new file mode 100644
index 0000000..4797982
--- /dev/null
+++ b/docs/src/api.md
@@ -0,0 +1,5 @@
+# MRIBuilder.jl API
+
+```@autodocs
+Modules = [MRIBuilder]
+```
\ No newline at end of file
diff --git a/docs/src/index.md b/docs/src/index.md
index a3bcb6a..f1f4c26 100644
--- a/docs/src/index.md
+++ b/docs/src/index.md
@@ -3,12 +3,33 @@ CurrentModule = MRIBuilder
 ```
 
 # MRIBuilder
+[MRIBuilder](https://git.fmrib.ox.ac.uk/ndcn0236/mribuilder.jl) allows for the creation and optimisation of MRI sequences within [Julia](https://julialang.org).
 
-Documentation for [MRIBuilder](https://git.fmrib.ox.ac.uk/ndcn0236/mribuilder.jl).
+Depending on your application, there are several levels at which you can interact with MRIBuilder.
+The ones lower down require more expertise with Julia and the internals of MRIBuilder:
+1. Many sequences have already been implemented and can be obtained through a simple function call (see [Using implemented sequences](@ref implemented_sequences)).
+2. New sequences can be created out of pre-defined sequence components and by defining sequence-specific metrics (see [Defining new sequences](@ref defining_sequences)).
+3. Finally, one can actually define new sequence components (not documented yet).
 
-```@index
+Typically, the resulting sequence will only cover a single repetition time (TR).
+MRIBuilder enables the concatenation of single-TR sequences into a multi-TR sequence.
+During these repeats minor adjustments can be made to the single-TR sequence.
+This can be used to allow different repeats to image different lines in k-space or
+excite different slices (see [Post-hoc adjustment of sequences](@ref adjust_sequences)).
+
+The signal formation for the resulting sequence can be predicted using [MCMRSimulator](https://open.win.ox.ac.uk/pages/ndcn0236/mcmrsimulator.jl/stable) given some representation of the imaged tissue.
+MRIBuilder can be used to read/write to the [pulseq](https://pulseq.github.io) MR sequence file format.
+This can be used to run the sequence on MRI scanners as described in the [pulseq homepage](https://pulseq.github.io).
+Rather than just directly running the sequences from this library on the scanner, we strongly recommend to load it using the [MATLAB pulseq](https://github.com/pulseq/pulseq) or [python pypulseq](https://github.com/pulseq/pulseq) first as these libraries run additional checks!
+
+
+## Installation
+It can be run from the command line using the Julia REPL, from a Julia script, or in a [Jupyter notebook](https://jupyter.org).
+Like any Julia package, Julia can be installed using the built-in Julia package manager
+```
+pkg> add https://git.fmrib.ox.ac.uk/ndcn0236/mribuilder.jl.git
 ```
 
-```@autodocs
-Modules = [MRIBuilder]
+## Documentation overview
+```@index
 ```
-- 
GitLab