From 8820b48c7a8ce67357b9650357ae88b3e2be5d20 Mon Sep 17 00:00:00 2001
From: Antonia Frank <antonia.frank@epfl.ch>
Date: Mon, 24 Jun 2024 09:12:23 +0200
Subject: [PATCH] Correct if statement to check only if ec_inputs is loaded

---
 matlab/TCV/gdat_tcv.m | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/matlab/TCV/gdat_tcv.m b/matlab/TCV/gdat_tcv.m
index b4ea798d..a8e5916b 100644
--- a/matlab/TCV/gdat_tcv.m
+++ b/matlab/TCV/gdat_tcv.m
@@ -1758,10 +1758,12 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
           getReport(ME) % without ; to get output
           % try to identify cause of the error
           if ~check_nodes_filled(shot,'toray')
-            if ~isempty(ec_inputs.launchers_active) && ~any(ec_inputs.launchers_active.data,1)
-              msg = 'write_pyro(shot) found NO active launchers, maybe there was no EC in this shot?';
-            else
-              msg = 'write_pyro(shot) found active launchers, but TORAY nodes are no filled, check hldsi(shot), and (ask to) relaunch TORAY.';
+            if ~isempty(ec_inputs.launchers_active)
+              if ~any(ec_inputs.launchers_active.data,1)
+                msg = 'write_pyro(shot) found NO active launchers, maybe there was no EC in this shot?';
+              else
+                msg = 'write_pyro(shot) found active launchers, but TORAY nodes are not filled, check hldsi(shot), and (ask to) relaunch TORAY.';
+              end
             end
           elseif ~isempty(gdat_data.gdat_params.trialindx)
             msg = 'Is the trial index filled? Check TORAY nodes with hdlsi(shot).';
-- 
GitLab