diff --git a/matlab/AUG/rdaAUG_eff.m b/matlab/AUG/rdaAUG_eff.m index c70aa41e53b51575b7207fa1603dac5ebd24678a..d1ac063d39559dd2bee11f50758cffaf606ad2c8 100644 --- a/matlab/AUG/rdaAUG_eff.m +++ b/matlab/AUG/rdaAUG_eff.m @@ -167,6 +167,9 @@ if usemdsplus % use augsignal to get effective layout as in ISIS and sf2sig, for example for EQI/PFM eval(['[data,error]=mdsvalue(''_rdaeff' user diagname '=augsignal(' num2str(shot) ',"' diagname '","' sigtype '","' shotfile_exp ... '",' ed_number ',' tstart ',' tend ',_oshot' user diagname ',_oed' user diagname ',' ask_raw ')'');']); + if isnumeric(data) + data=double(data); + end elseif isempty(param_set_name) && ~area_base && ~time_base % use augparam eval(['[data,error]=mdsvalue(''_rdaeff' user diagname '=augparam(' num2str(shot) ',"' diagname '","' sigtype '","' param_name '"' ... diff --git a/matlab/TCV/gdat_tcv.m b/matlab/TCV/gdat_tcv.m index 085c24a49d16e0b67e7a1e3b54186f4b4e7d6cba..11023819e8e91a2c040cf5ba609dc47a6a48855f 100644 --- a/matlab/TCV/gdat_tcv.m +++ b/matlab/TCV/gdat_tcv.m @@ -610,7 +610,11 @@ if strcmp(mapping_for_tcv.method(1:3),'tdi') gdat_data.label=[mapping_for_tcv.expression]; end - gdat_data.help = aatmp.help; + if isfield(mapping_for_tcv,'help') && ~isempty(mapping_for_tcv.help) + gdat_data.help = mapping_for_tcv.help; + else + gdat_data.help = aatmp.help; + end % end of method "tdi" diff --git a/matlab/TCV/tcv_requests_mapping.m b/matlab/TCV/tcv_requests_mapping.m index 7e19352720d39a4f5eb9b971abdaeabc46e833f0..9909a953e12faf245943034c299fe7db3eee168c 100644 --- a/matlab/TCV/tcv_requests_mapping.m +++ b/matlab/TCV/tcv_requests_mapping.m @@ -136,7 +136,7 @@ switch lower(data_request) mapping.timedim = 0; mapping.method = 'tdi'; mapping.expression = '\rtc::node03.params.cfg_file'; - case {'gap_inout', 'gap_out', 'gap_in', 'gap_lfs','gap_hfs'} + case {'gaps', 'gap_inout', 'gap_out', 'gap_in', 'gap_lfs','gap_hfs'} mapping.timedim = 2; mapping.label = 'gap hfs/lfs'; mapping.method = 'expression'; @@ -291,7 +291,7 @@ switch lower(data_request) % node not filled in and in any case need special case for mapping.label = 'toroidal_flux'; mapping.method = 'switchcase'; - case {'p_lh', 'plh'} + case {'p_lh', 'plh', 'plh_s'} mapping.label = 'P\_LH threshold with S'; mapping.timedim = 1; mapping.method = 'expression'; @@ -300,7 +300,8 @@ switch lower(data_request) 'params_eff.data_request=''surface_edge'';gdat_tmp_s=gdat_tcv(shot,params_eff);' ... 's_nel=interpos(gdat_tmp_s.t,gdat_tmp_s.data,gdat_tmp.t,-1.);b0_nel=interpos(gdat_tmpb0.t,gdat_tmpb0.data,gdat_tmp.t,-1.);' ... 'gdat_tmp.data = 0.0488e6.*(gdat_tmp.data/1e20).^0.717.*abs(b0_nel).^0.803.*s_nel.^0.941;' ... - 'gdat_tmp.units=''W'';gdat_tmp.dimunits{1}=''s'';']; + 'gdat_tmp.units=''W'';gdat_tmp.dimunits{1}=''s'';' ... + 'gdat_tmp.help=''Uses Eq(2) from Y R Martin et al 2008 J. Phys.: Conf. Ser. 123 012033 with toroidal Surface. Request "plh_a_r" to get Eq(3) with a and R0 instead'';']; case {'p_lh_a_r', 'plh_a_r'} mapping.label = 'P\_LH threshold with a, R0'; mapping.timedim = 1; @@ -310,7 +311,9 @@ switch lower(data_request) 'params_eff.data_request=''a_minor'';gdat_tmp_a=gdat_tcv(shot,params_eff);' ... 'a_nel=interpos(gdat_tmp_a.t,gdat_tmp_a.data,gdat_tmp.t,-1.);b0_nel=interpos(gdat_tmpb0.t,gdat_tmpb0.data,gdat_tmp.t,-1.);' ... 'gdat_tmp.data = 2.15e6.*(gdat_tmp.data/1e20).^0.782.*abs(b0_nel).^0.772.*a_nel.^0.975.*gdat_tmpb0.r0.^0.999;' ... - 'gdat_tmp.units=''W'';gdat_tmp.dimunits{1}=''s'';']; + 'gdat_tmp.units=''W'';gdat_tmp.dimunits{1}=''s'';' ... + 'gdat_tmp.help=''Uses Eq(3) from Y R Martin et al 2008 J. Phys.: Conf. Ser. 123 012033 with a and R0. Request "plh" to get Eq(2) with toroidal Surface instead'';']; + case 'psi' mapping.timedim = 1; mapping.label = 'psi(R,Z)'; @@ -428,20 +431,32 @@ switch lower(data_request) mapping.expression = ''; case 'surface_rho' mapping.timedim = 1; - mapping.label = 'surface(rho)'; + mapping.label = 'surface\_tor(rho)'; mapping.method = 'tdiliuqe'; mapping.expression = 'tcv_eq(''''surf'''',''''LIUQE.M'''')'; + mapping.help = 'toroidal surface'; % works for method tdi..., in method expression, gdat_tmp.help should be defined case {'surface', 'surface_edge'} mapping.timedim = 1; mapping.label = 'surface'; mapping.method = 'expression'; mapping.expression = ['params_eff = gdat_data.gdat_params;params_eff.data_request=''tcv_eq(''''''''surf'''''''',''''''''LIUQE.M'''''''')'';' ... 'gdat_tmp=gdat_tcv(shot,params_eff); gdat_tmp.dim = {gdat_tmp.t}; gdat_tmp.x=[]; gdat_tmp.data= gdat_tmp.data(end,:);' ... - 'gdat_tmp.dimunits{1}=''s'';']; + 'gdat_tmp.dimunits{1}=''s'';gdat_tmp.help=''toroidal surface of LCFS'';']; case 'sxr' mapping.timedim = 1; mapping.gdat_timedim = 2; mapping.method = 'switchcase'; + case 'tau_r' + mapping.timedim = 1; + mapping.gdat_timedim = 1; + mapping.method = 'expression'; + mapping.expression = ['params_eff = gdat_data.gdat_params;params_eff.data_request=''a_minor''; ' ... + 'gdat_tmp=gdat_tcv([],params_eff); ' ... + 'params_eff = gdat_data.gdat_params;params_eff.data_request=''\results::ibs:signeo''; ' ... + 'aa=gdat_tcv([],params_eff);ix=iround_os(aa.x,0.4); ' ... + 'bb=interpos(aa.t,aa.data(ix,:),gdat_tmp.t,-100);' ... + 'gdat_tmp.data = 4e-7*pi.*gdat_tmp.data.^2.*bb./1.22; gdat_tmp.label=''\tau_R'';gdat_tmp.gdat_request=''tau_r'';' ... + 'gdat_tmp.units=''s'';gdat_tmp.help=''tauR=mu0 a^2 / 1.22 etaneo(rhopol=0.4)''']; case 'te' mapping.timedim = 2; mapping.label = 'Te';