Skip to content

mds_eq.m

Basic Information

  SYNTAX:
         eq= mds_eq(shot, tree, gam, mk_var);     defaults to DIII-D server
             mds_eq(shot, 'EFIT01, 'gam', 1, 'NSTX');  makes vars in workspace

  PURPOSE: Get EFIT equilibrium (GEQDSK AEQDSK MEQDSK) from mdsplus database.

  INPUT: <default>
    shot   = shot number
    tree   = which efit tree to use <'EFIT01'>
    gam    = ['g']; get only g file, a= only a file, m= mfile, <gam>
    mk_var = [1]; Will make efit variables in calling workspace, <0> makes none
                      2 will make lower case, 3 will make upper case variable
                      note default variables in MDS are upper case
                  NOTE: see eq_to_env for way to make tstart<=t<tend arrays
    server = which data base to use: defaults to [DIII-D] also NSTX

  OUTPUT:
    eq      = structure containing EFIT eqdsk variables
              See: eq.gnames .anames .mnames for g,a,m file names
                   All EFIT variables are as in MDSPLUS => Upper Case
              Ex:  eq.BCENTR, eq.BDRY, eq.PSIRZ,
              Use: plot(eq.GTIME, eq.CPASMA),
                  contour(eq.R, eq.Z, eq.PSIRZ(:,:,round(length(eq.GTIME)/2))')

    Extra items added to structure (all lower case)
      eq.id   = sting array of important data identifyer enf
      eq.gnames= sting array of all gfile names collected (eq to see all)
      eq.anames= sting array of all afile names collected (eq to see all)
      eq.mnames= sting array of all mfile names collected (eq to see all)
      eq.shot = shot number
      eq.tree = mds tree used to get data (ex. EFIT01 EFIT02 (=MSD));

    if mk_var>0 it makes variables in base workspace
                 BCENTR, BDRY, CPASMA, PSIRZ, ...

  NOTE: 1)Function returns all TIME data for shot in large arrays.
          Example:
          eq.BCENTER(255,1)
          eq.GTIME(255,1);  Time data vector for all .GNAME arrays 255 times
          eq.ATIME(251,1);  Time data vector for all .ANAME arrays 251 times
          eq.MTIME or eq.TIME  Note old "m" uses TIME new "m" uses MTIME
          eq.PPRIME(65,255),PSIRZ(65,65,225)

          Similar arrays (without eq. strucutre) are generated in workspace
          if mk_var>=1 : BCENTER(255,1), GTIME(255,1)  or LC if mk_var==2

        2) Time is in vector eq.GTIME and is in ms. All other units are as
           they come from EFIT. psi(Vs/r) I(A) R(m) ...

 CAUTION: All time vectors are last index of vector of array.
 CAUTION: GTIME ATIME & (MTIME or TIME) are not necesaarly the same.
 CAUTION: Current Bad Variable in d3dMDSPLUS ARE: CASE, HEADER, ZGRID (use Z)
 CAUTION: THIS ROUTINE GETS ALL MDS EQDSK DATA FOR SHOT AND EQ CAN BE HUGE
 CAUTION: Afile read 1st then Gfile: variables in common: BCENTR, CPASMA, ...

  SEE ALSO: eq_time_lim eq_ga_env

Dependencies