From 2f9b35bc9218a5abbf38332b500e4ae6920c5714 Mon Sep 17 00:00:00 2001
From: Michiel Cottaar <michiel.cottaar@ndcn.ox.ac.uk>
Date: Wed, 31 Jan 2024 17:12:05 +0000
Subject: [PATCH] Remove references to fixed gradients

---
 src/MRIBuilder.jl                  |  4 ++--
 src/gradients/gradients.jl         | 12 +++---------
 src/gradients/instant_gradients.jl |  1 -
 src/variables.jl                   |  2 +-
 src/waveforms/pulsed_gradients.jl  | 13 -------------
 5 files changed, 6 insertions(+), 26 deletions(-)

diff --git a/src/MRIBuilder.jl b/src/MRIBuilder.jl
index b74845d..4e7aed3 100644
--- a/src/MRIBuilder.jl
+++ b/src/MRIBuilder.jl
@@ -32,8 +32,8 @@ export WaitBlock
 import .Pulses: InstantRFPulseBlock, ConstantPulse, SincPulse, FixedPulse
 export InstantRFPulseBlock, ConstantPulse, SincPulse, FixedPulse
 
-import .Gradients: PulsedGradient, InstantGradientBlock, FixedGradient
-export PulsedGradient, InstantGradientBlock, FixedGradient
+import .Gradients: PulsedGradient, InstantGradientBlock
+export PulsedGradient, InstantGradientBlock
 
 import .Readouts: InstantReadout
 export InstantReadout
diff --git a/src/gradients/gradients.jl b/src/gradients/gradients.jl
index 9a16a9c..e9a980d 100644
--- a/src/gradients/gradients.jl
+++ b/src/gradients/gradients.jl
@@ -10,22 +10,16 @@ All other gradient profiles are made up of [`ChangingGradientBlock`](@ref) and [
 They are still included here for clarity:
 - [`PulsedGradient`](@ref)
 - [`GradientWaveform`](@ref)
-- [`FixedGradient`](@ref)
 """
 module Gradients
 
 include("changing_gradient_blocks.jl")
 include("constant_gradient_blocks.jl")
-include("slice_selects.jl")
-
-#include("integrate_gradients.jl")
-include("fixed_gradients.jl")
-include("pulsed_gradients.jl")
 include("instant_gradients.jl")
 
-import ..BuildingBlocks: GradientBlock
 
-import .PulsedGradients: PulsedGradient
+import ..BuildingBlocks: GradientBlock
+import .ChangingGradientBlocks: ChangingGradientBlock
+import .ConstantGradientBlocks: ConstantGradientBlock
 import .InstantGradients: InstantGradientBlock
-import .FixedGradients: FixedGradient
 end
\ No newline at end of file
diff --git a/src/gradients/instant_gradients.jl b/src/gradients/instant_gradients.jl
index 9b1222b..1586625 100644
--- a/src/gradients/instant_gradients.jl
+++ b/src/gradients/instant_gradients.jl
@@ -4,7 +4,6 @@ import JuMP: @constraint, @variable, Model, owner_model, AbstractJuMPScalar
 import ...Variables: qvec, bmat_gradient, duration, variables, get_free_variable, VariableType
 import ...BuildingBlocks: GradientBlock, fixed
 import ...BuildSequences: @global_model_constructor
-import ..FixedGradients: FixedInstantGradient
 
 """
     InstantGradientBlock(; orientation=nothing, qval=nothing, qvec=nothing, rotate=nothing, scale=nothing)
diff --git a/src/variables.jl b/src/variables.jl
index 4b6b9d0..afdc423 100644
--- a/src/variables.jl
+++ b/src/variables.jl
@@ -12,7 +12,7 @@ all_variables_symbols = [
 
     :pulse => [
         :flip_angle => "The flip angle of the RF pulse in degrees",
-        :amplitude => "The maximum amplitude of an RF pulse in kHz"
+        :amplitude => "The maximum amplitude of an RF pulse in kHz",
         :phase => "The angle of the phase of an RF pulse in KHz",
         :frequency => "The off-resonance frequency of an RF pulse (relative to the Larmor frequency of water) in KHz",
         :bandwidth => "Bandwidth of the RF pulse in kHz. If you are going to divide by the bandwidth, it can be more efficient to use the [`inverse_bandwidth`](@ref).",
diff --git a/src/waveforms/pulsed_gradients.jl b/src/waveforms/pulsed_gradients.jl
index 4f719dd..a627164 100644
--- a/src/waveforms/pulsed_gradients.jl
+++ b/src/waveforms/pulsed_gradients.jl
@@ -9,7 +9,6 @@ import ...Variables: qvec, rise_time, flat_time, slew_rate, gradient_strength, v
 import ...BuildingBlocks: duration, set_simple_constraints!, fixed
 import ...BuildSequences: @global_model_constructor
 import ..Generic: GenericWaveform
-import ..FixedGradients: FixedGradient
 import ..ChangingGradientBlocks: ChangingGradientBlock
 import ..ConstantGradientBlocks: ConstantGradientBlock
 
@@ -140,16 +139,4 @@ start_time(pg::TrapezoidGradient, ::Val{:fall}) = δ(pg)
 variables(::Type{<:TrapezoidGradient}) = [qval, δ, gradient_strength, duration, rise_time, flat_time]
 
 
-function fixed(block::TrapezoidGradient)
-    grad = value.(gradient_strength(block))
-    t_rise = value(rise_time(block))
-    t_d = value(δ(block))
-    return FixedGradient(
-        [0., t_rise, t_d, td + t_rise],
-        [zeros(3), grad, grad, zeros(3)]; 
-        rotate=rotate
-    )
-end
-
-
 end
\ No newline at end of file
-- 
GitLab