Skip to content

getxpt.m

Basic Information

  USAGE: [rx,zx,psix,t,br,bz,eqs] = getxpt(shot,t1,t2,efit_source,tokamak,xtarget,idoplot)

  PURPOSE: Get coordinates for 1 x-point below and 1 above the magnetic axis.
           The points where flux is closest to the boundary flux are chosen.
           Also return the flux at these x-points and at the boundary.
           In addition return Br, Bz at xtarget points (if specified)

  INPUTS:    shot: shot number
           t1, t2: Specification of the time samples (t)
                   t = all efit times, if t1,t2 are empty or not supplied
                   t1 <= t <= t2, if length(t1)==1 & length(t2)==1
                   t = t1,        if length(t1)>=1 & length(t2)==0
      efit_source: Structure with equilibria or name of MDS tree or directory
                   with gfiles or corsica flat files (see help read_eq),
                   default EFIT01 for shot<900000, EFITRT1 for shot>=900000
          tokamak: default D3D
          xtarget: specification on the form [r z] where r and z are column vectors
                   of target x-point locations, for calculation of Br, Bz.
          idoplot: flag to plot x-point trajectories and limiter,
                   bit 0 plots x's, bit 1 plots limiter, bit 2 adds text,
                   bit 3 adds color coding of times, bit 4 adds colorbar,
                   idoplot=31 plots it all, default is 0.

  OUTPUTS:     rx: radial position of x-points [lower; upper] [m]
               zx: vertical position of x-points [lower; upper] [m]
             psix: fluxes at [lower x; upper x; boundary] [Wb]
                t: time [sec]
               br: radial magnetic field at xtarget points
               bz: vertical magnetic field at xtarget points
              eqs: The structure with equilibria from efit_source

Dependencies