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:
......@@ -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;
......
......@@ -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
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)]);
......
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};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment