From 888d93bc314ab6ba59bf4b6f5f7d37c67be7613b Mon Sep 17 00:00:00 2001
From: Michiel Cottaar <michiel.cottaar@ndcn.ox.ac.uk>
Date: Sat, 27 Jan 2024 18:49:39 +0000
Subject: [PATCH] Remove outdated concrete blocks

---
 src/MRIBuilder.jl                  | 4 ----
 src/gradients/gradients.jl         | 2 --
 src/gradients/instant_gradients.jl | 1 -
 src/gradients/pulsed_gradients.jl  | 1 -
 src/pulses/constant_pulses.jl      | 1 -
 src/pulses/instant_pulses.jl       | 1 -
 src/pulses/sinc_pulses.jl          | 1 -
 src/readouts/instant_readouts.jl   | 7 +++----
 src/wait.jl                        | 3 ---
 9 files changed, 3 insertions(+), 18 deletions(-)

diff --git a/src/MRIBuilder.jl b/src/MRIBuilder.jl
index 09a90fc..ed1d690 100644
--- a/src/MRIBuilder.jl
+++ b/src/MRIBuilder.jl
@@ -7,7 +7,6 @@ include("build_sequences.jl")
 include("scanners.jl")
 include("variables.jl")
 include("building_blocks.jl")
-include("concrete_blocks.jl")
 include("wait.jl")
 include("containers/containers.jl")
 include("gradients/gradients.jl")
@@ -26,9 +25,6 @@ export variables, duration, start_time, end_time, flip_angle, amplitude, phase,
 import .BuildingBlocks: BuildingBlock, fixed
 export BuildingBlocks, fixed
 
-import .ConcreteBlocks: ConcreteBlock, AbstractConcreteBlock
-export ConcreteBlocks, AbstractConcreteBlock
-
 import .Wait: WaitBlock
 export WaitBlock
 
diff --git a/src/gradients/gradients.jl b/src/gradients/gradients.jl
index bdffe1d..dfa1105 100644
--- a/src/gradients/gradients.jl
+++ b/src/gradients/gradients.jl
@@ -4,8 +4,6 @@ Module defining sub-types of the [`GradientBlock`](@ref), i.e., any [`BuildingBl
 - [`PulsedGradient`](@ref)
 - [`InstantGradientBlock`](@ref)
 - [`FixedGradient`](@ref)
-
-Arbitrary gradient waveforms can be store din a [`ConcreteBlock`](@ref)
 """
 module Gradients
 include("integrate_gradients.jl")
diff --git a/src/gradients/instant_gradients.jl b/src/gradients/instant_gradients.jl
index 7b9641c..435a633 100644
--- a/src/gradients/instant_gradients.jl
+++ b/src/gradients/instant_gradients.jl
@@ -2,7 +2,6 @@ module InstantGradients
 import JuMP: @constraint, @variable, Model, owner_model
 import ...Variables: qval, bval, start_time, duration, variables, get_free_variable, VariableType
 import ...BuildingBlocks: GradientBlock, fixed
-import ...ConcreteBlocks: to_concrete_block, AbstractConcreteBlock
 import ...BuildSequences: @global_model_constructor
 import ..FixedGradients: FixedInstantGradient
 
diff --git a/src/gradients/pulsed_gradients.jl b/src/gradients/pulsed_gradients.jl
index 5e34a45..1f5a846 100644
--- a/src/gradients/pulsed_gradients.jl
+++ b/src/gradients/pulsed_gradients.jl
@@ -7,7 +7,6 @@ import JuMP: @constraint, @variable, Model, VariableRef, owner_model, value
 import StaticArrays: SVector
 import ...Variables: qval, bval, rise_time, flat_time, slew_rate, gradient_strength, variables, duration, δ, get_free_variable, VariableType
 import ...BuildingBlocks: GradientBlock, duration, set_simple_constraints!, fixed
-import ...ConcreteBlocks: ConcreteBlock, to_concrete_block
 import ...BuildSequences: @global_model_constructor
 import ..FixedGradients: FixedGradient
 
diff --git a/src/pulses/constant_pulses.jl b/src/pulses/constant_pulses.jl
index 15b40f3..6e5625c 100644
--- a/src/pulses/constant_pulses.jl
+++ b/src/pulses/constant_pulses.jl
@@ -1,7 +1,6 @@
 module ConstantPulses
 import JuMP: VariableRef, @constraint, @variable, value, Model
 import ...BuildingBlocks: RFPulseBlock, set_simple_constraints!, fixed
-import ...ConcreteBlocks: ConcreteBlock, to_concrete_block
 import ...Variables: variables, get_free_variable, flip_angle, phase, amplitude, frequency, bandwidth, start_time, end_time, VariableType, duration
 import ...BuildSequences: @global_model_constructor
 import ..FixedPulses: FixedPulse
diff --git a/src/pulses/instant_pulses.jl b/src/pulses/instant_pulses.jl
index 8a19599..9390d5f 100644
--- a/src/pulses/instant_pulses.jl
+++ b/src/pulses/instant_pulses.jl
@@ -1,7 +1,6 @@
 module InstantPulses
 import JuMP: @constraint, @variable, VariableRef, value, Model
 import ...BuildingBlocks: RFPulseBlock, fixed
-import ...ConcreteBlocks: to_concrete_block, AbstractConcreteBlock
 import ...Variables: flip_angle, phase, start_time, variables, duration, get_free_variable, VariableType
 import ...BuildSequences: @global_model_constructor
 import ..FixedPulses: FixedInstantPulse
diff --git a/src/pulses/sinc_pulses.jl b/src/pulses/sinc_pulses.jl
index 78384f4..c771a48 100644
--- a/src/pulses/sinc_pulses.jl
+++ b/src/pulses/sinc_pulses.jl
@@ -4,7 +4,6 @@ import JuMP: VariableRef, @constraint, @variable, value, Model
 import QuadGK: quadgk
 import Polynomials: fit, Polynomial
 import ...BuildingBlocks: RFPulseBlock, set_simple_constraints!, fixed
-import ...ConcreteBlocks: ConcreteBlock, to_concrete_block
 import ...Variables: flip_angle, phase, amplitude, frequency, bandwidth, VariableType, variables, get_free_variable, duration
 import ...BuildSequences: @global_model_constructor
 import ..FixedPulses: FixedPulse
diff --git a/src/readouts/instant_readouts.jl b/src/readouts/instant_readouts.jl
index 56727f5..0951ee0 100644
--- a/src/readouts/instant_readouts.jl
+++ b/src/readouts/instant_readouts.jl
@@ -1,6 +1,5 @@
 module InstantReadouts
-import ...BuildingBlocks: BuildingBlock, to_block
-import ...ConcreteBlocks: AbstractConcreteBlock, to_concrete_block
+import ...BuildingBlocks: BuildingBlock, to_block, fixed
 import ...Variables: variables
 
 """
@@ -10,10 +9,10 @@ Represents an instantaneous `Readout` of the signal.
 
 It has no parameters or properties to set.
 """
-struct InstantReadout <: AbstractConcreteBlock
+struct InstantReadout <: BuildingBlock
 end
 
 variables(::Type{<:InstantReadout}) = []
-to_concrete_block(::InstantReadout) = InstantReadout()
 to_block(::Type{<:InstantReadout}) = InstantReadout()
+fixed(i::InstantReadout) = i
 end
\ No newline at end of file
diff --git a/src/wait.jl b/src/wait.jl
index f524116..abffc4d 100644
--- a/src/wait.jl
+++ b/src/wait.jl
@@ -2,7 +2,6 @@ module Wait
 import JuMP: Model, @constraint, @variable, VariableRef, owner_model, value
 import ..Variables: VariableType, variables, duration, get_free_variable
 import ..BuildingBlocks: BuildingBlock, to_block
-import ..ConcreteBlocks: to_concrete_block, ConcreteBlock
 import ..BuildSequences: @global_model_constructor
 import ...Scanners: Scanner
 
@@ -48,6 +47,4 @@ variables(::Type{WaitBlock}) = [duration]
 
 duration(wb::WaitBlock) = wb.duration
 
-to_concrete_block(wb::WaitBlock) = ConcreteBlock(value(duration(wb)))
-
 end
\ No newline at end of file
-- 
GitLab