Commit ca615c04 authored by Lore, Jeremy's avatar Lore, Jeremy
Browse files

Add some eqdsk compatibilities

parent b781b3e6
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -58,19 +58,21 @@ end


% Find the xpt(s)
if isfield(g,'bdry')
    xpt_info = find_xpt_jl(g,1,1,1e-8,1);
    xr1 = xpt_info.rx;
    xz1 = xpt_info.zx;
    xr2 = xpt_info.rx2;
    xz2 = xpt_info.zx2;


contour(g.r,g.z,psiN_g.',[1,1]*calc_psiN(g,xr2,xz2),'k-','linewidth',2)

% contour(g.r,g.z,psiN_g.',[1,1]*2.25,'k-','linewidth',2)

plot(xr1,xz1,'bx'); text(xr1+0.01,xz1,'x1','fontsize',8)
plot(xr2,xz2,'b*'); text(xr2+0.02,xz2,'x2','fontsize',8)

end
% psi_x1 = g.ip_sign*get_psi_bicub(g,xr1,xz1);
% psi_x2 = g.ip_sign*get_psi_bicub(g,xr2,xz2);

+3 −0
Original line number Diff line number Diff line
@@ -64,6 +64,9 @@ g.pprime = fscanf(fid,'%f',g.mw).'; % P'(psi) in (Nt/m2)/(Wb/rad)
g.psirz = fscanf(fid,'%f',[g.mw,g.mh]);  % Poloidal flux in Weber/rad
%
g.qpsi = fscanf(fid,'%f',g.mw).';
if any(g.qpsi == 0)
    g.qpsi = [];
end
if ~isempty(g.qpsi)  % file ends here in some cases
    %
    line = fscanf(fid,'%i',2);