diff --git a/matlab/TCV/gdat_tcv.m b/matlab/TCV/gdat_tcv.m index b60c26ca86b8cb96a26c1f4cc0b4387e5e377c4e..b332400da3e0f241df65e937ad23e588d4ad78eb 100644 --- a/matlab/TCV/gdat_tcv.m +++ b/matlab/TCV/gdat_tcv.m @@ -1717,8 +1717,8 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') % Compute psi at TS positions psi_ts = psitbxf2f(psi,pgrid); psiscatvol.data = squeeze(psi_ts.x(:,i_psi)); - psiscatvol.dim{1} = t_th; - psiscatvol.dim{2} = gdat_data.x; + psiscatvol.dim{1} = gdat_data.x; + psiscatvol.dim{2} = t_th; % NOTE: we should probably not include time points where equilibrium time is far from TS time. % Compute psi_axis at TS times @@ -1729,6 +1729,11 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') % psitbx adds some Newton iterations so again complex numbers are possible psi_norm = psitbxp2p(psi,'01'); psi_max.data = psi_norm.psimag(i_psi); + psi_max.dim = {t_th}; + + % Add the results to the output of gdat + gdat_data.psiscatvol = psiscatvol; + gdat_data.psi_max = psi_max; end if ~isempty(psiscatvol.data) && ~ischar(psiscatvol.data) && ~isempty(psi_max.data) && ~ischar(psi_max.data) rho = sqrt(1.-psiscatvol.data./repmat(psi_max.data(:).',[size(psiscatvol.data,1),1]));