Skip to content

Commit

Permalink
Fixed Sequence constructor.
Browse files Browse the repository at this point in the history
  • Loading branch information
cncastillo committed Nov 13, 2023
1 parent b5650ab commit be764be
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions KomaMRICore/src/datatypes/Sequence.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ mutable struct Sequence
DUR::Vector #Duration of each block, this enables delays after RF pulses to satisfy ring-down times
DEF::Dict{String,Any} #Dictionary with information relevant to the reconstructor
#Ext::Array{Extension,1}
Sequence(GR, RF, ADC, DUR, DEF) = begin
@assert size(GR,2) .== size(RF,2) .== length(ADC) .== length(DUR) "The number of Gradient, RF, ADC, and DUR objects must be the same."
M,N = size(GR)
new([i <= M ? GR[i,j] : Grad(0, GR[1,j].T, GR[1,j].rise, GR[1,j].fall, GR[1,j].delay) for i=1:3, j=1:N],
RF,
ADC,
maximum([GR.dur RF.dur ADC.dur DUR],dims=2)[:],
DEF)
end
end

#MAIN CONSTRUCTORS
Expand Down

0 comments on commit be764be

Please sign in to comment.