From f85dd7a54d0e046ff41d6d999f2c78d86f347ea0 Mon Sep 17 00:00:00 2001
From: Olivier Sauter <olivier.sauter@epfl.ch>
Date: Tue, 26 Aug 2014 12:51:03 +0000
Subject: [PATCH] rm setting z-ece=1 when having problem with data, now ece_rho
 should be correct

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@4523 d63d8f72-b253-0410-a779-e742ad2e26cf
---
 crpptbx/AUG/loadAUGdata.m | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/crpptbx/AUG/loadAUGdata.m b/crpptbx/AUG/loadAUGdata.m
index 3887eb8a..9d03424f 100644
--- a/crpptbx/AUG/loadAUGdata.m
+++ b/crpptbx/AUG/loadAUGdata.m
@@ -775,10 +775,11 @@ switch AUGkeywrdcase{index}
     catch
     end
     try
-      % [aZ,e]=rdaAUG_eff(shot,ppftype,'z-A',shotfile_exp_eff,timerange); (problem now)
-      aZ=aR;
-      aZ.data=ones(size(aR.data));
+      [aZ,e]=rdaAUG_eff(shot,ppftype,'z-A',shotfile_exp_eff,timerange); % (problem now)
+      %aZ=aR;
+      %aZ.data=ones(size(aR.data));
     catch
+      disp(['problem with getting z-A in ' ppftype])
     end
     domatchRtime=0;
     if domatchRtime
@@ -824,7 +825,7 @@ switch AUGkeywrdcase{index}
 	    zout=trace.Z.data(iok,it_ece_inequil);
 	    psi_at_routzout = interpos2Dcartesian(rr,zz,psirz_in,rout,zout);
 	    psi_out(iok,it_ece_inequil) = reshape(psi_at_routzout,length(iok),length(it_ece_inequil));
-	    rhopsinorm_out(iok,it_ece_inequil) = sqrt((psi_out(iok,it_ece_inequil)-equil.psi_axis(itequil))./(equil.psi_lcfs(itequil)-equil.psi_axis(itequil)));
+	    rhopsinorm_out(iok,it_ece_inequil) = sqrt(abs((psi_out(iok,it_ece_inequil)-equil.psi_axis(itequil))./(equil.psi_lcfs(itequil)-equil.psi_axis(itequil))));
 	    for it_cx=1:length(it_ece_inequil)
 	      rhotornorm_out(iok,it_ece_inequil(it_cx)) = interpos(equil.rhopolnorm(:,itequil),equil.rhotornorm(:,itequil),rhopsinorm_out(iok,it_ece_inequil(it_cx)),-3,[2 2],[0 1]);
 	      rhovolnorm_out(iok,it_ece_inequil(it_cx)) = interpos(equil.rhopolnorm(:,itequil),equil.rhovolnorm(:,itequil),rhopsinorm_out(iok,it_ece_inequil(it_cx)),-3,[2 2],[0 1]);
-- 
GitLab