diff --git a/matlab/AUG/aug_requests_mapping.m b/matlab/AUG/aug_requests_mapping.m index 43a991fbd99a2a8e3d054eec5134ee65c273898c..94e6f6755be28c2bd0a6c9eb1d5a7c40db97787c 100644 --- a/matlab/AUG/aug_requests_mapping.m +++ b/matlab/AUG/aug_requests_mapping.m @@ -276,8 +276,11 @@ switch lower(data_request) mapping.expression = ['params_eff = gdat_data.gdat_params;params_eff.data_request=''nel'';' ... 'gdat_tmp=gdat_aug(shot,params_eff);params_eff.data_request=''n_greenwald'';' ... 'gdat_tmp2=gdat_aug(shot,params_eff);ij=find(gdat_tmp2.data==0);gdat_tmp2.data(ij)=NaN;' ... - 'tmp_data2=interp1(gdat_tmp2.t,gdat_tmp2.data,gdat_tmp.t,[],NaN);' ... - 'gdat_tmp.data = gdat_tmp.data./(tmp_data2+1e-5);']; + 'if numel(gdat_tmp2.t)>1;tmp_data2=interp1(gdat_tmp2.t,gdat_tmp2.data,gdat_tmp.t,[],NaN);' ... + 'else;tmp_data2=gdat_tmp2.data;end;' ... + 'gdat_tmp.ng=gdat_tmp2;gdat_tmp.ng.data_t_nel=tmp_data2;' ... + 'gdat_tmp.data = gdat_tmp.data./(tmp_data2+1e-5);' ... + 'gdat_tmp.units='''';gdat_tmp.dimunits{1}=''s'';']; % $$$ case 'ni' % $$$ mapping.method = 'switchcase'; % especially since might have option fit, etc case 'pellet' diff --git a/matlab/D3D/d3d_requests_mapping.m b/matlab/D3D/d3d_requests_mapping.m index 84879d6ffc32a7347a6dabd35dd18df55c10334a..90695505311c8f4f0cb377308de15cf7d77c9708 100644 --- a/matlab/D3D/d3d_requests_mapping.m +++ b/matlab/D3D/d3d_requests_mapping.m @@ -254,7 +254,9 @@ switch lower(data_request) mapping.expression = ['params_eff = gdat_data.gdat_params;params_eff.data_request=''nel'';' ... 'gdat_tmp=gdat_d3d(shot,params_eff);params_eff.data_request=''n_greenwald'';' ... 'gdat_tmp2=gdat_d3d(shot,params_eff);ij=find(gdat_tmp2.data==0);gdat_tmp2.data(ij)=NaN;' ... - 'tmp_data2=interp1(gdat_tmp2.t,gdat_tmp2.data,gdat_tmp.t,[],NaN);' ... + 'if numel(gdat_tmp2.t)>1;tmp_data2=interp1(gdat_tmp2.t,gdat_tmp2.data,gdat_tmp.t,[],NaN);' ... + 'else;tmp_data2=gdat_tmp2.data;end;' ... + 'gdat_tmp.ng=gdat_tmp2;gdat_tmp.ng.data_t_nel=tmp_data2;' ... 'gdat_tmp.data = gdat_tmp.data*1e6./(tmp_data2+1e-5);' ... 'gdat_tmp.units='''';gdat_tmp.dimunits{1}=''s'';']; case {'f2b', 'pcf2b'} diff --git a/matlab/TCV/gdat_tcv.m b/matlab/TCV/gdat_tcv.m index 43a7b34b78067a271255050f71e197dc3ec2a5fa..17933ceefd2a2c134beca063da92dbee017036f6 100644 --- a/matlab/TCV/gdat_tcv.m +++ b/matlab/TCV/gdat_tcv.m @@ -2233,7 +2233,7 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') gdat_data.units = 'particles/m^3'; nel.dim{1} = neft.fit.t'; nel.data = ones(size(nel.dim{1})); - gdat_data.r_center_chord = 0.903; + gdat_data.r_center_chord = 0.903; % mdsvalue('\diagz::fir_array:radii[5]') (6th chord is central) [ratio,fir_times,z_lineint]=fir_ratio_from_fits(neft.fit.data,neft.fit.x,psitbx01,nel,gdat_data.r_center_chord,gdat_data.t',1,1e3); gdat_data.data = reshape(1./ratio./z_lineint,numel(ratio),1); gdat_data.data_fullpath = ['line-averaged density from fit using ' neft.fit.data_fullpath]; diff --git a/matlab/TCV/tcv_requests_mapping.m b/matlab/TCV/tcv_requests_mapping.m index ce8a01441a5d585848dde445379a870f69c3b106..b68d12da31544a73b3c470c6ccea533a60654b3c 100644 --- a/matlab/TCV/tcv_requests_mapping.m +++ b/matlab/TCV/tcv_requests_mapping.m @@ -297,6 +297,7 @@ switch lower(data_request) 'gdat_tmp2=gdat_tcv(shot,params_eff);ij=find(gdat_tmp2.data==0);gdat_tmp2.data(ij)=NaN;' ... 'if numel(gdat_tmp2.t)>1;tmp_data2=interp1(gdat_tmp2.t,gdat_tmp2.data,gdat_tmp.t,[],NaN);' ... 'else;tmp_data2=gdat_tmp2.data;end;' ... + 'gdat_tmp.ng=gdat_tmp2;gdat_tmp.ng.data_t_nel=tmp_data2;' ... 'gdat_tmp.data = gdat_tmp.data./(tmp_data2+1e-5);' ... 'gdat_tmp.units='''';gdat_tmp.dimunits{1}=''s'';']; case {'ec_data', 'aux', 'h_cd', 'nbi_data', 'ic_data', 'lh_data', 'ohm_data', 'bs_data'} @@ -442,6 +443,11 @@ switch lower(data_request) mapping.expression = '\results::r_axis'; mapping.expression = '\tcv_shot::top.results.equil_1.results:r_axis'; mapping.expression = 'tcv_eq("r_axis","LIUQE.M")'; + case {'r_xpts', 'rxpts', 'r_xpt'} + mapping.timedim = 2; + mapping.label = 'R\_Xpts'; + mapping.method = 'tdiliuqe'; + mapping.expression = 'tcv_eq("r_xpts","LIUQE.M")'; case {'rtc','scd'} if strcmp('scd',lower(data_request)); error('********* should call with request****** ''rtc'''); end mapping.timedim = 1; @@ -574,6 +580,11 @@ switch lower(data_request) mapping.expression = '\results::z_axis'; mapping.expression = '\tcv_shot::top.results.equil_1.results:z_axis'; mapping.expression = 'tcv_eq("z_axis","LIUQE.M")'; + case {'z_xpts', 'zxpts', 'z_xpt'} + mapping.timedim = 2; + mapping.label = 'Z\_Xpts'; + mapping.method = 'tdiliuqe'; + mapping.expression = 'tcv_eq("z_xpts","LIUQE.M")'; % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % extra TCV cases (not necessarily in official data_request name list)