diff --git a/TCV/loadTCVdata.m b/TCV/loadTCVdata.m index b783988092324022ec8da6debfb462d471daecc2..02cce761f9d80821d7ae86e3c43719e8aa436874 100644 --- a/TCV/loadTCVdata.m +++ b/TCV/loadTCVdata.m @@ -433,12 +433,24 @@ switch TCVkeywrdcase{index} case {'nerho','terho'} % ne or Te from Thomson data on rho=sqrt(psi_normalised) mesh: (rho,t) mdsopen(shot); + time=mdsdata('\results::thomson:times'); if strcmp(TCVkeywrdcase{index},'nerho') nodenameeff='\results::thomson:ne'; - nodenameeff='\results::thomson:ne; error_bar ; fir_thom_rat'; tracetdi=tdi(nodenameeff); + nodenameeff='\results::thomson:ne; error_bar ; fir_thom_rat; (ne,std)*fir_thom_rat'; tracestd=tdi('\results::thomson:ne:error_bar'); - tracefirrat=tdi('\results::thomson:fir_thom_rat'); + 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:fir_thom_rat'); + tracefirrat.dim{1}=time; + end + itim=iround(time,tracefirrat.dim{1}); + tracefirrat_data=NaN*ones(size(tracetdi.dim{1})); + tracefirrat_data(itim)=tracefirrat.data; else nodenameeff='\results::thomson:te'; tracetdi=tdi(nodenameeff); @@ -447,10 +459,13 @@ switch TCVkeywrdcase{index} end trace.data=tracetdi.data'; % Thomson data as (t,z) trace.std=tracestd.data'; - trace.firrat=tracefirrat.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 - time=mdsdata('\results::thomson:times'); % construct rho mesh psi_max=tdi(['\results::thomson:psi_max' liuqe_ext]); psiscatvol=tdi(['\results::thomson:psiscatvol' liuqe_ext]);