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

add shot=-9 option to list keywords available

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@4453 d63d8f72-b253-0410-a779-e742ad2e26cf
parent aa0ab759
Branches
Tags
No related merge requests found
function [trace,error,varargout]=loadTCVdata(shot,data_type,varargin) function [trace,error,varargout]=loadTCVdata(shot,data_type,varargin)
% %
% Added option to load shot=-1 or >=100000 % Added option to load shot=-1 or >=100000
% Added option shot=-9 to list keywords
% %
% list of data_type currently available (when [_2,_3] is added, means can add _i to get Liuqe i): % list of data_type currently available (when [_2,_3] is added, means can add _i to get Liuqe i):
% if -1 is added, can also get it from FBTE with shot=-1, >=100000 or liuqe_version='_-1' (to get model file) % if -1 is added, can also get it from FBTE with shot=-1, >=100000 or liuqe_version='_-1' (to get model file)
...@@ -271,6 +272,7 @@ TCVkeywrdall=[{'Ip'} {'B0'} {'zmag'} {'rmag'} {'rcont'} {'zcont'} {'vol'} {'rhov ...@@ -271,6 +272,7 @@ TCVkeywrdall=[{'Ip'} {'B0'} {'zmag'} {'rmag'} {'rcont'} {'zcont'} {'vol'} {'rhov
{'ne'} {'te'} {'nerho'} {'terho'} {'ne_edge'} {'te_edge'} {'nerho_edge'} {'terho_edge'} {'nerhozshift'} {'terhozshift'} {'profnerho'} {'profterho'} ... {'ne'} {'te'} {'nerho'} {'terho'} {'ne_edge'} {'te_edge'} {'nerho_edge'} {'terho_edge'} {'nerhozshift'} {'terhozshift'} {'profnerho'} {'profterho'} ...
{'neft'} {'teft'} {'neftav'} {'teftav'} {'neft:trial'} {'teft:trial'} {'neftav:trial'} {'teftav:trial'} ... {'neft'} {'teft'} {'neftav'} {'teftav'} {'neft:trial'} {'teft:trial'} {'neftav:trial'} {'teftav:trial'} ...
{'sxr'} {'sxR'} {'ece'} {'MPX'} {'IOH'} {'vloop'} {'pgyro'} {'jtor'} {'vi_tor'} {'vi_torfit'} {'vi_pol'} {'vi_polfit'} {'Ti'} {'Tifit'} {'ni'} {'nifit'} {'zeffcxrs'} {'zeffcxrsfit'}]; {'sxr'} {'sxR'} {'ece'} {'MPX'} {'IOH'} {'vloop'} {'pgyro'} {'jtor'} {'vi_tor'} {'vi_torfit'} {'vi_pol'} {'vi_polfit'} {'Ti'} {'Tifit'} {'ni'} {'nifit'} {'zeffcxrs'} {'zeffcxrsfit'}];
TCVsig.iip=strmatch('Ip',TCVkeywrdall,'exact'); TCVsig.iip=strmatch('Ip',TCVkeywrdall,'exact');
TCVsig.iB0=strmatch('B0',TCVkeywrdall,'exact'); TCVsig.iB0=strmatch('B0',TCVkeywrdall,'exact');
TCVsig.izmag=strmatch('zmag',TCVkeywrdall,'exact'); TCVsig.izmag=strmatch('zmag',TCVkeywrdall,'exact');
...@@ -400,6 +402,23 @@ TCVsiglocation(TCVsig.iteft_trial)=TCVsiglocation(TCVsig.iteft); TCVsigtimeindx( ...@@ -400,6 +402,23 @@ TCVsiglocation(TCVsig.iteft_trial)=TCVsiglocation(TCVsig.iteft); TCVsigtimeindx(
TCVsiglocation(TCVsig.ineftav_trial)=TCVsiglocation(TCVsig.ineftav); TCVsigtimeindx(TCVsig.ineftav_trial)=2; TCVsiglocation(TCVsig.ineftav_trial)=TCVsiglocation(TCVsig.ineftav); TCVsigtimeindx(TCVsig.ineftav_trial)=2;
TCVsiglocation(TCVsig.iteftav_trial)=TCVsiglocation(TCVsig.iteftav); TCVsigtimeindx(TCVsig.iteftav_trial)=2; TCVsiglocation(TCVsig.iteftav_trial)=TCVsiglocation(TCVsig.iteftav); TCVsigtimeindx(TCVsig.iteftav_trial)=2;
if shot==-9
clear trace
for i=1:length(TCVkeywrdall)
fieldname_eff = lower(TCVkeywrdall{i});
keyword_eff = TCVkeywrdall{i};
ij=findstr(fieldname_eff,':');
if ~isempty(ij);
fieldname_eff(ij)='_';
keyword_eff(ij:end+1)=[':i' keyword_eff(ij+1:end)] ;
end
trace.(fieldname_eff) = keyword_eff;
end
% add example for Ip trace full call
trace.ipfullcall = TCVsiglocation{TCVsig.iip};
% trace.data=[];
return
end
% initialize order of substructures and allows just a "return" if data empty % initialize order of substructures and allows just a "return" if data empty
trace.data=[]; trace.data=[];
......
...@@ -2,9 +2,11 @@ function [trace,error,varargout] = gdat(shot,data_type,varargin) ...@@ -2,9 +2,11 @@ function [trace,error,varargout] = gdat(shot,data_type,varargin)
% %
% function [trace,error,varargout] = gdat(shot,data_type,varargin) % function [trace,error,varargout] = gdat(shot,data_type,varargin)
% %
% new: shot=-9 to get keywords relevant for the related experiment
%
% list of data_type currently available: % list of data_type currently available:
% %
% All machines % (almost) All machines
% 'Ip' = current % 'Ip' = current
% 'zmag' = vertical position of the center of the plasma (magnetic axis) % 'zmag' = vertical position of the center of the plasma (magnetic axis)
% 'rmag' = radial position of the center of the plasma % 'rmag' = radial position of the center of the plasma
...@@ -96,6 +98,7 @@ function [trace,error,varargout] = gdat(shot,data_type,varargin) ...@@ -96,6 +98,7 @@ function [trace,error,varargout] = gdat(shot,data_type,varargin)
% [zmag,error]=gdat(shot,'zmag',1,'JET'); % idem but from JET % [zmag,error]=gdat(shot,'zmag',1,'JET'); % idem but from JET
% [zmag,error]=gdat(shot,'ppf','efit/zmag',1); as above for JET % [zmag,error]=gdat(shot,'ppf','efit/zmag',1); as above for JET
% %
% keywordlist=gdat(-9,[],[],machine); % to get examples and the keywords defined for the relevant machine
% %
gdatpaths gdatpaths
...@@ -143,7 +146,7 @@ end ...@@ -143,7 +146,7 @@ end
% PLOT DATA (if required) % PLOT DATA (if required)
if doplot~=0; set_defaults_matlab; end if doplot~=0; set_defaults_matlab; end
if doplot==1 & length(trace.data)>1 & ~ischar(trace.data) if doplot==1 && isfield(trace,'data') && length(trace.data)>1 && ~ischar(trace.data)
try try
figure;zoom on figure;zoom on
if length(size(trace.data))<=2 if length(size(trace.data))<=2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment