From c23cf83f8301f3498c0067ab9112ae8f5e928f7d Mon Sep 17 00:00:00 2001
From: Michiel Cottaar <michiel.cottaar@ndcn.ox.ac.uk>
Date: Wed, 14 Feb 2024 17:30:46 +0000
Subject: [PATCH] Make ADC a component

---
 src/components/readouts/ADCs.jl | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/components/readouts/ADCs.jl b/src/components/readouts/ADCs.jl
index 20db487..90f3a3e 100644
--- a/src/components/readouts/ADCs.jl
+++ b/src/components/readouts/ADCs.jl
@@ -1,13 +1,14 @@
 module ADCs
-import JuMP: @constraint, value
-import ...Variables: variables, dwell_time, duration, effective_time, get_free_variable, VariableType, nsamples, resolution, oversample, make_generic
-import ...BuildingBlocks: BuildingBlock, apply_simple_constraint!, set_simple_constraints!, fixed, make_generic
-import ...BuildSequences: global_model
+import JuMP: @constraint
+import ...AbstractTypes: ReadoutComponent
+import ....BuildSequences: global_model, fixed
+import ....Variables: oversample, nsamples, dwell_time, duration, time_to_center, effective_time, resolution, VariableType, apply_simple_constraint!, set_simple_constraints!, get_free_variable, make_generic
+
 
 """
     ADC(; center_halfway=true, oversample=1, variables...)
 
-Adds a readout event with `nsamples` readouts.
+Adds a readout event.
 
 ## Parameters
 - `center_halfway`: by default the `time_to_center` is assumed to be half of the `duration`. Set this to false to disable this assumption.
@@ -21,7 +22,7 @@ Adds a readout event with `nsamples` readouts.
 - `time_to_center`: time till the center of k-space from start of ADC in ms.
 - `effective_time`: same as `time_to_center`.
 """
-struct ADC <: BuildingBlock
+struct ADC <: ReadoutComponent
     resolution :: VariableType
     dwell_time :: VariableType
     time_to_center :: VariableType
-- 
GitLab