Skip to content

read_eq.m

Basic Information

  USAGE: eq = read_eq(shot,times,source,tokamak)

  PURPOSE: Read equilibrium data from many possible sources and make structure
           according to toksys convention. Implemented sources are:
           1. mds
           2. A directory with efit g-files
           3. A directory with corsica flat files

  INPUTS:  shot is the shot number (no surprise there)
           times: times to fetch [sec]
             If empty or 'all' then all equilibria are fetched
             If single time specified, closest available time fetched
             If two times are specified they are tmin and tmax
             If >2 times are specified, only those exact times are fetched
           source: mds tree or directory with g files or directory with corsica flatfiles
             If source begins with a '/' it is a directory name, otherwise mds tree
             If server is 'corsica', source should contain flatfiles by create_corsica_flat_files
           tokamak: name of the tokamak, default 'DIII-D'
        server: optional mds server name. Default is standard mds server for tokamak.
             Use 'local' for data from GA test server (currently soas).

  OUTPUTS:  eq = equilibrium data on toksys form, that can be used with
              cc_efit_to_tok and build_tokamak_system
            neq = number of equilibria returned
            eqraw = 'raw' eq data on original form before conversion to toksys convention

  RESTRICTIONS: Needs modification to work with Corsica files for tokamaks other than ITER

  METHOD:

Dependencies