fix_equil_jd

PURPOSE ^

SYNOPSIS ^

function equil = fix_equil_jd(equil,opt_gui)

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function equil = fix_equil_jd(equil,opt_gui)
0002 %
0003 if isfield(equil,'info') && all(isfield(equil.info,{'shotnum','shottime'})),
0004     equil.shotnum = equil.info.shotnum;
0005     equil.shotime = equil.info.shotime;
0006     equil = rmfield(equil,'info');
0007     return
0008 end
0009 %
0010 istru = find(equil.id == '_');
0011 if length(istru) >= 2,
0012     equil.shotnum = equil.id(istru(1)+1:istru(2)-1);
0013     if length(istru) >= 3,
0014         equil.shotime = equil.id(istru(2)+1:istru(3)-1);
0015     else
0016         equil.shotime = equil.id(istru(2)+1:end);
0017     end
0018 else    
0019     equil.shotnum = '';
0020     equil.shotime = '';
0021 end
0022 %
0023 if opt_gui,
0024     equil.shotnum = input_dke_yp('Please provide the shot number',equil.shotnum);
0025     equil.shotime = input_dke_yp('Please provide the shot time',equil.shotime);
0026 end
0027 %

Community support and wiki are available on Redmine. Last update: 18-Apr-2019.