Skip to content
Snippets Groups Projects
Commit 87a623e1 authored by Olivier Sauter's avatar Olivier Sauter
Browse files

change lMACHINEdata.m to loadMACHINEdata.m

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@1814 d63d8f72-b253-0410-a779-e742ad2e26cf
parent 8f6059f3
No related branches found
No related tags found
No related merge requests found
function [trace,error,varargout]=lJETdata(shot,data_type,varargin) function [trace,error,varargout]=loadJETdata(shot,data_type,varargin)
% %
% %
% INPUT: % INPUT:
...@@ -25,7 +25,7 @@ function [trace,error,varargout]=lJETdata(shot,data_type,varargin) ...@@ -25,7 +25,7 @@ function [trace,error,varargout]=lJETdata(shot,data_type,varargin)
% 'sxr' = soft x-ray emission % 'sxr' = soft x-ray emission
% 'sxR' = soft x-ray emission with varargout{1} option (requires varargin{5}!) % 'sxR' = soft x-ray emission with varargout{1} option (requires varargin{5}!)
% Example: % Example:
% [zmag,error]=lJETdata(shot,'zmag'); % [zmag,error]=loadJETdata(shot,'zmag');
% %
JETsigkeywrd=[{'Ip'} ; {'zmag'} ; {'rmag'}]; JETsigkeywrd=[{'Ip'} ; {'zmag'} ; {'rmag'}];
JETsig.iip=1; JETsig.iip=1;
......
...@@ -10,12 +10,12 @@ create new subdirectory ...@@ -10,12 +10,12 @@ create new subdirectory
change gdatpaths change gdatpaths
In new subdirectory, named say: NEWMACHINE In new subdirectory, named say: NEWMACHINE
create function: lNEWMACHINEdata.m (for load NEWMACHINE data) create function: loadNEWMACHINEdata.m (for load NEWMACHINE data)
etc. etc.
The explanation of the different traces are in "help gdat" for generic names. 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 Thus the head comments of these functions should be correctly updated and self-explanatory
function [trace,error,varargout]=lTCVdata(shot,data_type,varargin) function [trace,error,varargout]=loadTCVdata(shot,data_type,varargin)
% %
% %
% INPUT: % INPUT:
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
% 'sxR' = soft x-ray emission with varargout{1} option (requires varargin{4}!) % 'sxR' = soft x-ray emission with varargout{1} option (requires varargin{4}!)
% 'MPX' = soft x-ray from wire chambers % 'MPX' = soft x-ray from wire chambers
% Example: % Example:
% [zmag,error]=lTCVdata(shot,'zmag'); % [zmag,error]=loadTCVdata(shot,'zmag');
% %
TCVsigkeywrd=[{'Ip'} ; {'zmag'} ; {'rmag'}]; TCVsigkeywrd=[{'Ip'} ; {'zmag'} ; {'rmag'}];
...@@ -47,10 +47,10 @@ elseif strcmp(data_type(1:1),'\') ...@@ -47,10 +47,10 @@ elseif strcmp(data_type(1:1),'\')
char(TCVsigkeywrd(index_sig)) ') instead of the full node name' ' ' data_type]); char(TCVsigkeywrd(index_sig)) ') instead of the full node name' ' ' data_type]);
location={data_type ; '1'}; location={data_type ; '1'};
else else
% eval(['!mailto_Andrea ''from lTCVdata, data_type= ' data_type '''']) % eval(['!mailto_Andrea ''from loadTCVdata, data_type= ' data_type ''''])
end end
else 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 end
disp(['loading' ' ' data_type ' from TCV shot #' num2str(shot)]); disp(['loading' ' ' data_type ' from TCV shot #' num2str(shot)]);
......
function [trace,error,varargout] = gdat(shot,data_type,varargin) 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: % INPUT:
%
% shot: shot number % shot: shot number
% data_type: type of the required data. Ex.: 'Ip', 'zmag', 'rmag','sxr', 'ece', % data_type: type of the required data.( see above)
% 'sxR', 'MPX'
% optional arguments, definition of some depend on value of data_type:
% %
% optional arguments valid for all values of data_type: % optional arguments valid for all values of data_type:
% %
...@@ -22,6 +35,7 @@ function [trace,error,varargout] = gdat(shot,data_type,varargin) ...@@ -22,6 +35,7 @@ function [trace,error,varargout] = gdat(shot,data_type,varargin)
% varargin{5}: zmag for varargout{1} computation % varargin{5}: zmag for varargout{1} computation
% %
% OUTPUT: % OUTPUT:
%
% trace.data: data structure % trace.data: data structure
% trace.t: time of reference % trace.t: time of reference
% trace.x: space of reference % trace.x: space of reference
...@@ -32,26 +46,11 @@ function [trace,error,varargout] = gdat(shot,data_type,varargin) ...@@ -32,26 +46,11 @@ function [trace,error,varargout] = gdat(shot,data_type,varargin)
% data_type=sxR: % data_type=sxR:
% varargout{1}: intersection of the view lines with magnetic axis % varargout{1}: intersection of the view lines with magnetic axis
% data_type=MPX: (specific to TCV) % 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: % Examples:
% [zmag,error]=gdat(shot,'zmag',1); % gets zmag from TCV and plot % [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 ...@@ -86,7 +85,8 @@ if (nargineff>=6 & ~isempty(varargin{4})); index=varargin{4}; end
zmag=[]; zmag=[];
if (nargineff>=7 & ~isempty(varargin{5})); zmag=varargin{5}; end 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')) if (strcmp(data_type,'sxR') | strcmp(data_type,'ece')| strcmp(data_type,'MPX'))
varargout={radius}; varargout={radius};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment