diff --git a/crpptbx/TCV/gdat_tcv.m b/crpptbx/TCV/gdat_tcv.m index e5c465ec51d5076a8ac651d71994ef716d90826e..a850e622a10e842ccc4161624e2f5a96002d7097 100644 --- a/crpptbx/TCV/gdat_tcv.m +++ b/crpptbx/TCV/gdat_tcv.m @@ -2047,11 +2047,32 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') end params_eff.data_request='psi_axis'; % psi_edge=0 with LIUQE psi_axis=gdat_tcv(shot,params_eff); - % assume same dimensions, check + % assume same dimensions, check. Note data dims can be different from dim{} when there is a problem with liuqe run if numel(phi_tor.data) ~= numel(q_rho.data) || numel(psi_axis.data) ~= numel(phi_tor.dim{2}) - disp(['problems in gdat_tcv with ' data_request_eff ' with unexpected dimensions']) + warning(['problems in gdat_tcv with ' data_request_eff ' with unexpected dimensions']) return; end + % check time sizes since can happen problems with old liuqe runs + if size(q_rho.data,2) ~= size(phi_tor.data,2) + warning(['time sizes between q_rho and phi_tor do not match: ' num2str(size(q_rho.data,2)) ' and ' num2str(size(phi_tor.data,2))]); + return + end + if size(q_rho.data,2) ~= length(psi_axis.data) + psi_axis + q_rho + disp('q_rho.dim');q_rho.dim + phi_tor + disp('phi_tor.dim');phi_tor.dim + disp(['WARNING: time sizes between q_rho and psi_axis do not match: ' num2str(size(q_rho.data,2)) ' and ' ... + num2str(length(psi_axis.data))]); + disp('WARNING: should have been caught, so probably q_rho.dim not the same as data(:,:) dims') + disp('should run: >> liuqe_default_run_sequence(shot)') + return + end + if size(q_rho.data,1) ~= size(phi_tor.data,1) + warning(['radial sizes between q_rho and phi_tor do not match: ' num2str(size(q_rho.data,1)) ' and ' num2str(size(phi_tor.data,1))]); + return + end for it=1:size(q_rho.data,2) %if any(~isfinite(phi_tor.data(:,it))) ij=find(isfinite(q_rho.data(:,it))); diff --git a/crpptbx/get_grids_1d.m b/crpptbx/get_grids_1d.m index c39c59f1dfa756963abafc78871ec6d9095e49a0..12da7bd6d8d05470851e20d5c5f00c0acb02f275 100644 --- a/crpptbx/get_grids_1d.m +++ b/crpptbx/get_grids_1d.m @@ -50,7 +50,7 @@ gdat_data.grids_1d.rhotornorm = NaN*ones(size(gdat_data.data)); gdat_data.grids_1d.rhovolnorm = NaN*ones(size(gdat_data.data)); if (isempty(rhotor_norm.x) ||isempty(rhotor_norm.t) || isempty(rhotor_norm.data)) ... - && (isempty(rhovol.x) ||isempty(rhovol.t) || isempty(rhovol.data)) + || (isempty(rhovol.x) ||isempty(rhovol.t) || isempty(rhovol.data)) return end @@ -104,5 +104,3 @@ end gdat_data.grids_1d.rhotor_edge=interpos(-63,rhotor_norm.t',rhotor_norm.rhotor_edge,gdat_data.t',-0.01); gdat_data.grids_1d.volume_edge=interpos(-63,rhovol.t',rhovol.volume_edge,gdat_data.t',-0.01); gdat_data.grids_1d.b0=interpos(-63,rhotor_norm.t',rhotor_norm.b0,gdat_data.t',-0.01); - -