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

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

parent f15c0a14
No related branches found
No related tags found
1 merge request!158fix in case of empty shot call to gdat (for ids empty)
Pipeline #203844 passed
......@@ -190,14 +190,18 @@ try
% treat multiple shot numbers
if nargin > 0 && isnumeric(shot)
args_in = args;
for i=1:numel(shot)
args{1} = shot(i);
[gdat_data_i,gdat_params,error_status(i),varargout] = feval(['gdat_' lower(machine_eff)],args{:});
gdat_data_i.gdat_params.machine = lower(gdat_data_i.gdat_params.machine);
gdat_data(i) = gdat_data_i;
if ~isempty(shot)
for i=1:numel(shot)
args{1} = shot(i);
[gdat_data_i,gdat_params,error_status(i),varargout_gdat] = feval(['gdat_' lower(machine_eff)],args{:});
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
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
% needed since some substructure have machine name like mapping_for
gdat_data.gdat_params.machine = lower(gdat_data.gdat_params.machine);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment