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

Last modified: Fri Jul 10 01:15:14 2009.

# Directory Listing of Routines

# ssl_general/science/wind

- ACCUM_PAD
- ADD_ALL
  adds user defined structure elements to the 3d structures.
- ADD_MAGF
  Adds magnetic field vector [Bx,By,Bz] to a 3d structure.
- ADD_SC_POS
  Adds orbital data to a 3d data structure.
- BKG_FILE
  saves and restores background data files.
- DAT_FILE
  saves and restores 3d data files.
- DISTFUNC
  Interpolates distribution function in a smooth manner.
- GET_MOMENT3D
  To generate moment time series data for TPLOT
- GET_PADSPEC
  Creates "TPLOT" variable by summing 3D data over selected angle bins.
- MOMENTS_3D
  Returns all useful moments as a structure
- REDUCE_VAR_DIMENSIONS
- ROTATE_DATA
- TSMOOTH2
  Smooths the tplot data.
- VELOCITY
  Returns the relativistic momentum over mass given the energy and mass

# Routine Descriptions

## ACCUM_PAD

[Next Routine] [List of Routines]

    FUNCTION:	accum_pad,dat,apad
    PURPOSE:	makes a data pad from a 3d structure
    INPUT:
    	dat:	A 3d data structure such as those gotten from get_el,get_pl,etc.
    		e.g. "get_el"
    KEYWORDS:
    	bdir:	Add B direction
    	esteps:	Energy steps to use
    	bins:	bins to sum over
    	num_pa:	number of the pad

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	%W% %E%

(See ssl_general/science/wind/accum_pad.pro)

## ADD_ALL

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE: add_all
    PURPOSE:
      adds user defined structure elements to the 3d structures.
    USAGE:
      add_all,dat,add
    INPUT:
      dat:  A (3d) data structure.
      add:  a structure such as:  {vsw:'Vp' , magf:'B3',  sc_pos:'pos'}
    RESULTS:
      for the above example, the elements, vsw, magf, and sc_pos are
      added to the dat structure.  The values are obtained from the tplot
      variables 'Vp', 'B3' and 'pos' respectively.

(See ssl_general/science/wind/add_all.pro)

## ADD_MAGF

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:  add_magf,dat,source
    PURPOSE:
        Adds magnetic field vector [Bx,By,Bz] to a 3d structure.
        The new structure element will be a 3 element vector
        with the tag name 'magf'.
    INPUT:
        dat:   3D data structure        (i.e. from 'GET_EL')
        [source] : (String) handle of magnetic field data.
    Notes:
           Magnetic field data must be loaded first.
           See 'GET_MFI'

(See ssl_general/science/wind/add_magf.pro)

## ADD_SC_POS

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:  add_sc_pos,dat,source
    PURPOSE:
           Adds orbital data to a 3d data structure.
           The new structure element will be a three element vector [x,y,z]
           with the tag name 'sc_pos'.
    INPUT:
        dat:   3D structure (obtained from get_??() routines)
               e.g. "GET_EL"
    Notes:
           Orbit data must be loaded first.
           See "GET_ORBIT"

(See ssl_general/science/wind/add_sc_pos.pro)

## BKG_FILE

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:
       bkg_file,bkg [,filename]
    PURPOSE:
       saves and restores background data files.
       if filename is not a string then a filename is generated automatically.
    INPUT:
       bkg:  a 3d background data structure.
       filename:  optional filename.
    KEYWORDS:  One must be set!
       SAVE:   set to save files.
       RESTORE:set to restore files.

(See ssl_general/science/wind/bkg_file.pro)

## DAT_FILE

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:
       dat_file,dat [,filename]
    PURPOSE:
       saves and restores 3d data files.
       if filename is not a string then a filename is generated automatically.
    INPUT:
       dat:  a 3d background data structure.
       filename:  optional filename.
    KEYWORDS:  One must be set!
       SAVE:   set to save files.
       RESTORE:set to restore files.
       DIR:  (string) Directory to use. Default is current directory

(See ssl_general/science/wind/dat_file.pro)

## DISTFUNC

[Previous Routine] [Next Routine] [List of Routines]

    NAME:
        distfunc
    FUNCTION: distfunc(vpar,vperp,param=dfpar)
      or      distfunc(energy,angle,mass=mass,param=dfpar)
    PURPOSE:
       Interpolates distribution function in a smooth manner.
    USAGE:
       dfpar = distfunc(vx0,vy0,df=df0)   ; Create structure dfpar using
         values of df0 known at the positions of vx0,vy0
       df_new = distfunc(vx_new,vy_new,par=dfpar)
         return interpolated values of df at the new points.

(See ssl_general/science/wind/distfunc.pro)

## GET_MOMENT3D

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE: get_moment3d,dat,ERANGE=erange,BINS=bins,HIGHRANGE=highrange
    INPUT:
       dat:function (string)   function that returns 3d data structures
    				function name must be "get_"+"dat"
    				dat = 'pl' for get_pl,
    				dat = 'el' for get_el, etc.
    KEYWORDS (all optional)
       erange:	intarr(2),     min,max energy bin numbers for integration
    PURPOSE:
    	To generate moment time series data for TPLOT
    SEE ALSO:
    	 "MOMENT_3D"

    CREATED BY:   Davin Larson
    LAST MODIFICATION:  %E%
    FILE: %M%
    VERSION %I%

(See ssl_general/science/wind/get_moment3d.pro)

## GET_PADSPEC

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_padspec
    PURPOSE:
      Creates "TPLOT" variable by summing 3D data over selected angle bins.

    INPUT:		data_str, a string(either 'eh','el','ph','pl','sf',or 'so' at
    		this point) telling which data to get.

    KEYWORDS:	bins: a keyword telling which bins to sum over
    		gap_time: time gap big enough to signify a data gap (def 200)
    		no_data: returns 1 if no_data else returns 0
    		units:	convert to these units if included
                   NAME:  New name of the Data Quantity
                   BKG:  A 3d data structure containing the background counts.
                   FLOOR:  Sets the minimum value of any data point to sqrt(bkg).
                   ETHRESH:
                   MISSING: value for bad data.

    CREATED BY:  Davin Larson
    FILE:  %M%
    VERSION:  %I%
    LAST MODIFICATION:  %E%

    NOTES:	  "LOAD_3DP_DATA" must be called first to load up WIND data.

(See ssl_general/science/wind/get_padspec.pro)

## MOMENTS_3D

[Previous Routine] [Next Routine] [List of Routines]

    FUNCTION:	moments_3d,data
    INPUT:
    	data:	structure,	3d data structure.  (i.e. see "GET_EL")
    	erange:
    	bins:
    PURPOSE:
           Returns all useful moments as a structure
    KEYWORDS:

    These optional keywords control calculations:
           ERANGE    intarr(2),   min,max energy bin numbers for integration.
           BINS      bytarr(nbins), Angle bins for integration, see "EDIT3DBINS"

    CREATED BY:    Davin Larson
    LAST MODIFICATION: %E%
    $Id:$

(See ssl_general/science/wind/moments_3d.pro)

## REDUCE_VAR_DIMENSIONS

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE: reduce_var_dimensions,data,limits
    INPUT:  data:  a structure with elements:
          x (typically time)
          y (3 dimensional data array)
          v1
          v2
            limits:  a structure with elements:
          v1_range:  bin range for dimension 1  (two element array)
          v2_range:  bin range for dimension 2  (two element array)
          avg_var:   1 or 2.  variable to sum over

    Caution:  This procedure is still in development.
    Created by: Davin Larson,  Sept 1995
    File:  %M%
    Version:  %I%
    Last Modified:  %E%

(See ssl_general/science/wind/reduce_var_dimensions.pro)

## ROTATE_DATA

[Previous Routine] [Next Routine] [List of Routines]

    FUNCTION:  rotate_data,x,rotmatrix
    INPUT:   several options exist for x:
        string:    data associated with the string is used.
        structure: data.y is used
        1 dimensional array
        2 dimensional array
       rotmatrix:   typically a 3 by 3 rotation matrix.
    RETURN VALUE:  Same dimensions and type as the input value of x.
    KEYWORDS:
       name:  a string that is appended to the input string.
    EXAMPLES:
       name

(See ssl_general/science/wind/rotate_data.pro)

## TSMOOTH2

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE: tsmooth2, name, width, newname=newname
    PURPOSE:
      Smooths the tplot data.
    INPUTS: name:	The tplot handle.
    	 width:	Integer array, same dimension as the data.

    Documentation not complete....

    CREATED BY:     REE 10/11/95
    Modified by:  D Larson.
    LAST MODIFICATION:	%M%

(See ssl_general/science/wind/tsmooth2.pro)

## VELOCITY

[Previous Routine] [List of Routines]

    FUNCTION:   velocity(energy,mass)
    PURPOSE:
      Returns the relativistic momentum over mass given the energy and mass

(See ssl_general/science/wind/velocity.pro)