function [f, Hc] = thm_to_complex(THM)
% Accepts [f, Re, Im] OR [f, Hcomplex] OR [f, |H|] (mag-only → complex with 0 imag)
if size(THM,2)>=3 && isreal(THM(1,2)) && isreal(THM(1,3))
    f = THM(:,1); Hc = complex(THM(:,2), THM(:,3));
else
    f = THM(:,1); Hc = THM(:,2);
    if isreal(Hc), Hc = complex(Hc,0); end
end
f = f(:); Hc = Hc(:);
end
