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

add comments on trace used and add B0

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@3101 d63d8f72-b253-0410-a779-e742ad2e26cf
parent 643de23f
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@
% if -1 is added, can also get it from FBTE with shot=-1, >=100000 or liuqe_version='_-1' (to get model file)
%
% 'Ip'[_2,_3] = current
% 'B0'[_2,_3] = current
% 'zmag'[_2,_3] = vertical position of the center of the plasma (magnetic axis)
% 'rmag'[_2,_3] = radial position of the center of the plasma
% 'rcont'[_2,_3] = R of plama boundary vs time
......@@ -119,7 +120,7 @@ end
jj=strfind(data_type_eff,':');
trialindx=[];
if ~isempty(jj)
ii=strmatch(data_type_eff(1:jj-1),[{'teft'},{'neft'},{'teftav'},{'neftav'}])
ii=strmatch(data_type_eff(1:jj-1),[{'teft'},{'neft'},{'teftav'},{'neftav'}]);
if ~isempty(ii)
trialindx=str2num(data_type_eff(jj+1:end));
data_type_eff_noext=[data_type_eff(1:jj-1) ':trial'];
......@@ -132,6 +133,9 @@ end
if ~isempty(strmatch(data_type_eff_noext,[{'ip'} {'i_p'} {'xip'}],'exact'))
data_type_eff_noext='Ip';
end
if ~isempty(strmatch(data_type_eff_noext,[{'b0'} {'B_0'} {'Bgeom'} {'BGEOM'}],'exact'))
data_type_eff_noext='B0';
end
if ~isempty(strmatch(data_type_eff_noext,[{'Te'} {'t_e'} {'TE'} {'T_e'}],'exact'))
data_type_eff_noext='te';
end
......@@ -219,12 +223,13 @@ noFBTE=[{'ne'} {'te'} {'nerho'} {'terho'} {'ne_edge'} {'te_edge'} {'nerho_edge'}
{'neft'} {'neft:trial'} {'teft:trial'} {'neftav:trial'} {'teftav:trial'} {'sxr'} {'sxR'} {'ece'} {'MPX'} {'IOH'} {'vloop'} {'neint'}];
% all keywords and corresponding case to run below
TCVkeywrdall=[{'Ip'} {'zmag'} {'rmag'} {'rcont'} {'zcont'} {'vol'} {'rhovol'} {'qrho'} {'q95'} {'kappa'} ...
TCVkeywrdall=[{'Ip'} {'B0'} {'zmag'} {'rmag'} {'rcont'} {'zcont'} {'vol'} {'rhovol'} {'qrho'} {'q95'} {'kappa'} ...
{'delta'} {'deltatop'} {'deltabot'} {'neint'} ...
{'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'} ...
{'sxr'} {'sxR'} {'ece'} {'MPX'} {'IOH'} {'vloop'} {'pgyro'} {'jtor'}];
TCVsig.iip=strmatch('Ip',TCVkeywrdall,'exact');
TCVsig.iB0=strmatch('B0',TCVkeywrdall,'exact');
TCVsig.izmag=strmatch('zmag',TCVkeywrdall,'exact');
TCVsig.irmag=strmatch('rmag',TCVkeywrdall,'exact');
TCVsig.ircont=strmatch('rcont',TCVkeywrdall,'exact');
......@@ -271,6 +276,7 @@ TCVsig.ijtor=strmatch('jtor',TCVkeywrdall,'exact');
% only indices needed. Usually use name of case same as keyword name
TCVkeywrdcase=cell(size(TCVkeywrdall));
TCVkeywrdcase(:)={'simpletdi'};
TCVkeywrdcase(TCVsig.iB0)=TCVkeywrdall(TCVsig.iB0); % through iphi
TCVkeywrdcase(TCVsig.iqrho)=TCVkeywrdall(TCVsig.iqrho); % special as liuqe q_psi on psi
TCVkeywrdcase(TCVsig.ivol)=TCVkeywrdall(TCVsig.ivol); % special as nodes _2 or _3 not existing with psitbx
TCVkeywrdcase(TCVsig.irhovol)=TCVkeywrdall(TCVsig.irhovol); % idem vol
......@@ -337,12 +343,12 @@ trace.t=[];
trace.dim=[];
trace.dimunits=[];
trace.units=[];
irpintwarn=0;
iprintwarn=0;
% find index of signal called upon
if strcmp(data_type_eff(1:1),'\')
% in case full node name was given
index=strmatch(data_type_eff(1:end-i_23),TCVsiglocation,'exact');
if irpintwarn & isempty(index)
if iprintwarn & isempty(index)
disp('********************')
disp('trace not yet registered.')
disp('If standard data, ask olivier.sauter@epfl.ch to create a keyqord entry for this data')
......@@ -377,7 +383,7 @@ else
return
end
end
if irpintwarn
if iprintwarn
disp(['loading' ' ' data_type_eff_noext ' from TCV shot #' num2str(shot)]);
disp(['case ' TCVkeywrdcase{index}])
end
......@@ -391,8 +397,10 @@ end
status=ones(1,100);
zmag=cell(0,0);
nargineff=nargin;
disp('TCVsiglocation{index} in loadTCVdata')
TCVsiglocation{index}
if iprintwarn
disp('TCVsiglocation{index} in loadTCVdata')
TCVsiglocation{index}
end
switch TCVkeywrdcase{index}
......@@ -611,7 +619,6 @@ switch TCVkeywrdcase{index}
trace.name=[num2str(shot) ';' nodenameeff];
% add correct dimensions
% construct rho mesh
endstr
psi_max=tdi(['\results::thomson:psi_max' endstr]);
psiscatvol=tdi(['\results::thomson:psiscatvol' endstr]);
for ir=1:length(psiscatvol.dim{2})
......@@ -675,7 +682,6 @@ switch TCVkeywrdcase{index}
trace.name=[num2str(shot) ';' nodenameeff];
% add correct dimensions
% construct rho mesh
endstr
psi_max=tdi(['\results::thomson.edge:psi_max' endstr]);
psiscatvol=tdi(['\results::thomson.edge:psiscatvol' endstr]);
if ~isempty(psiscatvol.data) && ~ischar(psiscatvol.data)
......@@ -826,6 +832,29 @@ switch TCVkeywrdcase{index}
trace.name=[num2str(shot) '; Thomson autfits from ' nodenameeff ];
mdsclose;
%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
case {'B0'}
% B0 at R0=0.88
if liuqe_version==-1
mdsopen( 'pcs', shot); %synthetic shot generated with FBT and MGAMS.
else
mdsopen(shot);
end
nodenameeff=['\magnetics::iphi'];
tracetdi=tdi(nodenameeff);
R0EXP=0.88;
trace.data=192.E-07 * 0.996 *tracetdi.data/R0EXP;
trace.x=[];
trace.t=tracetdi.dim{1};
trace.dim=[{trace.t}];
trace.dimunits=[{'time [s]'}];
% isfield does not work since tracetdi is not a 'struct' but a tdi object, thus isfield using isa does not work
if any(strcmp(fieldnames(tracetdi),'units'))
trace.units=tracetdi.units;
end
trace.name=[num2str(shot) ';' nodenameeff];
mdsclose;
%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
case {'qrho'}
% q profile on psi from liuqe
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment