Commit f5bc4eb7 authored by Olivier Sauter's avatar Olivier Sauter
Browse files

simplifications

parent e1a9abe8
Pipeline #96563 canceled with stages
in 1 minute and 32 seconds
......@@ -1308,12 +1308,10 @@ elseif strcmp(mapping_for_aug.method,'switchcase')
{'Ar_tot','Sum of calibrated Ar gas-fluxes (= Ar*18/s)'}];
for i=1:size(uvs_signals_source,1)
uvs_signals.(uvs_signals_source{i,1}) = gdat_aug(shot,{'UVS',uvs_signals_source{i,1}});
if isempty(gdat_data.t) && prod(isfinite(uvs_signals.(uvs_signals_source{i,1}).t)) && isvector(uvs_signals.(uvs_signals_source{i,1}).t) ...
&& numel(uvs_signals.(uvs_signals_source{i,1}).t)>10
if isempty(gdat_data.t) && numel(uvs_signals.(uvs_signals_source{i,1}).t)>10
gdat_data.t = uvs_signals.(uvs_signals_source{i,1}).t; % all have same time base, could use time signal
end
if prod(isfinite(uvs_signals.(uvs_signals_source{i,1}).data)) && isvector(uvs_signals.(uvs_signals_source{i,1}).data) ...
&& numel(uvs_signals.(uvs_signals_source{i,1}).data) == numel(gdat_data.t);
if ~isempty(uvs_signals.(uvs_signals_source{i,1}).data) && numel(uvs_signals.(uvs_signals_source{i,1}).data) == numel(gdat_data.t);
gdat_data.data(i,:) = uvs_signals.(uvs_signals_source{i,1}).data; % all have same time base
else
gdat_data.data(i,:) = NaN;
......@@ -1356,12 +1354,10 @@ elseif strcmp(mapping_for_aug.method,'switchcase')
for i=1:size(uvd_signals_source,1)
uvd_signals.(uvd_signals_source{i,2}) = gdat_aug(shot,{'UVD',uvd_signals_source{i,1}});
if isempty(gdat_data.pvxx.t) && prod(isfinite(uvd_signals.(uvd_signals_source{i,2}).t)) && isvector(uvd_signals.(uvd_signals_source{i,2}).t) ...
&& numel(uvd_signals.(uvd_signals_source{i,2}).t)>10
if isempty(gdat_data.pvxx.t) && numel(uvd_signals.(uvd_signals_source{i,2}).t)>10
gdat_data.pvxx.t = uvd_signals.(uvd_signals_source{i,2}).t; % all have same time base
end
if prod(isfinite(uvd_signals.(uvd_signals_source{i,2}).data)) && isvector(uvd_signals.(uvd_signals_source{i,2}).data) ...
&& numel(uvd_signals.(uvd_signals_source{i,2}).data) == numel(gdat_data.pvxx.t);
if ~isempty(uvd_signals.(uvd_signals_source{i,2}).data) && numel(uvd_signals.(uvd_signals_source{i,2}).data) == numel(gdat_data.pvxx.t);
gdat_data.pvxx.data(i,:) = uvd_signals.(uvd_signals_source{i,2}).data; % all have same time base
else
gdat_data.pvxx.data(i,:) = NaN;
......
......@@ -353,9 +353,7 @@ if do_mdsopen_mdsclose
[ishot,shot_stat] = mdsopen(shot); % if ishot equal to shot, then mdsclose at the end
end
if mod(shot_stat,2)==0
ishot
warning('error opening shot');
if gdat_params.nverbose>=1; warning(['cannot open shot= ' num2str(shot)]); end
if gdat_params.nverbose>=1; warning('error opening shot %d. Value returned:%d',shot,ishot); end
return
end
end
......
......@@ -129,7 +129,7 @@ if all(isfield(gdat_data,{'data','t'})) && ~isempty(gdat_data.data) && ~isempty(
elseif numel(ab)==numel(gdat_data.label)
hhhleg=legend(gdat_data.label);
end
if exist('hhhleg'), set(hhhleg,'Interpreter','none'); end
if exist('hhhleg','var'), set(hhhleg,'Interpreter','none'); end
else
% assume one line per call
if isempty(gdat_data.label)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment