Skip to content
Snippets Groups Projects
Verified Commit 381962b0 authored by Michiel Cottaar's avatar Michiel Cottaar
Browse files

Fixed syntax errors

parent e4f2c9dd
No related branches found
No related tags found
No related merge requests found
...@@ -37,7 +37,7 @@ struct FixedGradient <: GradientBlock ...@@ -37,7 +37,7 @@ struct FixedGradient <: GradientBlock
end end
get_children_indices(fg::FixedGradient) = 1:(length(fg.time)-1) get_children_indices(fg::FixedGradient) = 1:(length(fg.time)-1)
Base.get_index(fg::FixedGradient, index::Int) = FixedChangingGradientBlock( Base.getindex(fg::FixedGradient, index::Int) = FixedChangingGradientBlock(
fg.gradient_strength[index], fg.gradient_strength[index],
fg.gradient_strength[index + 1], fg.gradient_strength[index + 1],
fg.times[index + 1] - fg.times[index], fg.times[index + 1] - fg.times[index],
......
...@@ -105,10 +105,10 @@ slew_rate(g::PulsedGradient) = isnothing(g.scaling) ? maximum(slew_rate_vec(g)) ...@@ -105,10 +105,10 @@ slew_rate(g::PulsedGradient) = isnothing(g.scaling) ? maximum(slew_rate_vec(g))
duration(g::PulsedGradient) = 2 * rise_time(g) + flat_time(g) duration(g::PulsedGradient) = 2 * rise_time(g) + flat_time(g)
get_children_indices(::PulsedGradient) = (:rise, :flat, :fall) get_children_indices(::PulsedGradient) = (:rise, :flat, :fall)
Base.get_index(pg::PulsedGradient, symbol::Symbol) = pg[Val(symbol)] Base.getindex(pg::PulsedGradient, symbol::Symbol) = pg[Val(symbol)]
Base.get_index(pg::PulsedGradient, ::Val{:rise}) = pg.rise Base.getindex(pg::PulsedGradient, ::Val{:rise}) = pg.rise
Base.get_index(pg::PulsedGradient, ::Val{:flat}) = pg.flat Base.getindex(pg::PulsedGradient, ::Val{:flat}) = pg.flat
Base.get_index(pg::PulsedGradient, ::Val{:fall}) = pg.fall Base.getindex(pg::PulsedGradient, ::Val{:fall}) = pg.fall
variables(::Type{<:PulsedGradient}) = [qval, δ, gradient_strength_vec, duration, rise_time, flat_time] variables(::Type{<:PulsedGradient}) = [qval, δ, gradient_strength_vec, duration, rise_time, flat_time]
......
module SliceSelects module SliceSelects
import JuMP: Model import JuMP: Model
import StaticArrays: SVector
import ...BuildingBlocks: RFPulseBlock, ContainerBlock, get_children_indices import ...BuildingBlocks: RFPulseBlock, ContainerBlock, get_children_indices
import ...Variables: VariableType, slice_thickness, get_free_variable, effective_time, start_time, qvec, bmat, qval, bval import ...Variables: VariableType, slice_thickness, get_free_variable, effective_time, start_time, qvec, bmat, qval, bval
import ...Variables: flip_angle, amplitude, phase, frequency, bandwidth, inverse_bandwidth, N_left, N_right import ...Variables: flip_angle, amplitude, phase, frequency, bandwidth, inverse_bandwidth, N_left, N_right
...@@ -48,7 +49,7 @@ end ...@@ -48,7 +49,7 @@ end
get_children_indices(::SliceSelect) = (:flat_before, :pulse, :flat_after) get_children_indices(::SliceSelect) = (:flat_before, :pulse, :flat_after)
Base.get_index(select::SliceSelect, index::Symbol) = getproperty(select, index) Base.getindex(select::SliceSelect, index::Symbol) = getproperty(select, index)
start_time(select::SliceSelect, symbol::Symbol) = start_time(select, Val(symbol)) start_time(select::SliceSelect, symbol::Symbol) = start_time(select, Val(symbol))
start_time(select::SliceSelect, ::Val{:flat_before}) = 0. start_time(select::SliceSelect, ::Val{:flat_before}) = 0.
......
...@@ -16,7 +16,7 @@ all_variables_symbols = [ ...@@ -16,7 +16,7 @@ all_variables_symbols = [
:inverse_bandwidth => (:pulse, "Inverse of the [`bandwidth`](@ref) of the RF pulse in ms"), :inverse_bandwidth => (:pulse, "Inverse of the [`bandwidth`](@ref) of the RF pulse in ms"),
:N_left => (:pulse, "The number of zero crossings of the RF pulse before the main peak"), :N_left => (:pulse, "The number of zero crossings of the RF pulse before the main peak"),
:N_right => (:pulse, "The number of zero crossings of the RF pulse after the main peak"), :N_right => (:pulse, "The number of zero crossings of the RF pulse after the main peak"),
:slice_thickness => (:pulse, "Slice thickness of an RF pulse that is active during a gradient.") :slice_thickness => (:pulse, "Slice thickness of an RF pulse that is active during a gradient."),
# gradients # gradients
:qvec => (:gradient, "The spatial range and orientation on which the displacements can be detected due to this gradient in 1/um (equivalent to [`area_under_curve_vec`](@ref))"), :qvec => (:gradient, "The spatial range and orientation on which the displacements can be detected due to this gradient in 1/um (equivalent to [`area_under_curve_vec`](@ref))"),
......
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