From 4da45722336d6fcab874ac6873fa51f5cb043c16 Mon Sep 17 00:00:00 2001
From: Olivier Sauter <olivier.sauter@epfl.ch>
Date: Mon, 8 Feb 2021 12:25:03 +0100
Subject: [PATCH] cleanup dummy variables

---
 matlab/TCV_IMAS/ids2database.m | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/matlab/TCV_IMAS/ids2database.m b/matlab/TCV_IMAS/ids2database.m
index 312c1b7a..2d5f1853 100644
--- a/matlab/TCV_IMAS/ids2database.m
+++ b/matlab/TCV_IMAS/ids2database.m
@@ -85,14 +85,9 @@ if isempty(dummy1)
   ids_full_list = tcv_available_ids;
   warning(['IDS_list not available, quick fix introducing list of ids available for TCV: ' fprintf('%s ',ids_full_list{:}) char(10)]);
 else
-  % differentiate between ids_list and IDS_list (which or exist not sufficient)
-  [dummy2]=fileparts(dummy1);
-  try
-    [dummy3]=ls(fullfile(dummy2,'ids_list.*'));
-    ids_full_list = ids_list;
-  catch
-    ids_full_list = IDS_list;
-  end
+  % get effective function between ids_list and IDS_list (which or exist not sufficient)
+  [dummy2,ids_list_eff]=fileparts(dummy1);
+  eval(['ids_full_list = ' ids_list_eff ';']);
 end
 ids_names_notok = setdiff(ids_names,ids_full_list);
 if ~isempty(ids_names_notok)
-- 
GitLab