Add InstantPulse and InstantGradient pulseq extension support
Compare changes
Files
13+ 21
− 8
@@ -92,10 +92,18 @@ The gradient is linearly interpolated between these points (see [`waveform_seque
@@ -92,10 +92,18 @@ The gradient is linearly interpolated between these points (see [`waveform_seque
@@ -116,7 +124,6 @@ function waveform(bb::BaseBuildingBlock)
@@ -116,7 +124,6 @@ function waveform(bb::BaseBuildingBlock)
@assert all(abs.(result[end][2]) .<= 1e-12) "$(typeof(bb)) does not end up with a gradient of zero. This is probably caused by an improper implementation of this BuildingBlock."
@@ -142,7 +149,7 @@ function start_time(building_block::BaseBuildingBlock, index)
@@ -142,7 +149,7 @@ function start_time(building_block::BaseBuildingBlock, index)
@defvar duration(bb::BaseBuildingBlock) = sum([variables.duration(wv) for (_, wv) in waveform_sequence(bb)])
@@ -319,7 +326,7 @@ function BuildingBlock(waveform::AbstractVector, events::AbstractVector; orienta
@@ -319,7 +326,7 @@ function BuildingBlock(waveform::AbstractVector, events::AbstractVector; orienta
for (index_grad, ((prev_time, prev_grad), (time, grad))) in enumerate(zip(waveform[1:end-1], waveform[2:end]))
@@ -328,15 +335,21 @@ function BuildingBlock(waveform::AbstractVector, events::AbstractVector; orienta
@@ -328,15 +335,21 @@ function BuildingBlock(waveform::AbstractVector, events::AbstractVector; orienta
push!(components, ChangingGradient(prev_grad, (grad .- prev_grad) ./ duration, orientation, duration, group))