From e8bfd4fa78a793788f1a850db22ad30f47700211 Mon Sep 17 00:00:00 2001
From: Michiel Cottaar <michiel.cottaar@ndcn.ox.ac.uk>
Date: Mon, 29 Jan 2024 14:53:22 +0000
Subject: [PATCH] Fix constraints on flat and rise time

---
 src/gradients/pulsed_gradients.jl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gradients/pulsed_gradients.jl b/src/gradients/pulsed_gradients.jl
index bf66128..afcc1f3 100644
--- a/src/gradients/pulsed_gradients.jl
+++ b/src/gradients/pulsed_gradients.jl
@@ -91,8 +91,8 @@ function PulsedGradient(model::Model; orientation=nothing, rise_time=nothing, fl
     )
 
     set_simple_constraints!(model, res, kwargs)
-    @constraint model res.flat_time >= 0
-    @constraint model res.rise_time >= 0
+    @constraint model flat_time >= 0
+    @constraint model rise_time >= 0
     return res
 end
 
-- 
GitLab