From 50bfad9ee8cb91f982a42e98e119bd05728b9838 Mon Sep 17 00:00:00 2001 From: Olivier Sauter <olivier.sauter@epfl.ch> Date: Wed, 11 Jun 2014 12:46:11 +0000 Subject: [PATCH] add keyword list for AUG as well and with either gdat empty call or gdat(-9) call git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@4455 d63d8f72-b253-0410-a779-e742ad2e26cf --- crpptbx/AUG/loadAUGdata.m | 20 ++++++++++++++++++++ crpptbx/gdat.m | 7 ++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/crpptbx/AUG/loadAUGdata.m b/crpptbx/AUG/loadAUGdata.m index 90c08ce1..038bdc2f 100644 --- a/crpptbx/AUG/loadAUGdata.m +++ b/crpptbx/AUG/loadAUGdata.m @@ -129,6 +129,8 @@ if size(data_type,1)==1 disp(['more / than expected in tracename: length(i)= ' num2str(length(i))]) data_type end +elseif isempty(data_type) + data_type_eff = ' '; end i_efitm=0; @@ -391,6 +393,24 @@ AUGexplocation(AUGsig.ieced)={'ECED'}; AUGexplocation(AUGsig.ieced_rho)={'ECED'}; AUGexplocation(AUGsig.ieced_rmd)={'ECED'}; +if shot==-9 + clear trace + for i=1:length(AUGkeywrdall) + fieldname_eff = lower(AUGkeywrdall{i}); + keyword_eff = AUGkeywrdall{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 = 'MAG/Ipa'; + % trace.data=[]; + return +end + % initialize order of substructures and allows just a "return" if data empty trace.data=[]; trace.x=[]; diff --git a/crpptbx/gdat.m b/crpptbx/gdat.m index 893d2f76..b1da1b4d 100644 --- a/crpptbx/gdat.m +++ b/crpptbx/gdat.m @@ -2,7 +2,9 @@ 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 +% new: no args or with shot=-9 to get keywords relevant for the related experiment +% keywordlist=gdat; (for the default machine) +% keywordlist=gdat(-9,[],'machine'); (for the specific machine) % % list of data_type currently available: % @@ -99,6 +101,7 @@ function [trace,error,varargout] = gdat(shot,data_type,varargin) % [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 +% keywordlist=gdat; % to get examples and the keywords defined for the local machine % gdatpaths @@ -138,6 +141,8 @@ end if (nargineff>=4 & ~isempty(varargin{2})); machine=varargin{2}; end % load data from specified machine +if ~exist('data_type'); data_type=[]; end +if ~exist('shot') || isempty(shot); shot=-9; end if nargineff<=4 eval(['[trace,error,varargout] = load' machine 'data(shot,data_type);']); else -- GitLab