diff --git a/docs/src/sequence_optimisation.md b/docs/src/sequence_optimisation.md index 0ab0233bdcc45e99a55330c3622fd5980e74b5f1..11bd984e7cbcb1429b27abe21735dc04e705e807 100644 --- a/docs/src/sequence_optimisation.md +++ b/docs/src/sequence_optimisation.md @@ -64,7 +64,7 @@ variables.rise_time variables.slew_rate variables.slew_rate_norm variables.slice_thickness -variables.spoiler_scale +variables.spoiler variables.time_to_center variables.voxel_size variables.Δ diff --git a/src/components/instant_gradients.jl b/src/components/instant_gradients.jl index 382248243b4494fad020e33996f7eba77d705975..ddca7f0d0a77f16ca1067ac36f59d4ebff640b32 100644 --- a/src/components/instant_gradients.jl +++ b/src/components/instant_gradients.jl @@ -15,7 +15,7 @@ If the `orientation` is set an [`InstantGradient1D`](@ref) is returned, otherwis ## Variables - [`variables.qvec`](@ref): Spatial frequency on which spins will be dephased due to this pulsed gradient in rad/um. -- [`variables.spoiler_scale`](@ref): Length-scale on which spins will be dephased by exactly 2π in mm. +- [`variables.spoiler`](@ref): Length-scale on which spins will be dephased by exactly 2π in mm. """ abstract type InstantGradient{N} <: EventComponent end diff --git a/src/parts/helper_functions.jl b/src/parts/helper_functions.jl index 66a307aa81ae6aeb6595fb0e73b364a8f5706276..b89f7bfb4925de84dadf24634a2445056ccccb03 100644 --- a/src/parts/helper_functions.jl +++ b/src/parts/helper_functions.jl @@ -135,7 +135,7 @@ function refocus_pulse(; flip_angle=180, phase=0., frequency=0., shape=nothing, return SliceSelect(pulse; duration=:min, slice_thickness=slice_thickness, orientation=orientation, group=:FOV) end else - res = SpoiltSliceSelect(pulse; orientation=orientation, duration=:min, group=:FOV, slice_thickness=slice_thickness, spoiler_scale=spoiler) + res = SpoiltSliceSelect(pulse; orientation=orientation, duration=:min, group=:FOV, slice_thickness=slice_thickness, spoiler=spoiler) return res end end @@ -285,7 +285,7 @@ function interpret_image_size(fov, resolution, voxel_size, slice_thickness) end """ - gradient_spoiler(; 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=1., duration=:min, variables...) Returns two DWI gradients that are guaranteed to cancel each other out. @@ -297,12 +297,12 @@ Returns two DWI gradients that are guaranteed to cancel each other out. - `scanner`: Used for testing. Do not set this parameter at this level (instead set it for the total sequence using [`build_sequence`](@ref)). ## Variables -- [`variables.spoiler_scale`](@ref): maximum spoiler scale (before applying any reductions due to `scale`). +- [`variables.spoiler`](@ref): maximum spoiler scale (before applying any reductions due to `scale`). - Any other parameters expected by [`Trapezoid`](@ref). """ -function gradient_spoiler(; 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=1., duration=:min, variables...) build_sequence(scanner; optimise=optimise) do - Trapezoid(; orientation=orientation, group=group, spoiler_scale=spoiler_scale, duration=duration, variables...) + Trapezoid(; orientation=orientation, group=group, spoiler=spoiler, duration=duration, variables...) end end diff --git a/src/variables.jl b/src/variables.jl index f3d121a6e575f04d04ca25e1820a727478224f7c..0551d2bf3f7c961cb6165a86262a635c453bf1fc 100644 --- a/src/variables.jl +++ b/src/variables.jl @@ -250,7 +250,7 @@ function def_alternate_variable!(name::Symbol, other_var::Symbol, from_other::Fu setproperty!(variables, name, AlternateVariable(name, other_var, from_other, to_other, inverse)) end -def_alternate_variable!(:spoiler_scale, :qval, q->1e-3 * 2π/q, l->1e-3 * 2π/l, true) +def_alternate_variable!(:spoiler, :qval, q->1e-3 * 2π/q, l->1e-3 * 2π/l, true) def_alternate_variable!(:qval, :qval_square, sqrt, q -> q * q, false) def_alternate_variable!(:qval_square, :qvec, qv -> sum(q -> q * q, qv), nothing, false) @@ -262,13 +262,13 @@ The norm of the [`variables.qvec`](@ref). variables.qval """ - spoiler_scale(gradient) + spoiler(gradient) Spatial scale in mm over which the spoiler gradient will dephase by 2π. Automatically computed based on [`variables.qvec`](@ref). """ -variables.spoiler_scale +variables.spoiler for vec_variable in [:gradient_strength, :slew_rate]