From e681fd59dca6d405a026581994532c8fdaf1a39d Mon Sep 17 00:00:00 2001 From: Michiel Cottaar <michiel.cottaar@ndcn.ox.ac.uk> Date: Fri, 23 Feb 2024 11:14:33 +0000 Subject: [PATCH] Make gradient spoiler available --- src/parts/helper_functions.jl | 4 ++-- src/parts/parts.jl | 2 +- src/sequences/gradient_echos.jl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/parts/helper_functions.jl b/src/parts/helper_functions.jl index 752f2f1..2df6b61 100644 --- a/src/parts/helper_functions.jl +++ b/src/parts/helper_functions.jl @@ -284,7 +284,7 @@ function interpret_image_size(fov, resolution, voxel_size, slice_thickness) end """ - spoiler_gradient(; optimise=false, orientation=[0, 0, 1], rotate=:FOV, scale=:spoiler, spoiler_scale=1., duration=:min, variables...) + gradient_spoiler(; optimise=false, orientation=[0, 0, 1], rotate=:FOV, scale=:spoiler, spoiler_scale=1., duration=:min, variables...) Returns two DWI gradients that are guaranteed to cancel each other out. @@ -299,7 +299,7 @@ Returns two DWI gradients that are guaranteed to cancel each other out. - [`spoiler_scale`](@ref): maximum spoiler scale (before applying any reductions due to `scale`). - Any other parameters expected by [`Trapezoid`](@ref). """ -function spoiler_gradient(; optimise=false, scanner=nothing, orientation=[0, 0, 1], group=:FOV, spoiler_scale=1., duration=:min, variables...) +function gradient_spoiler(; optimise=false, scanner=nothing, orientation=[0, 0, 1], group=:FOV, spoiler_scale=1., duration=:min, variables...) build_sequence(scanner; optimise=optimise) do Trapezoid(; orientation=orientation, group=group, spoiler_scale=spoiler_scale, duration=duration, variables...) end diff --git a/src/parts/parts.jl b/src/parts/parts.jl index 7614397..9562eed 100644 --- a/src/parts/parts.jl +++ b/src/parts/parts.jl @@ -9,7 +9,7 @@ import .Trapezoids: Trapezoid, SliceSelect, LineReadout, opposite_kspace_lines import .SpoiltSliceSelects: SpoiltSliceSelect import .SliceSelectRephases: SliceSelectRephase import .EPIReadouts: EPIReadout -import .HelperFunctions: excitation_pulse, refocus_pulse, readout_event, dwi_gradients, interpret_image_size +import .HelperFunctions: excitation_pulse, refocus_pulse, readout_event, dwi_gradients, interpret_image_size, gradient_spoiler end \ No newline at end of file diff --git a/src/sequences/gradient_echos.jl b/src/sequences/gradient_echos.jl index bc5dd96..3c35a0a 100644 --- a/src/sequences/gradient_echos.jl +++ b/src/sequences/gradient_echos.jl @@ -19,7 +19,7 @@ If image parameters are provided, this will switch to a sinc pulse and EPI reado ## Parameters - [`excitation`](@ref): properties of the excitation pulse as described in [`excitation_pulse`](@ref). - [`readout`](@ref): properties of the readout as described in [`readout_event`](@ref). -- [`spoiler`](@ref): if set adds a spoiler [`gradient_spoiler`](@ref) gradient after the readout (e.g., `spoiler=(spoiler_scale=1, orientation=[0, 0, 1], group=:FOV)` to add a gradient in the z-direction of the `FOV` coordinate system that fully dephases spins over 1 mm). +- [`spoiler`](@ref): if set adds a spoiler [`gradient_spoiler`](@ref) gradient after the readout (e.g., `spoiler=()` to add a gradient in the z-direction of the `FOV` coordinate system that fully dephases spins over 1 mm). - Image parameters ([`resolution`](@ref)/[`fov`](@ref)/[`voxel_size`](@ref)/[`slice_thickness`](@ref)): describe the properties of the resulting image. See [`interpret_image_size`](@ref) for details. - [`optim`](@ref): parameters to pass on to the Ipopt optimiser (see https://coin-or.github.io/Ipopt/OPTIONS.html). -- GitLab