From 567f7ed670da11998d4c98ce191fcc915f8f1279 Mon Sep 17 00:00:00 2001
From: Olivier Sauter <olivier.sauter@epfl.ch>
Date: Thu, 6 Jun 2019 21:02:33 +0000
Subject: [PATCH] fix cxrs and test_all_requestnames.m

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@12006 d63d8f72-b253-0410-a779-e742ad2e26cf
---
 crpptbx/AUG/gdat_aug.m          | 14 ++++++++++----
 crpptbx/test_all_requestnames.m |  6 +++---
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/crpptbx/AUG/gdat_aug.m b/crpptbx/AUG/gdat_aug.m
index 1bf69261..0040c5f0 100644
--- a/crpptbx/AUG/gdat_aug.m
+++ b/crpptbx/AUG/gdat_aug.m
@@ -538,7 +538,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase')
       try
         % eval(['[r_time]=sf2ab(diag_name,shot,r_node,''-exp'',exp_name_eff' extra_arg_sf2sig_eff_string ');']);
         % both for CEZ and CMZ, and.. Ti:1 is ok, otherwise introduce string above
-        [r_time,err]=rdaAUG_eff(shot,diag_name,r_node,exp_name_eff,[],extra_arg_sf2sig_eff_string,'area-base:Ti:1');
+        [r_time,err]=rdaAUG_eff(shot,diag_name,r_node,exp_name_eff,[],extra_arg_sf2sig_eff_string,['area-base:' r_node ':1']);
       catch ME_R_time
         % assume no shotfile
         disp(getReport(ME_R_time))
@@ -550,7 +550,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase')
         gdat_data.r(inotok) = NaN;
         try
           % eval(['[z_time]=sf2ab(diag_name,shot,z_node,''-exp'',exp_name_eff' extra_arg_sf2sig_eff_string ');']);
-          [z_time,err]=rdaAUG_eff(shot,diag_name,z_node,exp_name_eff,[],extra_arg_sf2sig_eff_string,'area-base:Ti:1');
+          [z_time,err]=rdaAUG_eff(shot,diag_name,z_node,exp_name_eff,[],extra_arg_sf2sig_eff_string,['area-base:' z_node ':1']);
           gdat_data.z = z_time.data;
           inotok=find(gdat_data.z<=0);
           gdat_data.z(inotok) = NaN;
@@ -565,8 +565,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase')
       if ishotfile_ok == 1
         try
           % eval(['[time]=sf2tb(diag_name,shot,''time'',''-exp'',exp_name_eff' extra_arg_sf2sig_eff_string ');']);
-          [time,err]=rdaAUG_eff(shot,diag_name,'time',exp_name_eff,[],extra_arg_sf2sig_eff_string,'time-base:Ti:0');
-          %[time,err]=rdaAUG_eff(shot,diag_name,'time',exp_name_eff,[],extra_arg_sf2sig_eff_string,'area-base:Ti:0');
+          [time,err]=rdaAUG_eff(shot,diag_name,'time',exp_name_eff,[],extra_arg_sf2sig_eff_string,'time-base:time:0');
           gdat_data.t = time.data;
         catch ME_R_time
           disp(getReport(ME_R_time))
@@ -724,6 +723,13 @@ elseif strcmp(mapping_for_aug.method,'switchcase')
           gdat_data.rhopolnorm = rhopolnorm_out;
           gdat_data.rhotornorm = rhotornorm_out;
           gdat_data.rhovolnorm = rhovolnorm_out;
+          aaa.shot = gdat_data.shot;
+          aaa.data = gdat_data.data;
+          aaa.x = gdat_data.rhopolnorm;
+          aaa.t = gdat_data.t;
+          aaa.gdat_params = gdat_data.gdat_params;
+          aaa = get_grids_1d(aaa,2,1);
+          gdat_data.grids_1d = aaa.grids_1d;
           %
           if gdat_data.gdat_params.fit==1
             % add fits
diff --git a/crpptbx/test_all_requestnames.m b/crpptbx/test_all_requestnames.m
index 67b6df91..e295a4ef 100644
--- a/crpptbx/test_all_requestnames.m
+++ b/crpptbx/test_all_requestnames.m
@@ -86,9 +86,9 @@ for ireq = 1:Nreq
     % build request string
     if strcmp(myrequest,'transp')
       shotfile_user='PUETTI';
-      gdat_call{ireq} = sprintf(['gdat_' machine '(%d,''%s'',''doplot'',%d,''exp_name'',''%s'')'],shot,myrequest,doplot,shotfile_user);
+      gdat_call{ireq} = sprintf(['gdat_' lower(machine) '(%d,''%s'',''doplot'',%d,''exp_name'',''%s'')'],shot,myrequest,doplot,shotfile_user);
     else
-      gdat_call{ireq} = sprintf(['gdat_' machine '(%d,''%s'',''doplot'',%d)'],shot,myrequest,doplot);
+      gdat_call{ireq} = sprintf(['gdat_' lower(machine) '(%d,''%s'',''doplot'',%d)'],shot,myrequest,doplot);
     end
 
     % eval call
@@ -148,7 +148,7 @@ try
 catch ME
   err = -1;
   gdat_result.data = [];
-  rethrow(ME,'extended');
+  getReport(ME); %,'extended');
 end
 telaps = toc; % elapsed time
 
-- 
GitLab