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

to have same nerho as nerho

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@4547 d63d8f72-b253-0410-a779-e742ad2e26cf
parent f85dd7a5
No related branches found
No related tags found
No related merge requests found
...@@ -804,16 +804,38 @@ switch TCVkeywrdcase{index} ...@@ -804,16 +804,38 @@ switch TCVkeywrdcase{index}
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)
% allow for z shift of equil % allow for z shift of equil
if nargin>=2 & ~isempty(varargin{1}) if nargin>=3 & ~isempty(varargin{1})
zshift=varargin{1}; zshift=varargin{1};
else else
zshift=0.; zshift=0.;
end end
mdsopen(shot); mdsopen(shot);
time=mdsdata('\results::thomson:times');
if strcmp(TCVkeywrdcase{index},'nerhozshift') if strcmp(TCVkeywrdcase{index},'nerhozshift')
nodenameeff='\results::thomson:ne'; nodenameeff='\results::thomson:ne';
tracetdi=tdi(nodenameeff); tracetdi=tdi(nodenameeff);
tracestd=tdi('\results::thomson:ne:error_bar'); tracestd=tdi('\results::thomson:ne:error_bar');
if shot>=23801
tracefirrat=tdi('\results::thomson.profiles.auto:fir_thom_rat'); %time base not same!!
if isempty(tracefirrat.data) || ischar(tracefirrat.data)
disp('problem with \results::thomson.profiles.auto:fir_thom_rat: empty')
end
else
tracefirrat=tdi('\results::thomson:fir_thom_rat');
if isempty(tracefirrat.data) || ischar(tracefirrat.data)
disp('problem with \results::thomson.profiles.auto:fir_thom_rat: empty')
tracefirrat.dim{1}=[];
else
tracefirrat.dim{1}=time;
end
end
if ~isempty(tracefirrat.data) || ischar(tracefirrat.data)
tracefirrat_data=NaN*ones(size(tracetdi.dim{1}));
itim=iround(time,tracefirrat.dim{1});
tracefirrat_data(itim)=tracefirrat.data;
else
tracefirrat_data=NaN;
end
else else
nodenameeff='\results::thomson:te'; nodenameeff='\results::thomson:te';
tracetdi=tdi(nodenameeff); tracetdi=tdi(nodenameeff);
...@@ -821,9 +843,13 @@ switch TCVkeywrdcase{index} ...@@ -821,9 +843,13 @@ switch TCVkeywrdcase{index}
end end
trace.data=tracetdi.data'; % Thomson data as (t,z) trace.data=tracetdi.data'; % Thomson data as (t,z)
trace.std=tracestd.data'; trace.std=tracestd.data';
if strcmp(TCVkeywrdcase{index},'nerhozshift')
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]; trace.name=[num2str(shot) ';' nodenameeff];
% add correct dimensions % add correct dimensions
time=mdsdata('\results::thomson:times');
% construct rho mesh % construct rho mesh
if strcmp(endstr,'_-1') if strcmp(endstr,'_-1')
error(['in ' TCVkeywrdcase{index} ' endstr should not be ' endstr]); error(['in ' TCVkeywrdcase{index} ' endstr should not be ' endstr]);
......
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