Skip to content
Snippets Groups Projects
Unverified Commit 3ea78d24 authored by Michiel Cottaar's avatar Michiel Cottaar
Browse files

Rename `spoiler_scale` as `spoiler`

parent e0a9db0f
No related branches found
No related tags found
1 merge request!5Resolve "Allow slice selection"
......@@ -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.Δ
......
......@@ -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
......
......@@ -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
......
......@@ -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]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment