diff --git a/crpptbx/AUG/gdat_aug.m b/crpptbx/AUG/gdat_aug.m index 5b772e88377874e20435ae660e2696f442f87993..cb5469d61a68927b73575b0d5a878182fe71b5d6 100644 --- a/crpptbx/AUG/gdat_aug.m +++ b/crpptbx/AUG/gdat_aug.m @@ -1519,11 +1519,15 @@ elseif strcmp(mapping_for_aug.method,'switchcase') if ~isfield(gdat_data.gdat_params,'time_interval') gdat_data.gdat_params.time_interval = []; end - [aa,bb]=unix(['ssh ' 'sxaug22.aug.ipp.mpg.de WhichSX ' num2str(shot) ' ' ... + [aa,bb]=unix(['ssh ' 'sxaug20.aug.ipp.mpg.de WhichSX ' num2str(shot) ' ' ... upper(gdat_data.gdat_params.source)]); chords_ok_diags=regexpi(bb,'(?<chord>[A-Z]_[0-9]+)\saddress:\s[0-9]+\sDiag:\s(?<diag>[A-Z]+)','names'); - for i=1:length(chords_ok_diags) - chords_ok_nb(i) = str2num(chords_ok_diags(i).chord(3:end)); + if isempty(chords_ok_diags) + chords_ok_nb = []; + else + for i=1:length(chords_ok_diags) + chords_ok_nb(i) = str2num(chords_ok_diags(i).chord(3:end)); + end end if isempty(gdat_data.gdat_params.camera); gdat_data.gdat_params.camera = chords_ok_nb;