Skip to content

calc_centroid.m

Basic Information

  SYNTAX: [centroid_r,centroid_z] = calc_centroid(shot_or_eq,time)

  PURPOSE:  Compute current centroid from equilibrium data for shot.

  INPUT:
    shot_or_eq = one of the following:
        - shot number to fetch geqdsk data from 'EFIT01'
           - mdsplus data structure containing g-eqdsk info for multiple times
        - standard toksys equilibrium data structure
    time = time (s) to find centroid (required if g-eqdsk is from mdsplus
        or is mds data structure) - can be scalar or vector

  OUTPUT:
    centroid_r,centroid_z = centroid location (m)

  RESTRICTIONS:  This was built for D3D, but should be extendable to other
    devices (might work now, but not tested.)

Dependencies