diff --git a/docs/make.jl b/docs/make.jl index 201174594c41bbf2ce74e8ef3937c94beb92d8da..7eaff644d1fa511917a4569a3c94bd23ea15f7a6 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -20,6 +20,8 @@ makedocs(; "Home" => "index.md", "Optimisation" => "sequence_optimisation.md", "Implemented sequences" => "implemented_sequences.md", + "Defining sequences" => "defining_sequence.md", + "Post-hoc adjustments" => "adjust_sequences.md", "Scanners" => "scanners.md", "Internal API" => "api.md", ], diff --git a/docs/src/adjust_sequences.md b/docs/src/adjust_sequences.md new file mode 100644 index 0000000000000000000000000000000000000000..88c57aa30a037f42b53f485c8c9dfa431566151f --- /dev/null +++ b/docs/src/adjust_sequences.md @@ -0,0 +1,31 @@ +# [Post-hoc adjustment of sequences](@id adjust_sequences) +Typically a sequence is repeated for multiple [`repetition_time`](@ref) ([`TR`](@ref)) to allow the acquisition of multiple k-space lines, slice selection, or other sequence parameters (e.g., varying diffusion-weighting parameters for [`DiffusionSpinEcho`](@ref)). +MRIBuilder supports this by allowing the creation of a longer sequence out of multiple repeats of a base sequence with some minor alterations. + +To support post-hoc alterations, each RF pulse or gradient waveform in the sequence can be given a label. +Some commonly-used labels in MRIBuilder are: +- `:diffusion`: used for diffusion-weighted gradients produced by [`dwi_gradients`](@ref). +- `:FOV`: used for gradients that should align with the field-of-view (slice-select gradients in [`excitation_pulse`](@ref) or [`refocus_pulse`](@ref) and readout gradients in [`readout_event`](@ref)). + +Post-hoc alterations can be applied to gradients or RF pulses with a specific labels (or to all gradients/RF pulses) using [`adjust`](@ref). +Some example usages are: +- Reduce the RF pulse amplitude by 20% (e.g., due to transmit bias field): `adjust(sequence, pulse=(scale=0.8, ))` +- Repeat sequence 2 times with different diffusion-weighted gradient orientations (x- and y-direction) and gradient strength reduced by 30%: `adjust(sequence, diffusion=(orientation=[[1., 0., 0], [0., 1., 0.]], scale=0.7))` +- Rotate the field of view by 45 degrees around the y-axis: +```julia +using Rotations +rotation = Rotations.AngleAxis(deg2rad(45), 0., 1., 0.) +adjust(sequence, FOV=(rotation=rotation, )) +``` +When repeating the same sequence, a spoiler gradient and/or dead time can be added in between each pair of repeats by supplying the appropriate keywords to the `merge` parameter in [`adjust`](@ref) (e.g., `merge=(wait_time=10., )`). These parameters are described in more detail in [`merge_sequences`](@ref). + +## Post-hoc adjustments API +```@meta +CollapsedDocStrings = true +``` +```@autodocs +Modules = [ + MRIBuilder.PostHoc, +] +``` + diff --git a/docs/src/api.md b/docs/src/api.md index b74d3ca583071198392e37d9438537a6ed8ea793..e8c124c8c85f7b4ee5796a6a0df612c36b5d5fa1 100644 --- a/docs/src/api.md +++ b/docs/src/api.md @@ -45,13 +45,6 @@ Modules = [ MRIBuilder.Parts.EPIReadouts, ] ``` -## Post-hoc adjustments -```@autodocs -Modules = [ - MRIBuilder.PostHoc, -] -``` - ## Sequence I/O ```@autodocs Modules = [ diff --git a/docs/src/defining_sequence.md b/docs/src/defining_sequence.md index 05a73cd4e85a436ee546f8f5cb4431b27fbfac93..12443316e6da348194255cf55881391ba0229a71 100644 --- a/docs/src/defining_sequence.md +++ b/docs/src/defining_sequence.md @@ -103,7 +103,7 @@ Modules = [ ``` -## Pathways +## Pathways API ```@autodocs Modules = [ MRIBuilder.Pathways,