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

Last modified: Sat Sep 6 18:17:35 2025.

# Directory Listing of Routines

# projects/mms/sitl/sitl_data_fetch

- MMS_EIS_SITL
- MMS_ELIMINATE_SWEEPS
- MMS_HPCA_SET_METADATA_SITL
  Sets metadata for HPCA tplot variables
- MMS_SITL_EIS_OMNI
  Calculates the omni-directional flux for all 6 telescopes
- MMS_SITL_EIS_SPIN_AVG
  Calculates spin-averaged fluxes for the EIS instrument
- MMS_SITL_GET_DSP
- MMS_SITL_GET_EDI_AMB[1]
- MMS_SITL_GET_EDI_AMB[2]
- MMS_SITL_GET_EDI_AMB[2]
- MMS_SITL_GET_EDI_AMB[3]
- MMS_SITL_GET_EDI_AMB[4]
- MMS_SITL_GET_EDI_AMB[5]
- MMS_SITL_GET_EDI_AMB[6]
- MMS_SITL_GET_EDP
- MMS_SITL_GET_EIS
  Load data from the MMS Energetic Ion Spectrometer (EIS)
- MMS_SITL_GET_FEEPS
  Load data from the Fly's Eye Energetic Particle Sensor (FEEPS) onboard MMS
- MMS_SITL_GET_HPCA
  Load data from the MMS Hot Plasma Composition Analyzer (HPCA)
- UNH_EDI_AMB_CRIB

# Routine Descriptions

## MMS_EIS_SITL

[Next Routine] [List of Routines]

     mms_eis_sitl.pro

     PURPOSE: Loads and generates EIS data for use by SITL in EVA

     KEYWORDS:
             trange: time range of interest (string, ex. ['yyyy-mm-dd','yyyy-mm-dd'])
             probe: string indicating value for mms SC #
             bin_size: size of the pitch angle bins (numeric)
             data_rate: instrument data rates ['brst', 'srvy' (default), 'fast', 'slow']
             data_units: desired units for data. for eis units are ['flux', 'cps', 'counts'] (default = flux)
             ion_type: array containing types of particles to include.
                   for PHxTOF data, valid options are 'proton', 'oxygen'
                   for ExTOF data, valid options are 'proton', 'oxygen', and/or 'alpha'
             i_ph: set to 1 to include phxtof protons (default = 0)
             i_plot: set to 1 to plot to screen (default = 0)
             i_print: set to 1 to print to PS file (default = 0)
             i_scopes: set to 1 to omit sun-blocked telescopes in PADs (default = 0)

     OUTPUT:

     CREATED BY: I. Cohen, 2016-01-12

(See projects/mms/sitl/sitl_data_fetch/mms_eis_sitl.pro)

## MMS_ELIMINATE_SWEEPS

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

     FUNCTION: mms_eliminate_sweeps

     PURPOSE: Describe the procedure.

     INPUT:
     :Params:
        cdfie: cdf info structure, output of cdf_load_vars

     OUTPUT:
     :Keywords:
        verbose - MAKE IT TALK TO YOU
     :Author: Katherine Goodrich, contact: katherine.goodrich@colorado.edu

(See projects/mms/sitl/sitl_data_fetch/mms_eliminate_sweeps.pro)

## MMS_HPCA_SET_METADATA_SITL

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

     PROCEDURE:
             mms_hpca_set_metadata

     PURPOSE:
             Sets metadata for HPCA tplot variables

     KEYWORDS:
             prefix: prefix for names of the tplot variables, typically 'mms#' where # is the S/C number
             fov: field of view of the instrument, for setting the title in spectra

     $LastChangedBy: rickwilder $
     $LastChangedDate: 2015-09-13 16:50:23 -0700 (Sun, 13 Sep 2015) $
     $LastChangedRevision: 18783 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/mms/sitl/sitl_data_fetch/mms_hpca_set_metadata_sitl.pro $

(See projects/mms/sitl/sitl_data_fetch/mms_hpca_set_metadata_sitl.pro)

## MMS_SITL_EIS_OMNI

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

     PROCEDURE:
             mms_eis_omni

     PURPOSE:
           Calculates the omni-directional flux for all 6 telescopes

     NOTES:
           Originally based on Brian Walsh's EIS code from 7/29/2015

    $LastChangedBy: rickwilder $
    $LastChangedDate: 2016-04-07 12:43:36 -0700 (Thu, 07 Apr 2016) $
    $LastChangedRevision: 20745 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/mms/sitl/sitl_data_fetch/mms_sitl_eis_omni.pro $

     REVISION HISTORY:
           + 2016-02-26, I. Cohen      : changed 'cps' units_label from 'Counts/s' to '1/s' for compliance with mission standards
           + 2016-03-09, I. Cohen      : altered ylabel for new omni variables

(See projects/mms/sitl/sitl_data_fetch/mms_sitl_eis_omni.pro)

## MMS_SITL_EIS_SPIN_AVG

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

     PROCEDURE:
             mms_eis_spin_avg

     PURPOSE:
             Calculates spin-averaged fluxes for the EIS instrument

     KEYWORDS:
             probe:        Probe # to calculate the spin average for
                           if no probe is specified the default is probe '1'
             datatype:     eis data types include ['electronenergy', 'extof', 'partenergy', 'phxtof'].
                           If no value is given the default is 'extof'.
             data_rate:    instrument data rates for eis include 'brst' 'srvy'. The
                           default is 'srvy'.
             data_units:   desired units for data. for eis units are ['flux', 'cps', 'counts'].
                           The default is 'flux'.
             suffix:       appends a suffix to the end of the tplot variable name. this is useful for
                           preserving original tplot variable.
             species:      species (should be: proton, oxygen, alpha or electron)

     OUTPUT:

    $LastChangedBy: rickwilder $
    $LastChangedDate: 2016-04-07 12:43:36 -0700 (Thu, 07 Apr 2016) $
    $LastChangedRevision: 20745 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/mms/sitl/sitl_data_fetch/mms_sitl_eis_spin_avg.pro $

(See projects/mms/sitl/sitl_data_fetch/mms_sitl_eis_spin_avg.pro)

## MMS_SITL_GET_DSP

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

     PROCEDURE: mms_load_dsp

     PURPOSE: Fetches desired data from the DSP (Digital Signal Processing) Board.

     INPUT:
     :Keywords:
        trange       : OPTIONAL - time range of desired data. Ex: ['2015-05-01', '2015-05-02']
                        Default input is timespan input.
        sc_id        : OPTIONAL - desired spacecraft, Ex: 'mms1','mms2', etc.
                        Default input is all s/c
        data_rate    : OPTIONAL - desired data sampling mode, Example: mode='srvy'
                                 due to cataloging at the SDC, WE REQUIRE YOU LOAD ONLY ONE MODE AT A TIME
                        Default input - srvy mode
        level        : OPTIONAL - desired level, options are level 1a, 1b, ql, 2
                        Default input - all levels
        datatype    : OPTIONAL - desired data type. Ex: ['epsd', 'tdn', 'swd']
                        Default input - all data types!

        no_update    : OPTIONAL - /no_update to ensure your current data is not reloaded due to an update at the SDC
        reload       : OPTIONAL - /reload to ensure current data is reloaded due to an update at the SDC
        DO NOT DO BOTH /NO_UPDATE AND /RELOAD TOGETHER. THAT IS SILLY!
        get_support_data  : OPTIONAL - /get_support_data to get support data within the CDF

     OUTPUT: tplot variables listed at the end of the procedure
     :Author: Katherine Goodrich, contact: katherine.goodrich@colorado.edu

(See projects/mms/sitl/sitl_data_fetch/mms_sitl_get_dsp.pro)

## MMS_SITL_GET_EDI_AMB[1]

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

       Fetch EDI Ambient mode SITL products from the SDC for display using tplot.
       The routine creates tplot variables based on the names in the mms CDF files.
       Data files are cached locally in !mms.local_data_dir.

     :Categories:
        MMS, EDI, SITL, QL

     :Author:
        Matthew Argall::
        University of New Hampshire
        Morse Hall Room 348
        8 College Road
        Durham, NH 03824
        matthew.argall@unh.edu

     :History:
        Modification History::
           2015/07/20  -   Written by Matthew Argall
           2015/09/06  -   Incorporated cdf reader. Read pitch angle info. - MRA
           2015/10/09  -   Skip and inform of files that have no data. Added LEVEL and
                               MODE keywords. - MRA
           2016/05/05  -   Updated to work with packing mode 2 data. - MRA

(See projects/mms/sitl/sitl_data_fetch/mms_sitl_get_edi_amb.pro)

## MMS_SITL_GET_EDI_AMB[2]

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

       Open an EDI ambient mode data file and return data in the form of a structure.

     :Keywords:
            FILENAME:     in, required, type=string
                          CDF filename from which variable data is to be loaded.
            DATA_STRUCT:  in, optional, type=struct
                          If data is to be read from multiple files, iteratively pass
                              in the output of previous calls to append new and old data
                              together.
            MODE:         in, required, type=string
                          Telementry mode of the file: 'slow', 'fast', 'srvy', 'brst'

     :Returns:
            DATA_STRUCT:  A data structure with pitch angle and count data. Can be passed
                             in via the `DATA_STRUCT` parameter on successive calls.

(See projects/mms/sitl/sitl_data_fetch/mms_sitl_get_edi_amb.pro)

## MMS_SITL_GET_EDI_AMB[2]

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

       Open an EDI ambient mode data file and return data in the form of a structure.

     :Keywords:
            FILENAME:     in, required, type=string
                          CDF filename from which variable data is to be loaded.
            DATA_STRUCT:  in, optional, type=struct
                          If data is to be read from multiple files, iteratively pass
                              in the output of previous calls to append new and old data
                              together.
            MODE:         in, required, type=string
                          Telementry mode of the file: 'slow', 'fast', 'srvy', 'brst'

     :Returns:
            DATA_STRUCT:  A data structure with pitch angle and count data. Can be passed
                             in via the `DATA_STRUCT` parameter on successive calls.

(See projects/mms/sitl/sitl_data_fetch/mms_sitl_get_edi_amb.pro)

## MMS_SITL_GET_EDI_AMB[3]

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

       Store EDI data into TPLOT variables.

     :Keywords:
            DATA:         in, required, type=struct
                          Data structure created by UNH_SITL_EDI_AMB_LOAD.
            SC:           in, required, type=string
                          MMS spacecraft identifier. Used in creating TPLOT variable names.
            MODE:         in, required, type=string/strarr
                          Telementry mode of the file: 'slow', 'fast', 'srvy', 'brst'
            OPTDESC:      in, required, type=string
                          Optional descriptor of the file(s) from which `DATA` was extracted.

(See projects/mms/sitl/sitl_data_fetch/mms_sitl_get_edi_amb.pro)

## MMS_SITL_GET_EDI_AMB[4]

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

       Sort EDI data by pitch angle instead of GDU

     :Keywords:
            SC:           in, required, type=string
                          MMS spacecraft identifier. Used in creating TPLOT variable names.

(See projects/mms/sitl/sitl_data_fetch/mms_sitl_get_edi_amb.pro)

## MMS_SITL_GET_EDI_AMB[5]

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

       Fetch EDI Ambient mode SITL products from the SDC for display using tplot.
       The routine creates tplot variables based on the names in the mms CDF files.
       Data files are cached locally in !mms.local_data_dir.

     :Keywords:
            LEVEL:        in, optional, type=string, default='l1a'
                          Level of data product. Current choices are: ['l1a']
            MODE:         in, optional, type=string, default=['fast', 'slow']
                          Telemetry mode of data. Options are: 'slow', 'fast', 'srvy', 'brst'
                              or ['fast', 'slow']. The last option reads in fast and slow
                              survey data and combines them to resemble "srvy" data.
            NO_UPDATE:    in, optional, type=boolean, default=0
                          Set if you don't wish to replace earlier file versions
                            with the latest version. If not set, earlier versions are deleted
                            and replaced.
            RELOAD:       in, optional, type=boolean, default=0
                          Set if you wish to download all files in query, regardless
                            of whether file exists locally. Useful if obtaining recent data files
                            that may not have been full when you last cached them. Cannot
                            be used with `NO_UPDATE`.
            SC:           in, optional, type=string/strarr, default='mms1'
                          Array of strings containing spacecraft ids.

(See projects/mms/sitl/sitl_data_fetch/mms_sitl_get_edi_amb.pro)

## MMS_SITL_GET_EDI_AMB[6]

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

       Fetch EDI Ambient mode SITL products from the SDC for display using tplot.
       The routine creates tplot variables based on the names in the mms CDF files.
       Data files are cached locally in !mms.local_data_dir.

     :Keywords:
            LEVEL:        in, optional, type=string, default='l1a'
                          Level of data product. Current choices are: ['l1a']
            MODE:         in, optional, type=string, default=['fast', 'slow']
                          Telemetry mode of data. Options are: 'slow', 'fast', 'srvy', 'brst'
                              or ['fast', 'slow']. The last option reads in fast and slow
                              survey data and combines them to resemble "srvy" data.
            NO_UPDATE:    in, optional, type=boolean, default=0
                          Set if you don't wish to replace earlier file versions
                            with the latest version. If not set, earlier versions are deleted
                            and replaced.
            RELOAD:       in, optional, type=boolean, default=0
                          Set if you wish to download all files in query, regardless
                            of whether file exists locally. Useful if obtaining recent data files
                            that may not have been full when you last cached them. Cannot
                            be used with `NO_UPDATE`.
            SC:           in, optional, type=string/strarr, default='mms1'
                          Array of strings containing spacecraft ids.

(See projects/mms/sitl/sitl_data_fetch/mms_sitl_get_edi_amb.pro)

## MMS_SITL_GET_EDP

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

     PROCEDURE: mms_load_edp

     PURPOSE: Fetches desired data from the EDP (Electric field Double Probes) instrument.

     INPUT:
     :Keywords:
        trange       : OPTIONAL - time range of desired data. Ex: ['2015-05-1', '2015-05-02']
                        Default input is timespan input.
        sc_id        : OPTIONAL - desired spacecraft, Ex: 'mms1','mms2', etc.
                        Default input is all s/c
        mode         : OPTIONAL - desired data sampling mode, DEFAULT: mode='srvy'
                                 due to cataloging at the SDC, WE REQUIRE YOU LOAD ONLY ONE MODE AT A TIME
                        Default input, all but brst (to avoid destroying your hard drive)
        level        : OPTIONAL - desired level, options are level 1a, 1b, ql, 2
                        Default input - all levels
        datatype    : OPTIONAL - desired data type. Ex: ['dce', 'dcv', 'ace', 'hmfe']
                        Default input - all data types!

        no_update    : OPTIONAL - /no_update to ensure your current data is not reloaded due to an update at the SDC
        reload       : OPTIONAL - /reload to ensure current data is reloaded due to an update at the SDC
        DO NOT DO BOTH /NO_UPDATE AND /RELOAD TOGETHER. THAT IS SILLY!
        no_sweeps    : OPTIONAL - /no_sweeps to remove any sweeps done during commissioning.
                                  Hopefully you'll never have to use this outside of commissioning
        get_support  : OPTIONAL - /get_support to get support data within the CDF
                                   Automatically called when /no_sweeps is called

     OUTPUT: tplot variables listed at the end of the procedure
     :Author: Katherine Goodrich, contact: katherine.goodrich@colorado.edu

(See projects/mms/sitl/sitl_data_fetch/mms_sitl_get_edp.pro)

## MMS_SITL_GET_EIS

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

     PROCEDURE:
             mms_load_eis

     PURPOSE:
             Load data from the MMS Energetic Ion Spectrometer (EIS)

     KEYWORDS:
             trange:       time range of interest [starttime, endtime] with the format
                           ['YYYY-MM-DD','YYYY-MM-DD'] or to specify more or less than a day
                           ['YYYY-MM-DD/hh:mm:ss','YYYY-MM-DD/hh:mm:ss']
             probes:       list of probes, valid values for MMS probes are ['1','2','3','4'].
                           if no probe is specified the default is probe '1'
             level:        indicates level of data processing. levels include 'l1a', 'l1b'.
                           The default if no level is specified is 'l1b'
             datatype:     eis data types include ['electronenergy', 'extof', 'partenergy', 'phxtof'].
                           If no value is given the default is 'extof'.
             data_rate:    instrument data rates for eis include 'brst' 'srvy'. The
                           default is 'srvy'.
             data_units:   desired units for data. for eis units are ['flux', 'cps', 'counts'].
                           The default is 'flux'.
             local_data_dir: local directory to store the CDF files; should be set if
                           you're on *nix or OSX, the default currently assumes Windows (c:\data\mms\)
             source:       specifies a different system variable. By default the MMS mission
                           system variable is !mms
             get_support_data: not yet implemented. when set this routine will load any support data
                           (support data is specified in the CDF file)
             tplotnames:   names for tplot variables
             no_color_setup: don't setup graphics configuration; use this keyword when you're
                           using this load routine from a terminal without an X server runningdo
                           not set colors
             time_clip:    clip the data to the requested time range; note that if you do not use
                           this keyword you may load a longer time range than requested
             no_update:    set this flag to preserve the original data. if not set and newer
                           data is found the existing data will be overwritten
             no_interp:    if this flag is set no interpolation of the data will occur.
             suffix:       appends a suffix to the end of the tplot variable name. this is useful for
                           preserving original tplot variable.
             varformat:    should be a string (wildcards accepted) that will match the CDF variables
                           that should be loaded into tplot variables
             cdf_filenames:  this keyword returns the names of the CDF files used when loading the data
             spdf:         grab the data from the SPDF instead of the LASP SDC (only works for public access)

     OUTPUT:

     EXAMPLE:
         See mms_load_eis_crib.pro, mms_load_eis_burst_crib.pro,
             mms_load_eis_crib_qlplots.pro, and mms_load_data_crib.pro for usage examples

         load ExTOF burst data:
         MMS1> mms_load_eis, probes='1', trange=['2015-12-23', '2015-12-24'],  datatype='extof', data_rate='brst', level='l2'

         load PHxTOF data:
         MMS1> mms_load_eis, probes='1', trange=['2015-10-31', '2015-11-01'], datatype='phxtof', level='l2'
         calculate the PHxTOF PAD for protons
         MMS1> mms_eis_pad, probe='1', species='ion', datatype='phxtof', ion_type='proton', data_units='flux', energy=[0, 30], level='l2'

     NOTES:
         Please see the notes in mms_load_data for more information

         Have questions regarding this load routine, or its usage?
              Send me an email --> egrimes@igpp.ucla.edu

     HISTORY:
         09/15/2015 - Ian Cohen at APL: added modifications to omni-directional calculations to be able to handle
                      ExTOF and PHxTOF data
         09/17/2015 - egrimes: large update, see svn log
         12/15/2015 - icohen: added data_rate keyword and conditional definition of prefix in mms_eis_spin_avg and
                      mms_eis_omni to address burst variable name changes

    $LastChangedBy: rickwilder $
    $LastChangedDate: 2016-04-07 12:43:36 -0700 (Thu, 07 Apr 2016) $
    $LastChangedRevision: 20745 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/mms/sitl/sitl_data_fetch/mms_sitl_get_eis.pro $

(See projects/mms/sitl/sitl_data_fetch/mms_sitl_get_eis.pro)

## MMS_SITL_GET_FEEPS

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

     PROCEDURE:
             mms_load_feeps

     PURPOSE:
             Load data from the Fly's Eye Energetic Particle Sensor (FEEPS) onboard MMS

     KEYWORDS:
             trange:       time range of interest [starttime, endtime] with the format
                           ['YYYY-MM-DD','YYYY-MM-DD'] or to specify more or less than a day
                           ['YYYY-MM-DD/hh:mm:ss','YYYY-MM-DD/hh:mm:ss']
             probes:       list of probes, valid values for MMS probes are ['1','2','3','4'].
                           If no probe is specified the default is '1';

    $LastChangedBy: rickwilder $
    $LastChangedDate: 2018-04-03 13:31:40 -0700 (Tue, 03 Apr 2018) $
    $LastChangedRevision: 24989 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/mms/sitl/sitl_data_fetch/mms_sitl_get_feeps.pro $

(See projects/mms/sitl/sitl_data_fetch/mms_sitl_get_feeps.pro)

## MMS_SITL_GET_HPCA

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

     PROCEDURE:
             mms_load_hpca

     PURPOSE:
             Load data from the MMS Hot Plasma Composition Analyzer (HPCA)

     KEYWORDS:
             trange: time range of interest
             probes: list of probes - values for MMS SC #
             local_data_dir: local directory to store the CDF files
             varformat: format of the variable names in the CDF to load
             no_color_setup: don't setup graphics configuration; use this
                 keyword when you're using this load routine from a
                 terminal without an X server running

     OUTPUT:

     EXAMPLE:
         See the crib sheet mms_load_data_crib.pro for usage examples

     NOTES:
         Please see the notes in mms_load_data for more information

    $LastChangedBy: egrimes $
    $LastChangedDate: 2019-04-15 09:57:18 -0700 (Mon, 15 Apr 2019) $
    $LastChangedRevision: 27017 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/mms/sitl/sitl_data_fetch/mms_sitl_get_hpca.pro $

(See projects/mms/sitl/sitl_data_fetch/mms_sitl_get_hpca.pro)

## UNH_EDI_AMB_CRIB

[Previous Routine] [List of Routines]

       Plot EDI ambient data

     :Categories:
        MMS, SITL

     :Examples:
       To use::
           IDL> .r unh_edi_amb_crib

     :Author:
        Matthew Argall::
        University of New Hampshire
        Morse Hall Room 348
        8 College Road
        Durham, NH 03824
        matthew.argall@unh.edu

     :History:
        Modification History::
           2015/08/03  -   Written by Matthew Argall
           2015/09/06  -   Include EDP E-field. Plot 0 & 180 separately. - MRA
           2015/10/09  -   Plot any telemetry mode. - MRA

(See projects/mms/sitl/sitl_data_fetch/unh_edi_amb_crib.pro)