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

use verbose for edge stuff to allow not printing warnings, fill in grids_1d empty if data empty

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@5872 d63d8f72-b253-0410-a779-e742ad2e26cf
parent 0671cd68
Branches
Tags
No related merge requests found
...@@ -901,8 +901,8 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') ...@@ -901,8 +901,8 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
edge_str_ = '_edge'; edge_str_ = '_edge';
edge_str_dot = '.edge'; edge_str_dot = '.edge';
end end
psi_max=gdat([],['\results::thomson' edge_str_dot ':psi_max' substr_liuqe]); psi_max=gdat([],['\results::thomson' edge_str_dot ':psi_max' substr_liuqe],'nverbose',gdat_params.nverbose);
psiscatvol=gdat([],['\results::thomson' edge_str_dot ':psiscatvol' substr_liuqe]); psiscatvol=gdat([],['\results::thomson' edge_str_dot ':psiscatvol' substr_liuqe],'nverbose',gdat_params.nverbose);
if abs(zshift)>1e-5 if abs(zshift)>1e-5
% calculate new psiscatvol % calculate new psiscatvol
psitdi=tdi(['\results::psi' substr_liuqe]); psitdi=tdi(['\results::psi' substr_liuqe]);
...@@ -936,7 +936,9 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') ...@@ -936,7 +936,9 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
rho(ir,:)= sqrt(1.-psiscatvol.data(:,ir)./psi_max.data(:))'; rho(ir,:)= sqrt(1.-psiscatvol.data(:,ir)./psi_max.data(:))';
end end
else else
if gdat_params.nverbose>=1; warning(['psiscatvol empty?, no rho calculated for data_request = ' data_request_eff]); end if gdat_params.nverbose>=1 && gdat_data.gdat_params.edge==0
warning(['psiscatvol empty?, no rho calculated for data_request = ' data_request_eff]);
end
rho=[]; rho=[];
end end
gdat_data.dim{1}=rho; gdat_data.dim{1}=rho;
...@@ -1825,7 +1827,7 @@ function [gdat_data] = get_grids_1d(gdat_data,nbdim_x,nopt,nverbose); ...@@ -1825,7 +1827,7 @@ function [gdat_data] = get_grids_1d(gdat_data,nbdim_x,nopt,nverbose);
% %
gdat_data.grids_1d.rhopolnorm = gdat_data.x; gdat_data.grids_1d.rhopolnorm = gdat_data.x;
if (nopt == 0) if (nopt == 0) || isempty(gdat_data.x) || isempty(gdat_data.t) || isempty(gdat_data.data) || ischar(gdat_data.data)
gdat_data.grids_1d.rhotornorm = []; gdat_data.grids_1d.rhotornorm = [];
gdat_data.grids_1d.rhovolnorm = []; gdat_data.grids_1d.rhovolnorm = [];
gdat_data.grids_1d.psi = []; gdat_data.grids_1d.psi = [];
...@@ -1839,6 +1841,7 @@ params_eff.data_request='rhotor'; ...@@ -1839,6 +1841,7 @@ params_eff.data_request='rhotor';
rhotor = gdat(gdat_data.shot,params_eff); rhotor = gdat(gdat_data.shot,params_eff);
params_eff.data_request='rhovol'; params_eff.data_request='rhovol';
rhovol = gdat(gdat_data.shot,params_eff); rhovol = gdat(gdat_data.shot,params_eff);
psi0 = interpos(rhotor.t',rhotor.psi_axis,gdat_data.t,-0.01); psi0 = interpos(rhotor.t',rhotor.psi_axis,gdat_data.t,-0.01);
if (nbdim_x == 1) if (nbdim_x == 1)
gdat_data.grids_1d.psi = gdat_data.grids_1d.rhopolnorm.^2*reshape(psi0,1,length(psi0)); gdat_data.grids_1d.psi = gdat_data.grids_1d.rhopolnorm.^2*reshape(psi0,1,length(psi0));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment