diff --git a/src/all_sequences/sequences.jl b/src/all_sequences/sequences.jl index 3abf1eea847f80b48a20a8b99f83944ce8e4115e..81062bec00c35d8b80a8611dce535c08008aaae4 100644 --- a/src/all_sequences/sequences.jl +++ b/src/all_sequences/sequences.jl @@ -2,8 +2,8 @@ module Sequences import StaticArrays: SVector import JuMP: @constraint import ...Variables: get_free_variable, TR, VariableType -import ...BuildingBlocks: WaitBlock, BuildingBlock -import ...BuildSequences: get_global_model +import ...AllBuildingBlocks: Wait, BuildingBlock +import ...BuildSequences: global_model import ...Components: EventComponent import ..BaseSequences: ContainerBlock, BaseSequence, nrepeat @@ -29,7 +29,7 @@ function Sequence(blocks::AbstractVector; TR=:min, nrepeat=0) end res = sequence(SVector{length(blocks)}(to_block.(blocks)), get_free_variable(TR), nrepeat) if !(res.TR isa Number) || !(duration(res) isa Number) - @constraint get_global_model() res.TR >= duration(res) + @constraint global_model() res.TR >= duration(res) end end @@ -41,13 +41,13 @@ Base.getindex(s::Sequence, i::Integer) = s.blocks[i] to_block(block_like) Converst object into something that can be included in the sequence: -- :min/:max/number/variable/nothing => [`WaitBlock`](@ref). +- :min/:max/number/variable/nothing => [`Wait`](@ref). - `building_block` or `sequence` => no change. - RF pulse/readout => will be embedded within a [`BuildingBlock`](@ref). """ to_block(cb::ContainerBlock) = cb to_block(s::Symbol) = to_block(Val(s)) -to_block(s::Union{VariableType, Nothing, Val{:min}, Val{:max}}) = WaitBlock(s) +to_block(s::Union{VariableType, Nothing, Val{:min}, Val{:max}}) = Wait(s) to_block(ec::EventComponent) = BuildingBlock([], [(0, ec)]; duration=duration(ec))