diff --git a/matlab/AUG/gdat_aug.m b/matlab/AUG/gdat_aug.m index a5239927653eab32cc0d7a102be36318bab4ae3b..00dcc381f3eacb45874fe59b7242c6d5e6036d53 100644 --- a/matlab/AUG/gdat_aug.m +++ b/matlab/AUG/gdat_aug.m @@ -540,7 +540,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase') try % eval(['[r_time]=sf2ab(diag_name,shot,r_node,''-exp'',exp_name_eff' extra_arg_sf2sig_eff_string ');']); % both for CEZ and CMZ, and.. Ti:1 is ok, otherwise introduce string above - [r_time,err]=rdaAUG_eff(shot,diag_name,r_node,exp_name_eff,[],extra_arg_sf2sig_eff_string,['area-base:' r_node ':1']); + [r_time,err]=rdaAUG_eff(shot,diag_name,'Ti',exp_name_eff,[],extra_arg_sf2sig_eff_string,['area-base:' r_node ':1']); catch ME_R_time % assume no shotfile disp(getReport(ME_R_time)) @@ -552,7 +552,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase') gdat_data.r(inotok) = NaN; try % eval(['[z_time]=sf2ab(diag_name,shot,z_node,''-exp'',exp_name_eff' extra_arg_sf2sig_eff_string ');']); - [z_time,err]=rdaAUG_eff(shot,diag_name,z_node,exp_name_eff,[],extra_arg_sf2sig_eff_string,['area-base:' z_node ':1']); + [z_time,err]=rdaAUG_eff(shot,diag_name,'Ti',exp_name_eff,[],extra_arg_sf2sig_eff_string,['area-base:' z_node ':1']); gdat_data.z = z_time.data; inotok=find(gdat_data.z<=0); gdat_data.z(inotok) = NaN; diff --git a/matlab/AUG/rdaAUG_eff.m b/matlab/AUG/rdaAUG_eff.m index 4f18a96561aa1829432ee2b18c6b8adb8bedc17d..ddbc37e2a80aae27839f6e74a42e9cd87023df3d 100644 --- a/matlab/AUG/rdaAUG_eff.m +++ b/matlab/AUG/rdaAUG_eff.m @@ -180,10 +180,12 @@ if usemdsplus end if ~isempty(area_time_base_name) if nargin_eff>=5 & ~isempty(varargin_eff{1}) - eval(['[data,error]=mdsvalue(''_rdaeff' user diagname '=augdiag(' num2str(shot) ',"' diagname '","' area_time_base_name '","' shotfile_exp ... + eval(['[data,error]=mdsvalue(''_rdaeff' user diagname '=augdiag(' num2str(shot) ',"' diagname '","' sigtype '","' shotfile_exp ... '",' ed_number ',' num2str(varargin_eff{1}(1),'%.14f') ',' num2str(varargin_eff{1}(end),'%.14f') ')'');']); +% $$$ eval(['[data,error]=mdsvalue(''_rdaeff' user diagname '=augdiag(' num2str(shot) ',"' diagname '","' area_time_base_name '","' shotfile_exp ... +% $$$ '",' ed_number ',' num2str(varargin_eff{1}(1),'%.14f') ',' num2str(varargin_eff{1}(end),'%.14f') ')'');']); else - eval(['[data,error]=mdsvalue(''_rdaeff' user diagname '=augdiag(' num2str(shot) ',"' diagname '","' area_time_base_name '","' shotfile_exp ... + eval(['[data,error]=mdsvalue(''_rdaeff' user diagname '=augdiag(' num2str(shot) ',"' diagname '","' sigtype '","' shotfile_exp ... '",' ed_number ',,,_oshot' user diagname ',_oed' user diagname ')'');']); end if ~isempty(area_time_base_dimof) diff --git a/matlab/TCV/gdat_tcv.m b/matlab/TCV/gdat_tcv.m index 2101495af9bb379adf316dfc803a32e5cc7adc8a..e45c3246d111c0d1b58d39195eb0518e4979ab0b 100644 --- a/matlab/TCV/gdat_tcv.m +++ b/matlab/TCV/gdat_tcv.m @@ -1174,7 +1174,7 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') for itime=1:length(time) time_eff = time(itime); % use read_results updated to effectively obtain an eqdsk with sign correct with COCOS=2 - [fnames_readresults]=read_results_for_chease(shot,time_eff,liuqe_version,3,[],[],[],zshift,0,1,nrz_out); + [fnames_readresults]=read_results_for_chease(shot,time_eff,liuqe_version_eff,3,[],[],[],zshift,0,1,nrz_out); cocos_read_results_for_chease = 17; if isempty(fnames_readresults) if gdat_params.nverbose>=1; @@ -1996,6 +1996,8 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') % Add the results to the output of gdat gdat_data.psiscatvol = psiscatvol; gdat_data.psi_max = psi_max; + r_thomson = gdat_tcv(gdat_data.shot,'\DIAGZ::THOMSON_SET_UP:RADIAL_POS'); + gdat_data.r_thomson = r_thomson; if ~isempty(psiscatvol.data) && ~ischar(psiscatvol.data) && ~isempty(psi_max.data) && ~ischar(psi_max.data) psi_norm = 1.-psiscatvol.data./repmat(psi_max.data(:).',[size(psiscatvol.data,1),1]); @@ -2012,13 +2014,11 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') r_edge = gdat(gdat_data.shot,params_eff); params_eff.data_request='z_contour_edge'; z_edge = gdat(gdat_data.shot,params_eff); - Z_thomson = psiscatvol.dim{1}; - %OS: not ok for old shots: R_thomson = gdat_tcv(gdat_data.shot,'\tcv_shot::top.diagz.measurements.thomson.set_up:radial_pos'); - R_thomson.data = 0.90*ones(size(Z_thomson)); + z_thomson = psiscatvol.dim{1}; psinorm_max = max(max(psi_norm)); for it=1:numel(psiscatvol.dim{2}) iteq=iround_os(r_edge.t,psiscatvol.dim{2}(it)); - inpol=inpolygon(R_thomson.data,Z_thomson,r_edge.data(:,iteq),z_edge.data(:,iteq)); + inpol=inpolygon(r_thomson.data,z_thomson,r_edge.data(:,iteq),z_edge.data(:,iteq)); is_private_flux = [psi_norm(:,it) < 1] & ~inpol; % at this stage set private flux "rho" to max, could use 1.3^2 psi_norm(is_private_flux,it) = psinorm_max; @@ -3688,7 +3688,7 @@ switch numel(zshifteff) end % Get LIUQE times corresponding to TS times -t_eq = t_psi(iround(t_psi,t_th)); +t_eq = t_psi(iround_os(t_psi,t_th)); % Get PSI map psi = psitbxtcv(gdat_data.shot,t_eq,'*0',psitbx_str); diff --git a/matlab/gdat_plot.m b/matlab/gdat_plot.m index 85b1d86acadfa61760da60d6b1fa69c40b71d389..866c24118bb94eec1872a7fda94c1a8813735c01 100644 --- a/matlab/gdat_plot.m +++ b/matlab/gdat_plot.m @@ -64,7 +64,11 @@ if all(isfield(gdat_data,{'data','t'})) && ~isempty(gdat_data.data) && ~isempty( elseif any(find(size(gdat_data.data)==length(gdat_data.t))) try if length(size(gdat_data.data))<=2 - plot(gdat_data.t,gdat_data.data); + if isnumeric(gdat_data.t) + plot(gdat_data.t,gdat_data.data); + elseif iscell(gdat_data.t) + plot(str2num(cell2mat(gdat_data.t)),gdat_data.data); + end else disp('WARNING') disp(['size(gdat_data.data) = ' num2str(size(gdat_data.data)) ', >2D thus do not try to plot'])