@@ -86,17 +86,18 @@ function waveform(bb::BaseBuildingBlock)
else
return[]
end
tol=sqrt(eps(Float64))
for(_,block)inwaveform_sequence(bb)
new_time=result[end][1]+max(duration(block),0)
prev_grad=result[end][2]
ifblockisaNoGradient
@assertall(abs.(prev_grad)<=1e-12)"$(typeof(bb)) inserts NoGradient before the gradient is zero. This is probably caused by an improper implementation of this BuildingBlock."
@assertall(abs.(prev_grad).<=1e-12)"$(typeof(bb)) inserts NoGradient before the gradient is zero. This is probably caused by an improper implementation of this BuildingBlock."
push!(result,(new_time,prev_grad))
elseifblockisaConstantGradient
@assertall(gradient_strength(block).≈prev_grad)"$(typeof(bb)) inserts ConstantGradient that does not match previous gradient strength. This is probably caused by an improper implementation of this BuildingBlock."
@assertall(isapprox.(gradient_strength(block),prev_grad,atol=tol,rtol=tol))"$(typeof(bb)) inserts ConstantGradient that does not match previous gradient strength. This is probably caused by an improper implementation of this BuildingBlock."
push!(result,(new_time,prev_grad))
elseifblockisaChangingGradient
@assertall(block.gradient_strength_start.≈prev_grad)"$(typeof(bb)) inserts ChangingGradient that does not match previous gradient strength. This is probably caused by an improper implementation of this BuildingBlock."
@assertall(isapprox.(block.gradient_strength_start,prev_grad,atol=tol,rtol=tol))"$(typeof(bb)) inserts ChangingGradient that does not match previous gradient strength. This is probably caused by an improper implementation of this BuildingBlock."