diff --git a/matlab/TCV/gdat_tcv.m b/matlab/TCV/gdat_tcv.m index f84e5af6e1d8c7cddd2aba19914432871b9abce0..d618cabb29f5b4dffefd81e0624d70f45860a489 100644 --- a/matlab/TCV/gdat_tcv.m +++ b/matlab/TCV/gdat_tcv.m @@ -3755,7 +3755,20 @@ end t_eq = t_psi(iround_os(t_psi,t_th)); % Get PSI map -psi = psitbxtcv(gdat_data.shot,t_eq,'*0',psitbx_str); +% seems it has an error during automtic postshot but not when rerunning manually, hence add some info to log +try + psi = psitbxtcv(gdat_data.shot,t_eq,'*0',psitbx_str); + aa=pp; +catch ME + warning('problems with: psi = psitbxtcv(gdat_data.shot,t_eq,''*0'',psitbx_str);'); + fprintf('\n%s%d\n','gdat_data.shot = ',gdat_data.shot); + whos t_eq + disp(['t_eq(1) = ' num2str(t_eq(1))]) + psitbx_str + % try again + psi = psitbxtcv(gdat_data.shot,t_eq,'*0',psitbx_str); +end + % PSITBXTCV will have removed duplicate times i_psi = iround(psi.t,t_eq); % Mapping from psi times to TS times