From e97cff53cd2eaf23599dae806d1ae75ca28b08a4 Mon Sep 17 00:00:00 2001 From: Olivier Sauter <olivier.sauter@epfl.ch> Date: Wed, 5 Mar 2014 10:36:18 +0000 Subject: [PATCH] add eced etc for AUG git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@4262 d63d8f72-b253-0410-a779-e742ad2e26cf --- crpptbx/AUG/loadAUGdata.m | 40 +++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/crpptbx/AUG/loadAUGdata.m b/crpptbx/AUG/loadAUGdata.m index 28ba12bd..5eafeb66 100644 --- a/crpptbx/AUG/loadAUGdata.m +++ b/crpptbx/AUG/loadAUGdata.m @@ -23,7 +23,7 @@ function [trace,error,varargout]=loadAUGdata(shot,data_type,varargin) % % Meaning of varargin depends on data_type: % -% data_type=sxr or ece: +% data_type=sxr, sxb or ece, eced: % varargin{1}: [i1 i2] : if not empty, assumes need many chords from i1 to i2 % varargin{2}: channel status: 1=unread yet, 0=read % (for traces with many channel, enables to load additional channels, @@ -100,6 +100,9 @@ if size(data_type_eff,1)==1 if ~isempty(strmatch(data_type_eff_noext,[{'ECE'}],'exact')) data_type_eff_noext='ece'; end + if ~isempty(strmatch(upper(data_type_eff_noext),[{'ECED'}],'exact')) + data_type_eff_noext='eced'; + end if ~isempty(strmatch(data_type_eff_noext,[{'VOL'} {'volume'}],'exact')) data_type_eff_noext='vol'; end @@ -143,7 +146,7 @@ end AUGkeywrdall=[{'Ip'} {'zmag'} {'rmag'} {'rcont'} {'zcont'} {'vol'} {'qrho'} {'qrho_cliste'} {'q95'} {'kappa'} ... {'delta'} {'deltatop'} {'deltabot'} {'neint'} ... {'ne'} {'te'} {'nerho'} {'terho'} ... - {'sxr'} {'sxR'} {'sxb'} {'ece'} {'Halpha'}]; + {'sxr'} {'sxR'} {'sxb'} {'ece'} {'eced'} {'Halpha'}]; AUGsig.iip=strmatch('Ip',AUGkeywrdall,'exact'); AUGsig.izmag=strmatch('zmag',AUGkeywrdall,'exact'); AUGsig.irmag=strmatch('rmag',AUGkeywrdall,'exact'); @@ -166,6 +169,7 @@ AUGsig.isxr=strmatch('sxr',AUGkeywrdall,'exact'); AUGsig.isxR=strmatch('sxR',AUGkeywrdall,'exact'); AUGsig.isxb=strmatch('sxb',AUGkeywrdall,'exact'); AUGsig.iece=strmatch('ece',AUGkeywrdall,'exact'); +AUGsig.ieced=strmatch('eced',AUGkeywrdall,'exact'); AUGsig.iHalpha=strmatch('Halpha',AUGkeywrdall,'exact'); % For each keyword, specify which case to use. As most common is 'simplereaddata', fill in with this and change @@ -204,8 +208,16 @@ AUGsiglocation(:,AUGsig.ideltatop)={''; ''}; AUGsiglocation(:,AUGsig.ideltabot)={''; ''}; AUGsiglocation(:,AUGsig.ineint)={'DCN'; 'H-1'}; AUGsiglocation(:,AUGsig.iece)={'CEC'; 'Trad-A'}; +AUGsiglocation(:,AUGsig.ieced)={'RMD'; 'Trad-A'}; % ECED AUGsiglocation(:,AUGsig.iHalpha)={'POT'; 'ELMa-Han'}; +% For the 'simplereaddata' cases, we need the full node in case gdat was called with full location directly +% for the other cases, leave this location empty +AUGexplocation=cell(size(AUGkeywrdall,2),1); +AUGexplocation(:)={'AUGD'}; +% cases with a "private" shotfile: +AUGexplocation(AUGsig.ieced)={'ECED'}; + % initialize order of substructures and allows just a "return" if data empty trace.data=[]; trace.x=[]; @@ -236,6 +248,7 @@ if size(data_type_eff,1)==2 AUGkeywrdall(end+1)={'new'}; AUGkeywrdcase(end+1)={'simplereaddata'}; AUGsiglocation(1:2,end+1)=[data_type_eff(1) ; {data_type_eff_noext}]; + AUGexplocation{end+1}=shotfile_exp; AUGsigtimeindx(end+1)=0; elseif ~strcmp(AUGkeywrdcase{index},'simplereaddata') msgbox(['Problem in loadAUGdata with data_type_eff = ' char(data_type_eff(end)) ... @@ -273,6 +286,7 @@ switch AUGkeywrdcase{index} case 'simplereaddata' ppftype=AUGsiglocation{1,index}; + shotfile_exp_eff = AUGexplocation{index}; if i_efitm; tracename=['eftm' AUGsiglocation{2,index}(5:end) name_ext]; else @@ -280,7 +294,7 @@ switch AUGkeywrdcase{index} end ij=find(tracename~=''''); tracename=tracename(ij) - [a,e]=rdaAUG_eff(shot,ppftype,tracename,shotfile_exp); + [a,e]=rdaAUG_eff(shot,ppftype,tracename,shotfile_exp_eff); % switch tracename % special cases if traces do not exist for some shot or other % end @@ -308,6 +322,9 @@ switch AUGkeywrdcase{index} case {'sxr','sxR'} % LOAD MULTI CHANNEL DATA % load AUG soft x-ray data + + shotfile_exp_eff = AUGexplocation{index}; + if nargin>=3 & ~isempty(varargin{1}) starti=varargin{1}(1); endi=varargin{1}(2); @@ -338,7 +355,7 @@ switch AUGkeywrdcase{index} trace.t=[]; trace.x=[]; ppftype='SXR'; - [a,e]=rdaAUG_eff(shot,ppftype,tracename,shotfile_exp,timerange); + [a,e]=rdaAUG_eff(shot,ppftype,tracename,shotfile_exp_eff,timerange); trace=a; trace.dim=[{[starti:endi]'} ; {trace.t}]; trace.x=trace.dim{1}; @@ -375,6 +392,9 @@ switch AUGkeywrdcase{index} case {'sxb'} % LOAD MULTI CHANNEL DATA SXB/J_0xx (or other than J camera if specified in varargin{8}) % load AUG soft x-ray data + + shotfile_exp_eff = AUGexplocation{index}; + if nargin>=3 & ~isempty(varargin{1}) % chords to be loaded starti=varargin{1}(1); @@ -410,7 +430,7 @@ switch AUGkeywrdcase{index} iok=0; for ichord=starti:endi tracename_eff = [tracename '_' num2str(ichord,'%.3d')]; - [a,e]=rdaAUG_eff(shot,ppftype,tracename_eff,shotfile_exp,timerange); + [a,e]=rdaAUG_eff(shot,ppftype,tracename_eff,shotfile_exp_eff,timerange); if isempty(a) || e~=0 trace_all = struct([]); else @@ -451,10 +471,12 @@ switch AUGkeywrdcase{index} %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& case {'te', 'ne'} + shotfile_exp_eff = AUGexplocation{index}; + if strcmp(AUGkeywrdcase{index},'te') - [a,e]=rdaAUG_eff(shot,'YPR','Te',shotfile_exp); + [a,e]=rdaAUG_eff(shot,'YPR','Te',shotfile_exp_eff); else - [a,e]=rdaAUG_eff(shot,'YPR','Ne',shotfile_exp); + [a,e]=rdaAUG_eff(shot,'YPR','Ne',shotfile_exp_eff); end trace = a; trace.data = a.value'; @@ -466,12 +488,14 @@ switch AUGkeywrdcase{index} case {'qrho', 'qrho_cliste'} + shotfile_exp_eff = AUGexplocation{index}; + if strcmp(AUGkeywrdcase{index},'qrho') DIAG = 'FPP'; else DIAG = 'EQI'; end - [a,e]=rdaAUG_eff(shot,DIAG,'Qpsi',shotfile_exp); + [a,e]=rdaAUG_eff(shot,DIAG,'Qpsi',shotfile_exp_eff); % Qpsi has inverted channel/time from CEC a.value = a.value(:,end:-1:1)'; a.data = a.value; -- GitLab