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

add edge Thomson

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@2583 d63d8f72-b253-0410-a779-e742ad2e26cf
parent 55cebc7e
No related branches found
No related tags found
No related merge requests found
...@@ -135,7 +135,10 @@ end ...@@ -135,7 +135,10 @@ end
if ~isempty(strmatch(data_type_eff_noext,[{'Te'} {'t_e'} {'TE'} {'T_e'}],'exact')) if ~isempty(strmatch(data_type_eff_noext,[{'Te'} {'t_e'} {'TE'} {'T_e'}],'exact'))
data_type_eff_noext='te'; data_type_eff_noext='te';
end end
if ~isempty(strmatch(data_type_eff_noext,[{'Ne'} {'n_e'} {'NE'} {'N_e'}],'exact')) if ~isempty(strmatch(data_type_eff_noext,[{'Te_edge'} {'TE_edge'}],'exact'))
data_type_eff_noext='te_edge';
end
if ~isempty(strmatch(data_type_eff_noext,[{'Ne_edge'} {'NE_edge'}],'exact'))
data_type_eff_noext='ne'; data_type_eff_noext='ne';
end end
if ~isempty(strmatch(data_type_eff_noext,[{'Rcont'}],'exact')) if ~isempty(strmatch(data_type_eff_noext,[{'Rcont'}],'exact'))
...@@ -212,13 +215,13 @@ liuqeFBTE=[{'\results::i_p'} {'\results::z_axis'} {'\results::r_axis'} {'\result ...@@ -212,13 +215,13 @@ liuqeFBTE=[{'\results::i_p'} {'\results::z_axis'} {'\results::r_axis'} {'\result
{'\results::kappa_95'} {'\results::r_contour'} {'\results::z_contour'} {'\results::psi_axis'}]; {'\results::kappa_95'} {'\results::r_contour'} {'\results::z_contour'} {'\results::psi_axis'}];
% keywords which do not have FBTE equivalence and are returned empty % keywords which do not have FBTE equivalence and are returned empty
noFBTE=[{'ne'} {'te'} {'nerho'} {'terho'} {'nerhozshift'} {'terhozshift'} {'profnerho'} {'profterho'} ... noFBTE=[{'ne'} {'te'} {'nerho'} {'terho'} {'ne_edge'} {'te_edge'} {'nerho_edge'} {'terho_edge'} {'nerhozshift'} {'terhozshift'} {'profnerho'} {'profterho'} ...
{'neft'} {'neft:trial'} {'teft:trial'} {'neftav:trial'} {'teftav:trial'} {'sxr'} {'sxR'} {'ece'} {'MPX'} {'IOH'} {'vloop'} {'neint'}]; {'neft'} {'neft:trial'} {'teft:trial'} {'neftav:trial'} {'teftav:trial'} {'sxr'} {'sxR'} {'ece'} {'MPX'} {'IOH'} {'vloop'} {'neint'}];
% all keywords and corresponding case to run below % all keywords and corresponding case to run below
TCVkeywrdall=[{'Ip'} {'zmag'} {'rmag'} {'rcont'} {'zcont'} {'vol'} {'rhovol'} {'qrho'} {'q95'} {'kappa'} ... TCVkeywrdall=[{'Ip'} {'zmag'} {'rmag'} {'rcont'} {'zcont'} {'vol'} {'rhovol'} {'qrho'} {'q95'} {'kappa'} ...
{'delta'} {'deltatop'} {'deltabot'} {'neint'} ... {'delta'} {'deltatop'} {'deltabot'} {'neint'} ...
{'ne'} {'te'} {'nerho'} {'terho'} {'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'}]; {'sxr'} {'sxR'} {'ece'} {'MPX'} {'IOH'} {'vloop'} {'pgyro'} {'jtor'}];
TCVsig.iip=strmatch('Ip',TCVkeywrdall,'exact'); TCVsig.iip=strmatch('Ip',TCVkeywrdall,'exact');
...@@ -237,8 +240,12 @@ TCVsig.ideltabot=strmatch('deltabot',TCVkeywrdall,'exact'); ...@@ -237,8 +240,12 @@ TCVsig.ideltabot=strmatch('deltabot',TCVkeywrdall,'exact');
TCVsig.ineint=strmatch('neint',TCVkeywrdall,'exact'); TCVsig.ineint=strmatch('neint',TCVkeywrdall,'exact');
TCVsig.ine=strmatch('ne',TCVkeywrdall,'exact'); TCVsig.ine=strmatch('ne',TCVkeywrdall,'exact');
TCVsig.ite=strmatch('te',TCVkeywrdall,'exact'); TCVsig.ite=strmatch('te',TCVkeywrdall,'exact');
TCVsig.ine_edge=strmatch('ne_edge',TCVkeywrdall,'exact');
TCVsig.ite_edge=strmatch('te_edge',TCVkeywrdall,'exact');
TCVsig.inerho=strmatch('nerho',TCVkeywrdall,'exact'); TCVsig.inerho=strmatch('nerho',TCVkeywrdall,'exact');
TCVsig.iterho=strmatch('terho',TCVkeywrdall,'exact'); TCVsig.iterho=strmatch('terho',TCVkeywrdall,'exact');
TCVsig.inerho_edge=strmatch('nerho_edge',TCVkeywrdall,'exact');
TCVsig.iterho_edge=strmatch('terho_edge',TCVkeywrdall,'exact');
TCVsig.inerhozshift=strmatch('nerhozshift',TCVkeywrdall,'exact'); TCVsig.inerhozshift=strmatch('nerhozshift',TCVkeywrdall,'exact');
TCVsig.iterhozshift=strmatch('terhozshift',TCVkeywrdall,'exact'); TCVsig.iterhozshift=strmatch('terhozshift',TCVkeywrdall,'exact');
TCVsig.iprofnerho=strmatch('profnerho',TCVkeywrdall,'exact'); TCVsig.iprofnerho=strmatch('profnerho',TCVkeywrdall,'exact');
...@@ -269,12 +276,16 @@ TCVkeywrdcase(TCVsig.ivol)=TCVkeywrdall(TCVsig.ivol); % special as nodes _2 or _ ...@@ -269,12 +276,16 @@ TCVkeywrdcase(TCVsig.ivol)=TCVkeywrdall(TCVsig.ivol); % special as nodes _2 or _
TCVkeywrdcase(TCVsig.irhovol)=TCVkeywrdall(TCVsig.irhovol); % idem vol TCVkeywrdcase(TCVsig.irhovol)=TCVkeywrdall(TCVsig.irhovol); % idem vol
TCVkeywrdcase(TCVsig.ine)=TCVkeywrdall(TCVsig.ine); % special as dimensions from other nodes TCVkeywrdcase(TCVsig.ine)=TCVkeywrdall(TCVsig.ine); % special as dimensions from other nodes
TCVkeywrdcase(TCVsig.ite)=TCVkeywrdall(TCVsig.ite); % idem TCVkeywrdcase(TCVsig.ite)=TCVkeywrdall(TCVsig.ite); % idem
TCVkeywrdcase(TCVsig.ine_edge)=TCVkeywrdall(TCVsig.ine_edge); % special as dimensions from other nodes
TCVkeywrdcase(TCVsig.ite_edge)=TCVkeywrdall(TCVsig.ite_edge); % idem
TCVkeywrdcase(TCVsig.inerho)=TCVkeywrdall(TCVsig.inerho); % idem TCVkeywrdcase(TCVsig.inerho)=TCVkeywrdall(TCVsig.inerho); % idem
TCVkeywrdcase(TCVsig.inerho_edge)=TCVkeywrdall(TCVsig.inerho_edge); % idem
TCVkeywrdcase(TCVsig.iteft_trial)=TCVkeywrdall(TCVsig.iteft_trial); % special to extract trial_indx if needed TCVkeywrdcase(TCVsig.iteft_trial)=TCVkeywrdall(TCVsig.iteft_trial); % special to extract trial_indx if needed
TCVkeywrdcase(TCVsig.ineft_trial)=TCVkeywrdall(TCVsig.ineft_trial); % special to extract trial_indx if needed TCVkeywrdcase(TCVsig.ineft_trial)=TCVkeywrdall(TCVsig.ineft_trial); % special to extract trial_indx if needed
TCVkeywrdcase(TCVsig.iteftav_trial)=TCVkeywrdall(TCVsig.iteftav_trial); % special to extract trial_indx if needed TCVkeywrdcase(TCVsig.iteftav_trial)=TCVkeywrdall(TCVsig.iteftav_trial); % special to extract trial_indx if needed
TCVkeywrdcase(TCVsig.ineftav_trial)=TCVkeywrdall(TCVsig.ineftav_trial); % special to extract trial_indx if needed TCVkeywrdcase(TCVsig.ineftav_trial)=TCVkeywrdall(TCVsig.ineftav_trial); % special to extract trial_indx if needed
TCVkeywrdcase(TCVsig.iterho)=TCVkeywrdall(TCVsig.iterho); % idem TCVkeywrdcase(TCVsig.iterho)=TCVkeywrdall(TCVsig.iterho); % idem
TCVkeywrdcase(TCVsig.iterho_edge)=TCVkeywrdall(TCVsig.iterho_edge); % idem
TCVkeywrdcase(TCVsig.inerhozshift)=TCVkeywrdall(TCVsig.inerhozshift); % idem TCVkeywrdcase(TCVsig.inerhozshift)=TCVkeywrdall(TCVsig.inerhozshift); % idem
TCVkeywrdcase(TCVsig.iterhozshift)=TCVkeywrdall(TCVsig.iterhozshift); % idem TCVkeywrdcase(TCVsig.iterhozshift)=TCVkeywrdall(TCVsig.iterhozshift); % idem
TCVkeywrdcase(TCVsig.iprofnerho)=TCVkeywrdall(TCVsig.iprofnerho); TCVkeywrdcase(TCVsig.iprofnerho)=TCVkeywrdall(TCVsig.iprofnerho);
...@@ -517,6 +528,36 @@ switch TCVkeywrdcase{index} ...@@ -517,6 +528,36 @@ switch TCVkeywrdcase{index}
end end
mdsclose('mdsip'); mdsclose('mdsip');
%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
case {'ne_edge','te_edge'}
% ne or Te from Thomson.edge data on raw z mesh vs (z,t)
mdsopen(shot);
if strcmp(TCVkeywrdcase{index},'ne')
nodenameeff='\results::thomson.edge:ne';
tracetdi=tdi(nodenameeff);
tracestd=tdi('\results::thomson.edge:ne:error_bar');
else
nodenameeff='\results::thomson.edge:te';
tracetdi=tdi(nodenameeff);
tracestd=tdi('\results::thomson.edge:te:error_bar');
trace_abs=tdi('\results::thomson.edge:fir_thom_rat');
end
trace.data=tracetdi.data'; % Thomson.Edge data as (t,z)
trace.std=tracestd.data';
trace.name=[num2str(shot) ';' nodenameeff];
% add correct dimensions
time=mdsdata('\results::thomson:times');
z=mdsdata('\diagz::thomson_set_up.edge:vertical_pos');
trace.dim=[{z};{time}];
trace.dimunits=[{'Z [m]'} ; {'time [s]'}];
trace.x=z;
trace.t=time;
% 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
mdsclose('mdsip');
%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
case {'nerho','terho'} case {'nerho','terho'}
% ne or Te from Thomson data on rho=sqrt(psi_normalised) mesh: (rho,t) % ne or Te from Thomson data on rho=sqrt(psi_normalised) mesh: (rho,t)
...@@ -577,6 +618,66 @@ switch TCVkeywrdcase{index} ...@@ -577,6 +618,66 @@ switch TCVkeywrdcase{index}
end end
mdsclose; mdsclose;
%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
case {'nerho_edge','terho_edge'}
% ne or Te from Thomson.Edge data on rho=sqrt(psi_normalised) mesh: (rho,t)
mdsopen(shot);
time=mdsdata('\results::thomson:times');
if strcmp(TCVkeywrdcase{index},'nerho')
nodenameeff='\results::thomson.edge:ne';
tracetdi=tdi(nodenameeff);
if isempty(tracetdi.data)
ishot=mdsopen(shot)
tracetdi=tdi(nodenameeff)
end
nodenameeff='\results::thomson.edge:ne; error_bar ; fir_thom_rat; (ne,std)*fir_thom_rat';
tracestd=tdi('\results::thomson.edge:ne:error_bar');
if shot>=23801
tracefirrat=tdi('\results::thomson.profiles.auto:fir_thom_rat'); %time base not same!!
if isempty(tracefirrat.data)
disp('problem with \results::thomson.profiles.auto:fir_thom_rat: empty')
end
else
tracefirrat=tdi('\results::thomson.edge:fir_thom_rat');
tracefirrat.dim{1}=time;
end
tracefirrat_data=NaN*ones(size(tracetdi.dim{1}));
if ~isempty(tracefirrat.data)
itim=iround(time,tracefirrat.dim{1});
tracefirrat_data(itim)=tracefirrat.data;
end
else
nodenameeff='\results::thomson.edge:te';
tracetdi=tdi(nodenameeff);
nodenameeff='\results::thomson.edge:te; error_bar';
tracestd=tdi('\results::thomson.edge:te:error_bar');
end
trace.data=tracetdi.data'; % Thomson.Edge data as (t,z)
trace.std=tracestd.data';
if strcmp(TCVkeywrdcase{index},'nerho')
trace.firrat=tracefirrat_data;
trace.data_abs=trace.data*diag(tracefirrat_data);
trace.std_abs=trace.std*diag(tracefirrat_data);
end
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]);
for ir=1:length(psiscatvol.dim{2})
rho(ir,:)= sqrt(1.-psiscatvol.data(:,ir)./psi_max.data(:))';
end
trace.dim=[{rho};{time}];
trace.dimunits=[{'sqrt(psi)'} ; {'time [s]'}];
trace.x=rho;
trace.t=time;
% 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
mdsclose;
%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
case {'nerhozshift','terhozshift'} case {'nerhozshift','terhozshift'}
% ne or Te from Thomson data on rho=sqrt(psi_normalised) mesh: (rho,t) % ne or Te from Thomson data on rho=sqrt(psi_normalised) mesh: (rho,t)
......
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