From 361e78bd5dfb7041a25293d9a56e85977a58e57b Mon Sep 17 00:00:00 2001
From: Olivier Sauter <olivier.sauter@epfl.ch>
Date: Mon, 10 Jul 2017 13:25:35 +0000
Subject: [PATCH] change timedim for contour related quantities

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

diff --git a/crpptbx/TCV/tcv_requests_mapping.m b/crpptbx/TCV/tcv_requests_mapping.m
index d3a51762..ae6fcc1f 100644
--- a/crpptbx/TCV/tcv_requests_mapping.m
+++ b/crpptbx/TCV/tcv_requests_mapping.m
@@ -205,7 +205,7 @@ switch lower(data_request)
                     'params_eff.data_request=''a_minor'';' ...
 		    'gdat_tmp3=gdat_tcv(shot,params_eff);ij=find(gdat_tmp3.data==0);gdat_tmp3.data(ij)=NaN;' ...
 		    'tmp_data3=interp1(gdat_tmp3.t,gdat_tmp3.data,gdat_tmp.t,[],NaN);' ...
-		    'gdat_tmp.data = tmp_data2*1e-6./pi./(tmp_data3.^2+1e-5);' ...
+		    'gdat_tmp.data = abs(tmp_data2*1e-6./pi./(tmp_data3.^2+1e-5));' ...
 		    'ij=find(gdat_tmp.data<0 | gdat_tmp.data>4);gdat_tmp.data(ij)=NaN;gdat_tmp.data = gdat_tmp.data * 1e20;'];
  case {'ngf','greenwald_fraction','f_greenwald','ng_fraction'}
   mapping.timedim = 1;
@@ -265,13 +265,13 @@ switch lower(data_request)
   mapping.label = 'q';
   mapping.method = 'switchcase';
  case 'r_contour'
-  mapping.timedim = 1;
+  mapping.timedim = 2;
   mapping.method = 'tdiliuqe';
   mapping.expression = '\results::r_contour';
   mapping.expression = '\tcv_shot::top.results.equil_1.results:r_rho'; % several flux surfaces R coordinates (irho,itheta,t)
   mapping.expression = 'tcv_eq(''''r_rho'''',''''LIUQE.M'''')';
  case 'r_contour_edge'
-  mapping.timedim = 1;
+  mapping.timedim = 2;
   mapping.method = 'tdiliuqe';
   mapping.expression = '\results::r_contour';
   mapping.expression = '\tcv_shot::top.results.equil_1.results:r_surf'; % LCFS R coordinates (r,t)
@@ -358,13 +358,13 @@ switch lower(data_request)
   mapping.expression = '\tcv_shot::top.results.equil_1.results:w_mhd';
   mapping.expression = 'tcv_eq(''''w_mhd'''',''''LIUQE.M'''')';
  case 'z_contour'
-  mapping.timedim = 1;
+  mapping.timedim = 2;
   mapping.method = 'tdiliuqe';
   mapping.expression = '\results::z_contour';
   mapping.expression = '\tcv_shot::top.results.equil_1.results:z_rho'; % several flux surfaces Z coordinates (irho,itheta,t)
   mapping.expression = 'tcv_eq(''''z_rho'''',''''LIUQE.M'''')';
  case 'z_contour_edge'
-  mapping.timedim = 1;
+  mapping.timedim = 2;
   mapping.method = 'tdiliuqe';
   mapping.expression = '\results::z_contour';
   mapping.expression = '\tcv_shot::top.results.equil_1.results:z_surf'; % LCFS Z coordinates (r,t)
-- 
GitLab