From bfaeccde9111f1b3f7933ea3777bee53ce579580 Mon Sep 17 00:00:00 2001
From: Olivier Sauter <Olivier.Sauter@epfl.ch>
Date: Tue, 12 Jul 2022 09:50:54 +0200
Subject: [PATCH] improve variable names

---
 matlab/AUG/aug_requests_mapping.m | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/matlab/AUG/aug_requests_mapping.m b/matlab/AUG/aug_requests_mapping.m
index c755d4ba..26360b67 100644
--- a/matlab/AUG/aug_requests_mapping.m
+++ b/matlab/AUG/aug_requests_mapping.m
@@ -25,7 +25,7 @@ mapping.label = data_request;
 % for AUG, following choices are set so far:
 % method = 'signal' then expression contains the shotfile, diagnostic and if needed the experiment
 %                expression is a cell array
-% method = 'expression', then expression is the expression to return gdat_tmp...
+% method = 'expression', then expression is executed and it should provide the structure gdat_tmp, which fields are copied to gdat_data
 % method = 'switchcase', then there will be a specific case within gdat_aug (usual case when not directly a signal)
 %
 % label is used for plotting
@@ -187,11 +187,12 @@ switch lower(data_request)
   mapping.label = 'li3';
   mapping.method = 'expression';
   mapping.expression = ['params_eff = gdat_data.gdat_params;params_eff.data_request=''li'';' ...
-                    'gdat_tmp=gdat_aug(shot,params_eff);params_eff.data_request=''volume'';r0exp=1.65;gdat_tmp.r0=r0exp;' ...
-                    'gdat_tmp2=gdat_aug(shot,params_eff);ij=find(gdat_tmp2.data==0);gdat_tmp2.data(ij)=NaN;' ...
+                    'gdat_tmp=gdat_aug(shot,params_eff);r0exp=1.65;gdat_tmp.r0=r0exp;' ...
+                    'params_eff.data_request=''volume'';' ...
+                    'gdat_vol=gdat_aug(shot,params_eff);ij=find(gdat_vol.data==0);gdat_vol.data(ij)=NaN;' ...
                     'params_eff.data_request=[{''FPG''},{''Circumf''}];' ...
-                    'gdat_tmp3=gdat_aug(shot,params_eff);ij=find(gdat_tmp3.data==0);gdat_tmp3.data(ij)=NaN;' ...
-                    'gdat_tmp.conversion_factor_liefit_li3=gdat_tmp.r0./2.*gdat_tmp3.data.^2./gdat_tmp2.data;' ...
+                    'gdat_pol_length=gdat_aug(shot,params_eff);ij=find(gdat_pol_length.data==0);gdat_pol_length.data(ij)=NaN;' ...
+                    'gdat_tmp.conversion_factor_liefit_li3=gdat_tmp.r0./2.*gdat_pol_length.data.^2./gdat_vol.data;' ...
 		    'gdat_tmp.data = gdat_tmp.data./gdat_tmp.conversion_factor_liefit_li3;'];
  case 'mhd'
   mapping.timedim = 1;
-- 
GitLab