From 87a623e18553915d2d46d341106bd6545a5e1d65 Mon Sep 17 00:00:00 2001
From: Olivier Sauter <olivier.sauter@epfl.ch>
Date: Tue, 25 Sep 2001 09:06:26 +0000
Subject: [PATCH] change lMACHINEdata.m to loadMACHINEdata.m

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@1814 d63d8f72-b253-0410-a779-e742ad2e26cf
---
 JET/{lJETdata.m => loadJETdata.m} |  4 +--
 README                            |  4 +--
 TCV/{lTCVdata.m => loadTCVdata.m} |  8 +++---
 gdat.m                            | 42 +++++++++++++++----------------
 4 files changed, 29 insertions(+), 29 deletions(-)
 rename JET/{lJETdata.m => loadJETdata.m} (97%)
 rename TCV/{lTCVdata.m => loadTCVdata.m} (94%)

diff --git a/JET/lJETdata.m b/JET/loadJETdata.m
similarity index 97%
rename from JET/lJETdata.m
rename to JET/loadJETdata.m
index 6b6a19ee..088fe055 100644
--- a/JET/lJETdata.m
+++ b/JET/loadJETdata.m
@@ -1,4 +1,4 @@
-function [trace,error,varargout]=lJETdata(shot,data_type,varargin)
+function [trace,error,varargout]=loadJETdata(shot,data_type,varargin)
 %
 %
 % INPUT:
@@ -25,7 +25,7 @@ function [trace,error,varargout]=lJETdata(shot,data_type,varargin)
 % 'sxr'  =  soft x-ray emission
 % 'sxR'  =  soft x-ray emission with varargout{1} option (requires varargin{5}!)
 % Example:
-%         [zmag,error]=lJETdata(shot,'zmag');
+%         [zmag,error]=loadJETdata(shot,'zmag');
 %
 JETsigkeywrd=[{'Ip'} ; {'zmag'} ; {'rmag'}];
 JETsig.iip=1;
diff --git a/README b/README
index 6a3b3ee3..b7886074 100644
--- a/README
+++ b/README
@@ -10,12 +10,12 @@ create new subdirectory
 change gdatpaths
 
 In new subdirectory, named say: NEWMACHINE
-create function: lNEWMACHINEdata.m (for load NEWMACHINE data)
+create function: loadNEWMACHINEdata.m (for load NEWMACHINE data)
 
 etc.
 
 The explanation of the different traces are in "help gdat" for generic names.
-The specificity of a given machine are in "help lNEWMACHINEdata"
+The specificity of a given machine are in "help loadNEWMACHINEdata"
 
 Thus the head comments of these functions should be correctly updated and self-explanatory
 
diff --git a/TCV/lTCVdata.m b/TCV/loadTCVdata.m
similarity index 94%
rename from TCV/lTCVdata.m
rename to TCV/loadTCVdata.m
index 0ce223ff..75915aa8 100644
--- a/TCV/lTCVdata.m
+++ b/TCV/loadTCVdata.m
@@ -1,4 +1,4 @@
- function [trace,error,varargout]=lTCVdata(shot,data_type,varargin)
+ function [trace,error,varargout]=loadTCVdata(shot,data_type,varargin)
 %
 %
 % INPUT:
@@ -27,7 +27,7 @@
 % 'sxR'  =  soft x-ray emission with varargout{1} option (requires varargin{4}!)
 % 'MPX'  =  soft x-ray from wire chambers
 % Example:
-%         [zmag,error]=lTCVdata(shot,'zmag');
+%         [zmag,error]=loadTCVdata(shot,'zmag');
 %
 
 TCVsigkeywrd=[{'Ip'} ; {'zmag'} ; {'rmag'}];
@@ -47,10 +47,10 @@ elseif strcmp(data_type(1:1),'\')
    char(TCVsigkeywrd(index_sig)) ') instead of the full node name' ' ' data_type]);
     location={data_type ; '1'};
   else
-%    eval(['!mailto_Andrea ''from lTCVdata, data_type= ' data_type ''''])
+%    eval(['!mailto_Andrea ''from loadTCVdata, data_type= ' data_type ''''])
   end  
 else
-  disp(['this data_type' ' ' data_type ' ' 'not yet programmed in lTCVdata, ask Andrea.Scarabosio@epfl.ch']);
+  disp(['this data_type' ' ' data_type ' ' 'not yet programmed in loadTCVdata, ask Andrea.Scarabosio@epfl.ch']);
 end
 disp(['loading' ' ' data_type ' from TCV shot #' num2str(shot)]); 
 
diff --git a/gdat.m b/gdat.m
index e3acc644..33af288e 100644
--- a/gdat.m
+++ b/gdat.m
@@ -1,11 +1,24 @@
 function [trace,error,varargout] = gdat(shot,data_type,varargin)
 %
+% list of data_type currently available:
+%
+% All machines
+% 'Ip'   =  current
+% 'zmag' =  vertical position of the center of the plasma (magnetic axis)
+% 'rmag' =  radial position of the center of the plasma 
+% 'ece'  =  electron cyclotron emission
+% 'sxr'  =  soft x-ray emission 
+% 'sxR'  =  soft x-ray emission with varargout{1} option (requires varargin{5}!)
+%
+% specific to TCV (see help loadTCVdata for more information)
+% 'MPX'  =  wire chambers with varargout{1} option (requires varargin{5}!)
+%
+% Special case compatible with old gdat.m allows (JET related): gdat(51994,'ppf','efit/xip',1)
 %
 % INPUT:
+%
 % shot: shot number
-% data_type: type of the required data. Ex.: 'Ip', 'zmag', 'rmag','sxr', 'ece',
-%             'sxR', 'MPX' 
-% optional arguments, definition of some depend on value of data_type:
+% data_type: type of the required data.( see above)
 %
 % optional arguments valid for all values of data_type:
 %
@@ -22,6 +35,7 @@ function [trace,error,varargout] = gdat(shot,data_type,varargin)
 %                  varargin{5}:  zmag for varargout{1} computation
 %
 % OUTPUT:
+%
 % trace.data:   data structure
 % trace.t:      time of reference 
 % trace.x:      space of reference 
@@ -32,26 +46,11 @@ function [trace,error,varargout] = gdat(shot,data_type,varargin)
 % data_type=sxR:
 %                varargout{1}: intersection of the view lines with magnetic axis
 % data_type=MPX: (specific to TCV) 
-%                varargout{1}: 
+%                varargout{1}: see help loadTCVdata
 %
 %
-% functions needed: lTCVdata, lJETdata
+% functions needed: loadTCVdata, loadJETdata
 %                  
-% list of data_type currently available:
-%
-% All machines
-% 'Ip'   =  current
-% 'zmag' =  vertical position of the center of the plasma (magnetic axis)
-% 'rmag' =  radial position of the center of the plasma 
-% 'ece'  =  electron cyclotron emission
-% 'sxr'  =  soft x-ray emission 
-% 'sxR'  =  soft x-ray emission with varargout{1} option (requires varargin{5}!)
-%
-% TCV
-% 'MPX'  =  wire chambers with varargout{1} option (requires varargin{5}!)
-%
-% Special case compatible with old gdat.m allows (JET related): gdat(51994,'ppf','efit/xip',1)
-%
 %
 % Examples:
 %         [zmag,error]=gdat(shot,'zmag',1);  % gets zmag from TCV and plot
@@ -86,7 +85,8 @@ if (nargineff>=6 & ~isempty(varargin{4})); index=varargin{4}; end
 zmag=[];
 if (nargineff>=7 & ~isempty(varargin{5})); zmag=varargin{5}; end
 
-eval(['[trace,error,radius] = l' machine 'data(shot,data_type,status,index,zmag);']);
+% load data from specified machine
+eval(['[trace,error,radius] = load' machine 'data(shot,data_type,status,index,zmag);']);
 
 if (strcmp(data_type,'sxR') | strcmp(data_type,'ece')| strcmp(data_type,'MPX')) 
   varargout={radius}; 
-- 
GitLab