Skip to content

qcontour.m

Basic Information

  SYNTAX:   [rq, zq, psiq, rq2, zq2, psiq2] = qcontour(equ, q)
            h = qcontour(equ, q) for plot

  PURPOSE:  Return contour where the safety factor equals q
            If nargout < 2, the contour is plotted

  INPUTS:   equ, structure with TokSys equilibrium
                 required fields are rg, zg, psizr, psibry, psimag, jphi
            q, safety factor

  OUTPUTS:  rq, zq, coordinates for the q-surface [m]
            psiq, poloidal flux at the q-surface [Wb]
            rq2, zq2, psiq2, ditto for any extra q-surface inside first
            h, handles to plots of limiter, boundary, and q-surface

  EXAMPLE:
  equ = read_mds_eqdsk(149713,3,'EFIT02','D3D');
  qcontour(equ, 3/2)  plot q=3/2-surface (and boundary and limiter)

Dependencies