This page was created by the IDL library routine `mk_html_help2`.

Last modified: Thu Sep 4 18:17:36 2025.

# Directory Listing of Routines

# general/cotrans/special/rxy

- RXY_MATRIX_MAKE

# Routine Descriptions

## RXY_MATRIX_MAKE

[List of Routines]

    PROCEDURE: rxy_matrix_make

    Purpose:
      Creates a set of matrices that will rotate data from GSM coordinates into a GSM coordinate system variant with the X axis of the X-Y plane pointing along the earth->spacecraft direction.
      Specifically:
      X-Axis: Radial position vector projected into the X-Y plane of the GSM coordinate system, and normalized to length = 1, Positive values point from Earth to Spacecraft.
      Z-Axis: Z-axis of the GSM coordinate system
      Y-Axis: X x Z(X cross Z, cross product of X & Z)

    Arguments:
    Inputs:
      state:  The name of a tplot variable or variables that will be used to create the transformation matrices.
                 These data must be in GSM coordinates for the operation to work correctly.  Can use globbing('?',or '*') in
                 names, can use tplot variable indexes, can pass arrays of inputs.

    Outputs:
      fail: Will be set to 1 if operation failed, returns 0 if operation succeeded.  Will not signal failure if
            at least one input was processed.

    Keywords
      suffix: The suffix to be appended to the tplot variables that the output matrices will be stored in.
             (Default: '_rxy_mat')
      newname: The name of the output matrix.  If this keyword is used with multiple input values, the outputs
              may overwrite each other.  So you should only set this keyword if there is a single value for the state input.

    Example:
      timespan,'2007-03-23'
      thm_load_state,probe='a',coord='gsm'
      rxy_matrix_make,'tha_state_pos'
      thm_load_fgm,probe='a',coord='gsm'
      tvector_rotate,'tha_state_pos_rxy_mat','tha_fgs_gsm'

    NOTES:
        Code heavily based on make_mat_Rxy.pro & transform_gsm_to_rxy.pro by Christine Gabrielse(cgabrielse@ucla.edu)

     $LastChangedBy: pcruce $
     $LastChangedDate: 2009-09-15 15:55:43 -0700 (Tue, 15 Sep 2009) $
     $LastChangedRevision: 6734 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/cotrans/special/rxy/rxy_matrix_make.pro $

(See general/cotrans/special/rxy/rxy_matrix_make.pro)