From 634ef405b18d735b379bfb055079808b87fcf6ab Mon Sep 17 00:00:00 2001 From: Olivier Sauter <olivier.sauter@epfl.ch> Date: Mon, 8 Feb 2021 11:45:23 +0100 Subject: [PATCH] force case sensitive check if IDS_list exists --- matlab/TCV_IMAS/ids2database.m | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/matlab/TCV_IMAS/ids2database.m b/matlab/TCV_IMAS/ids2database.m index c7d4a061..452eaff1 100644 --- a/matlab/TCV_IMAS/ids2database.m +++ b/matlab/TCV_IMAS/ids2database.m @@ -78,18 +78,22 @@ if any(mask), end params_ids2database = params; - +keyboard % check ids_names ids_names=fieldnames(ids2put); -try - if exist('IDS_list') - ids_full_list = IDS_list; - else - ids_full_list = ids_list; - end -catch +[a1,a2]=which('ids_list'); +if isempty(a1) 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) + [b1,b2,b3]=fileparts(a1); + try + [c2]=ls(fullfile(b1,'ids_list.*')); + ids_full_list = ids_list; + catch + ids_full_list = IDS_list; + end end ids_names_notok = setdiff(ids_names,ids_full_list); if ~isempty(ids_names_notok) -- GitLab