Skip to content
Snippets Groups Projects

fix in case of empty shot call to gdat (for ids empty)

Merged Olivier Sauter requested to merge fix_gdat_emptyshot into master
1 file
+ 10
6
Compare changes
  • Side-by-side
  • Inline
+ 10
6
@@ -190,14 +190,18 @@ try
@@ -190,14 +190,18 @@ try
% treat multiple shot numbers
% treat multiple shot numbers
if nargin > 0 && isnumeric(shot)
if nargin > 0 && isnumeric(shot)
args_in = args;
args_in = args;
for i=1:numel(shot)
if ~isempty(shot)
args{1} = shot(i);
for i=1:numel(shot)
[gdat_data_i,gdat_params,error_status(i),varargout] = feval(['gdat_' lower(machine_eff)],args{:});
args{1} = shot(i);
gdat_data_i.gdat_params.machine = lower(gdat_data_i.gdat_params.machine);
[gdat_data_i,gdat_params,error_status(i),varargout_gdat] = feval(['gdat_' lower(machine_eff)],args{:});
gdat_data(i) = gdat_data_i;
gdat_data_i.gdat_params.machine = lower(gdat_data_i.gdat_params.machine);
 
gdat_data(i) = gdat_data_i;
 
end
 
else
 
[gdat_data,gdat_params,error_status,varargout_gdat] = feval(['gdat_' lower(machine_eff)],args{:});
end
end
else
else
[gdat_data,gdat_params,error_status,varargout] = feval(['gdat_' lower(machine_eff)],args{:});
[gdat_data,gdat_params,error_status,varargout_gdat] = feval(['gdat_' lower(machine_eff)],args{:});
% because data request can be an actual detailed tree related signal, upper and lower case need to be kept, but other places remain with lower case when case insensitive
% because data request can be an actual detailed tree related signal, upper and lower case need to be kept, but other places remain with lower case when case insensitive
% needed since some substructure have machine name like mapping_for
% needed since some substructure have machine name like mapping_for
gdat_data.gdat_params.machine = lower(gdat_data.gdat_params.machine);
gdat_data.gdat_params.machine = lower(gdat_data.gdat_params.machine);
Loading