diff --git a/JET/lJETdata.m b/JET/loadJETdata.m similarity index 97% rename from JET/lJETdata.m rename to JET/loadJETdata.m index 6b6a19eeca3d06d1edfd146e100a40b3a84a1d34..088fe055a010d8241b3f42f5d1db3bd02bce6fa5 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 6a3b3ee314e561297655c2b578a07a25f81adca3..b7886074523a7d9220bb7e8bb41aa7406ab54596 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 0ce223ffdb8b4c29930a76db0cf926788293b0a6..75915aa84f9bc542f5df29af1d31d7fc676c93c6 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 e3acc644580cf5be1c7141cb0f75ee7d8a897090..33af288edee3a0cbfd41bc53ac8674e4d30c52c7 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};