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

add eced etc for AUG

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@4262 d63d8f72-b253-0410-a779-e742ad2e26cf
parent 2b430732
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,7 @@ function [trace,error,varargout]=loadAUGdata(shot,data_type,varargin) ...@@ -23,7 +23,7 @@ function [trace,error,varargout]=loadAUGdata(shot,data_type,varargin)
% %
% Meaning of varargin depends on data_type: % 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{1}: [i1 i2] : if not empty, assumes need many chords from i1 to i2
% varargin{2}: channel status: 1=unread yet, 0=read % varargin{2}: channel status: 1=unread yet, 0=read
% (for traces with many channel, enables to load additional channels, % (for traces with many channel, enables to load additional channels,
...@@ -100,6 +100,9 @@ if size(data_type_eff,1)==1 ...@@ -100,6 +100,9 @@ if size(data_type_eff,1)==1
if ~isempty(strmatch(data_type_eff_noext,[{'ECE'}],'exact')) if ~isempty(strmatch(data_type_eff_noext,[{'ECE'}],'exact'))
data_type_eff_noext='ece'; data_type_eff_noext='ece';
end 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')) if ~isempty(strmatch(data_type_eff_noext,[{'VOL'} {'volume'}],'exact'))
data_type_eff_noext='vol'; data_type_eff_noext='vol';
end end
...@@ -143,7 +146,7 @@ end ...@@ -143,7 +146,7 @@ end
AUGkeywrdall=[{'Ip'} {'zmag'} {'rmag'} {'rcont'} {'zcont'} {'vol'} {'qrho'} {'qrho_cliste'} {'q95'} {'kappa'} ... AUGkeywrdall=[{'Ip'} {'zmag'} {'rmag'} {'rcont'} {'zcont'} {'vol'} {'qrho'} {'qrho_cliste'} {'q95'} {'kappa'} ...
{'delta'} {'deltatop'} {'deltabot'} {'neint'} ... {'delta'} {'deltatop'} {'deltabot'} {'neint'} ...
{'ne'} {'te'} {'nerho'} {'terho'} ... {'ne'} {'te'} {'nerho'} {'terho'} ...
{'sxr'} {'sxR'} {'sxb'} {'ece'} {'Halpha'}]; {'sxr'} {'sxR'} {'sxb'} {'ece'} {'eced'} {'Halpha'}];
AUGsig.iip=strmatch('Ip',AUGkeywrdall,'exact'); AUGsig.iip=strmatch('Ip',AUGkeywrdall,'exact');
AUGsig.izmag=strmatch('zmag',AUGkeywrdall,'exact'); AUGsig.izmag=strmatch('zmag',AUGkeywrdall,'exact');
AUGsig.irmag=strmatch('rmag',AUGkeywrdall,'exact'); AUGsig.irmag=strmatch('rmag',AUGkeywrdall,'exact');
...@@ -166,6 +169,7 @@ AUGsig.isxr=strmatch('sxr',AUGkeywrdall,'exact'); ...@@ -166,6 +169,7 @@ AUGsig.isxr=strmatch('sxr',AUGkeywrdall,'exact');
AUGsig.isxR=strmatch('sxR',AUGkeywrdall,'exact'); AUGsig.isxR=strmatch('sxR',AUGkeywrdall,'exact');
AUGsig.isxb=strmatch('sxb',AUGkeywrdall,'exact'); AUGsig.isxb=strmatch('sxb',AUGkeywrdall,'exact');
AUGsig.iece=strmatch('ece',AUGkeywrdall,'exact'); AUGsig.iece=strmatch('ece',AUGkeywrdall,'exact');
AUGsig.ieced=strmatch('eced',AUGkeywrdall,'exact');
AUGsig.iHalpha=strmatch('Halpha',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 % 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)={''; ''}; ...@@ -204,8 +208,16 @@ AUGsiglocation(:,AUGsig.ideltatop)={''; ''};
AUGsiglocation(:,AUGsig.ideltabot)={''; ''}; AUGsiglocation(:,AUGsig.ideltabot)={''; ''};
AUGsiglocation(:,AUGsig.ineint)={'DCN'; 'H-1'}; AUGsiglocation(:,AUGsig.ineint)={'DCN'; 'H-1'};
AUGsiglocation(:,AUGsig.iece)={'CEC'; 'Trad-A'}; AUGsiglocation(:,AUGsig.iece)={'CEC'; 'Trad-A'};
AUGsiglocation(:,AUGsig.ieced)={'RMD'; 'Trad-A'}; % ECED
AUGsiglocation(:,AUGsig.iHalpha)={'POT'; 'ELMa-Han'}; 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 % initialize order of substructures and allows just a "return" if data empty
trace.data=[]; trace.data=[];
trace.x=[]; trace.x=[];
...@@ -236,6 +248,7 @@ if size(data_type_eff,1)==2 ...@@ -236,6 +248,7 @@ if size(data_type_eff,1)==2
AUGkeywrdall(end+1)={'new'}; AUGkeywrdall(end+1)={'new'};
AUGkeywrdcase(end+1)={'simplereaddata'}; AUGkeywrdcase(end+1)={'simplereaddata'};
AUGsiglocation(1:2,end+1)=[data_type_eff(1) ; {data_type_eff_noext}]; AUGsiglocation(1:2,end+1)=[data_type_eff(1) ; {data_type_eff_noext}];
AUGexplocation{end+1}=shotfile_exp;
AUGsigtimeindx(end+1)=0; AUGsigtimeindx(end+1)=0;
elseif ~strcmp(AUGkeywrdcase{index},'simplereaddata') elseif ~strcmp(AUGkeywrdcase{index},'simplereaddata')
msgbox(['Problem in loadAUGdata with data_type_eff = ' char(data_type_eff(end)) ... msgbox(['Problem in loadAUGdata with data_type_eff = ' char(data_type_eff(end)) ...
...@@ -273,6 +286,7 @@ switch AUGkeywrdcase{index} ...@@ -273,6 +286,7 @@ switch AUGkeywrdcase{index}
case 'simplereaddata' case 'simplereaddata'
ppftype=AUGsiglocation{1,index}; ppftype=AUGsiglocation{1,index};
shotfile_exp_eff = AUGexplocation{index};
if i_efitm; if i_efitm;
tracename=['eftm' AUGsiglocation{2,index}(5:end) name_ext]; tracename=['eftm' AUGsiglocation{2,index}(5:end) name_ext];
else else
...@@ -280,7 +294,7 @@ switch AUGkeywrdcase{index} ...@@ -280,7 +294,7 @@ switch AUGkeywrdcase{index}
end end
ij=find(tracename~=''''); ij=find(tracename~='''');
tracename=tracename(ij) tracename=tracename(ij)
[a,e]=rdaAUG_eff(shot,ppftype,tracename,shotfile_exp); [a,e]=rdaAUG_eff(shot,ppftype,tracename,shotfile_exp_eff);
% switch tracename % switch tracename
% special cases if traces do not exist for some shot or other % special cases if traces do not exist for some shot or other
% end % end
...@@ -308,6 +322,9 @@ switch AUGkeywrdcase{index} ...@@ -308,6 +322,9 @@ switch AUGkeywrdcase{index}
case {'sxr','sxR'} case {'sxr','sxR'}
% LOAD MULTI CHANNEL DATA % LOAD MULTI CHANNEL DATA
% load AUG soft x-ray data % load AUG soft x-ray data
shotfile_exp_eff = AUGexplocation{index};
if nargin>=3 & ~isempty(varargin{1}) if nargin>=3 & ~isempty(varargin{1})
starti=varargin{1}(1); starti=varargin{1}(1);
endi=varargin{1}(2); endi=varargin{1}(2);
...@@ -338,7 +355,7 @@ switch AUGkeywrdcase{index} ...@@ -338,7 +355,7 @@ switch AUGkeywrdcase{index}
trace.t=[]; trace.t=[];
trace.x=[]; trace.x=[];
ppftype='SXR'; 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=a;
trace.dim=[{[starti:endi]'} ; {trace.t}]; trace.dim=[{[starti:endi]'} ; {trace.t}];
trace.x=trace.dim{1}; trace.x=trace.dim{1};
...@@ -375,6 +392,9 @@ switch AUGkeywrdcase{index} ...@@ -375,6 +392,9 @@ switch AUGkeywrdcase{index}
case {'sxb'} case {'sxb'}
% LOAD MULTI CHANNEL DATA SXB/J_0xx (or other than J camera if specified in varargin{8}) % LOAD MULTI CHANNEL DATA SXB/J_0xx (or other than J camera if specified in varargin{8})
% load AUG soft x-ray data % load AUG soft x-ray data
shotfile_exp_eff = AUGexplocation{index};
if nargin>=3 & ~isempty(varargin{1}) if nargin>=3 & ~isempty(varargin{1})
% chords to be loaded % chords to be loaded
starti=varargin{1}(1); starti=varargin{1}(1);
...@@ -410,7 +430,7 @@ switch AUGkeywrdcase{index} ...@@ -410,7 +430,7 @@ switch AUGkeywrdcase{index}
iok=0; iok=0;
for ichord=starti:endi for ichord=starti:endi
tracename_eff = [tracename '_' num2str(ichord,'%.3d')]; 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 if isempty(a) || e~=0
trace_all = struct([]); trace_all = struct([]);
else else
...@@ -451,10 +471,12 @@ switch AUGkeywrdcase{index} ...@@ -451,10 +471,12 @@ switch AUGkeywrdcase{index}
%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
case {'te', 'ne'} case {'te', 'ne'}
shotfile_exp_eff = AUGexplocation{index};
if strcmp(AUGkeywrdcase{index},'te') 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 else
[a,e]=rdaAUG_eff(shot,'YPR','Ne',shotfile_exp); [a,e]=rdaAUG_eff(shot,'YPR','Ne',shotfile_exp_eff);
end end
trace = a; trace = a;
trace.data = a.value'; trace.data = a.value';
...@@ -466,12 +488,14 @@ switch AUGkeywrdcase{index} ...@@ -466,12 +488,14 @@ switch AUGkeywrdcase{index}
case {'qrho', 'qrho_cliste'} case {'qrho', 'qrho_cliste'}
shotfile_exp_eff = AUGexplocation{index};
if strcmp(AUGkeywrdcase{index},'qrho') if strcmp(AUGkeywrdcase{index},'qrho')
DIAG = 'FPP'; DIAG = 'FPP';
else else
DIAG = 'EQI'; DIAG = 'EQI';
end 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 % Qpsi has inverted channel/time from CEC
a.value = a.value(:,end:-1:1)'; a.value = a.value(:,end:-1:1)';
a.data = a.value; a.data = a.value;
......
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