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

Fix more links

parent 27f83afe
No related branches found
No related tags found
No related merge requests found
Pipeline #23956 failed
...@@ -80,7 +80,7 @@ Here the coherence [`Pathway`](@ref) sets out what a specific set of spins might ...@@ -80,7 +80,7 @@ Here the coherence [`Pathway`](@ref) sets out what a specific set of spins might
In this case the sequence experiences two RF pulses and is excited by the first pulse and flipped by the second (`[90, 180]`). In this case the sequence experiences two RF pulses and is excited by the first pulse and flipped by the second (`[90, 180]`).
It is then observed during the first readout (`1`). It is then observed during the first readout (`1`).
For such a [`Pathway`](@ref) we can compute: For such a [`Pathway`](@ref) we can compute:
- the time that the spin spends in any direction ([`duration_state`](@ref)), which is particularly useful in the transverse direction to compute the amount of T2-weighting ([`duration_transverse`](@ref)) and the amount of time spent dephasing to compute the amount of T2*-weighting ([`duration_dephase`](@ref)). - the time that the spin spends in each longitudinal and transverse direction, which is particularly useful in the transverse direction to compute the amount of T2-weighting ([`duration_transverse`](@ref)) and the amount of time spent dephasing to compute the amount of T2*-weighting ([`duration_dephase`](@ref)).
- the diffusion weighting experienced ([`bval`](@ref), [`bmat`](@ref), and [`qvec`](@ref)) - the diffusion weighting experienced ([`bval`](@ref), [`bmat`](@ref), and [`qvec`](@ref))
By defining a default pathway for the sequence, the user can now put constraints on any or all of these variables. By defining a default pathway for the sequence, the user can now put constraints on any or all of these variables.
......
...@@ -105,6 +105,13 @@ end ...@@ -105,6 +105,13 @@ end
build_sequence(f::Function, optimiser_constructor; kwargs...) = build_sequence(f, Default_Scanner, optimiser_constructor; kwargs...) build_sequence(f::Function, optimiser_constructor; kwargs...) = build_sequence(f, Default_Scanner, optimiser_constructor; kwargs...)
"""
global_model()
Return the currently set JuMP model.
The model can be set using [`build_sequence`](@ref)
"""
function global_model() function global_model()
if GLOBAL_MODEL[] == IGNORE_MODEL if GLOBAL_MODEL[] == IGNORE_MODEL
error("No global model has been set. Please embed any sequence creation within an `build_sequence` block.") error("No global model has been set. Please embed any sequence creation within an `build_sequence` block.")
...@@ -112,6 +119,13 @@ function global_model() ...@@ -112,6 +119,13 @@ function global_model()
return GLOBAL_MODEL[] return GLOBAL_MODEL[]
end end
"""
global_scanner()
Return the currently set [`Scanner`](@ref).
The scanner can be set using [`build_sequence`](@ref)
"""
function global_scanner() function global_scanner()
if !isfinite(GLOBAL_SCANNER[].gradient) if !isfinite(GLOBAL_SCANNER[].gradient)
error("No valid scanner has been set. Please provide one when calling `build_sequence`.") error("No valid scanner has been set. Please provide one when calling `build_sequence`.")
...@@ -123,8 +137,9 @@ end ...@@ -123,8 +137,9 @@ end
""" """
fixed(building_block) fixed(building_block)
Returns an equiavalent [`BuildingBlock`](@ref) with all free variables replaced by numbers. Return an equiavalent `BuildingBlock` with all free variables replaced by numbers.
This will only work after calling [`optimize!`](@ref)([`global_model`](@ref)()).
This will only work after calling `optimize!`(@ref)([`global_model`](@ref)()).
It is used internally by [`build_sequence`](@ref). It is used internally by [`build_sequence`](@ref).
""" """
fixed(some_value) = some_value fixed(some_value) = some_value
......
...@@ -5,7 +5,7 @@ import ..Trapezoids: Trapezoid, opposite_kspace_lines, SliceSelect ...@@ -5,7 +5,7 @@ import ..Trapezoids: Trapezoid, opposite_kspace_lines, SliceSelect
import ..SpoiltSliceSelects: SpoiltSliceSelect import ..SpoiltSliceSelects: SpoiltSliceSelect
import ..SliceSelectRephases: SliceSelectRephase import ..SliceSelectRephases: SliceSelectRephase
import ..EPIReadouts: EPIReadout import ..EPIReadouts: EPIReadout
import ...BuildSequences: global_model, build_sequence import ...BuildSequences: global_model, build_sequence, global_scanner
import ...Containers: Sequence import ...Containers: Sequence
import ...Components: SincPulse, ConstantPulse, InstantPulse, SingleReadout, InstantGradient import ...Components: SincPulse, ConstantPulse, InstantPulse, SingleReadout, InstantGradient
import ...Variables: qvec, flat_time, rise_time, qval, apply_simple_constraint!, variables import ...Variables: qvec, flat_time, rise_time, qval, apply_simple_constraint!, variables
......
...@@ -42,8 +42,8 @@ Over the pathway the following values are computed. Each can be accessed by call ...@@ -42,8 +42,8 @@ Over the pathway the following values are computed. Each can be accessed by call
The area under curve, q-values, and b-values are computed separately for each group of gradients (depending on the `group` keyword set during construction). The area under curve, q-values, and b-values are computed separately for each group of gradients (depending on the `group` keyword set during construction).
- [`qvec`](@ref): Net displacement vector in k-space/q-space. - [`qvec`](@ref): Net displacement vector in k-space/q-space.
- [`qval`](@ref)/[`area_under_curve`](@ref): size of the displacement in k-space/q-space. For a spoiled pathway, this should be large compared with 1/voxel size; for unspoiled pathways it should be (close to) zero. - [`qval`](@ref)/[`area_under_curve`](@ref): size of the displacement in k-space/q-space. For a spoiled pathway, this should be large compared with 1/voxel size; for unspoiled pathways it should be (close to) zero.
- [`bmat`](@ref): Net diffusion weighting due to gradients along the [`Pathway`](@ref) in matrix form. - [`bmat`](@ref): Net diffusion weighting due to gradients along the `Pathway` in matrix form.
- [`bval`](@ref): Net diffusion weighting due to gradients along the [`Pathway`](@ref) as a single number. - [`bval`](@ref): Net diffusion weighting due to gradients along the `Pathway` as a single number.
""" """
struct Pathway struct Pathway
# user provided # user provided
...@@ -237,7 +237,7 @@ end ...@@ -237,7 +237,7 @@ end
""" """
Helper structure for [`PathwayWalker`](@ref), which is itself a helper for `Pathway`. You are deep down the rabit hole now... Helper structure for [`PathwayWalker`](@ref), which is itself a helper for `Pathway`. You are deep down the rabit hole now...
For documentation, see that structure and [`walk_pathway`](@ref) and [`update_walker_gradient!`](@ref). For documentation, see that structure and [`walk_pathway!`](@ref) and [`update_walker_gradient!`](@ref).
""" """
mutable struct GradientTracker mutable struct GradientTracker
last_gradient_time :: VariableType last_gradient_time :: VariableType
...@@ -251,7 +251,7 @@ GradientTracker() = GradientTracker(0., zeros(3), zeros(3, 3)) ...@@ -251,7 +251,7 @@ GradientTracker() = GradientTracker(0., zeros(3), zeros(3, 3))
""" """
Helper structure for `Pathway`. Helper structure for `Pathway`.
For documentation, see that structure and [`walk_pathway`](@ref). For documentation, see that structure and [`walk_pathway!`](@ref).
""" """
mutable struct PathwayWalker mutable struct PathwayWalker
last_pulse_time :: VariableType last_pulse_time :: VariableType
......
...@@ -6,8 +6,8 @@ In addition this defines: ...@@ -6,8 +6,8 @@ In addition this defines:
- [`VariableType`](@ref): parent type for any variables (whether number or JuMP variable). - [`VariableType`](@ref): parent type for any variables (whether number or JuMP variable).
- [`get_free_variable`](@ref): helper function to create new JuMP variables. - [`get_free_variable`](@ref): helper function to create new JuMP variables.
- [`VariableNotAvailable`](@ref): error raised if variable is not defined for specific [`AbstractBlock`](@ref). - [`VariableNotAvailable`](@ref): error raised if variable is not defined for specific [`AbstractBlock`](@ref).
- [`set_simple_constraints`](@ref): call [`apply_simple_constraint`](@ref) for each keyword argument. - [`set_simple_constraints!`](@ref): call [`apply_simple_constraint!`](@ref) for each keyword argument.
- [`apply_simple_constraint`](@ref): set a simple equality constraint. - [`apply_simple_constraint!`](@ref): set a simple equality constraint.
- [`get_pulse`](@ref)/[`get_gradient`](@ref)/[`get_readout`](@ref): Used to get the pulse/gradient/readout part of a building block - [`get_pulse`](@ref)/[`get_gradient`](@ref)/[`get_readout`](@ref): Used to get the pulse/gradient/readout part of a building block
- [`gradient_orientation`](@ref): returns the gradient orientation of a waveform if fixed. - [`gradient_orientation`](@ref): returns the gradient orientation of a waveform if fixed.
""" """
...@@ -36,7 +36,7 @@ end ...@@ -36,7 +36,7 @@ end
Returns the adjusted blocks and add any keywords used in the process to `names_used`. Returns the adjusted blocks and add any keywords used in the process to `names_used`.
This is a helper function used by [`adjust`](@ref). This is a helper function used by `adjust`.
""" """
function adjust_internal end function adjust_internal end
......
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