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

Last modified: Tue Sep 9 18:17:27 2025.

# Directory Listing of Routines

# projects/themis/examples/advanced

- THM_CRIB_CLEANEFP
- THM_CRIB_CLEANEFW
- THM_CRIB_COTRANS_LMN
- THM_CRIB_ECLEAN_SUBSOLAR
- THM_CRIB_EFI_CAL
- THM_CRIB_ESA_BGND_ADVANCED
- THM_CRIB_ESA_BGND_REMOVE
- THM_CRIB_FAC
- THM_CRIB_FLIPBOOKIFY
  Crib sheet showing how to create flipbook-style figures and
- THM_CRIB_GMAG_LOCATIONS
- THM_CRIB_GMAG_WAVELET
- THM_CRIB_GREENLAND_GMAG
- THM_CRIB_ISEE_3D
- THM_CRIB_MACCS_GMAG
- THM_CRIB_MAKE_AE
- THM_CRIB_MAP
- THM_CRIB_MOM_DEAD_TIME_CORRECT
- THM_CRIB_MVA
- THM_CRIB_NEUTRAL_SHEET
- THM_CRIB_PART_COMBINE
- THM_CRIB_PART_COMBINE_NCOUNT
- THM_CRIB_PART_EXPORT
  This crib sheet shows how to export THEMIS particle (velocity distribution) data to ASCII files
- THM_CRIB_PART_PRODUCTS_NCOUNT
- THM_CRIB_PART_SLICE1D
- THM_CRIB_PART_SLICE2D_ADV
- THM_CRIB_PART_SLICE2D_MULTI
- THM_CRIB_PART_SLICE2D_PLOT
- THM_CRIB_POYNTING_FLUX
- THM_CRIB_READ_WRITE_ASCII_CMDLINE
- THM_CRIB_RECOVERY_VXY_MOM_EARLY_2007[1]
- THM_CRIB_RECOVERY_VXY_MOM_EARLY_2007[2]
- THM_CRIB_RECOVERY_VXY_MOM_EARLY_2007[2]
- THM_CRIB_RXY
- THM_CRIB_SCPOT2DENS
- THM_CRIB_SLP_SSE
- THM_CRIB_SPINFIT
- THM_CRIB_SSE
- THM_CRIB_SST_ION_DECONTAMINATE
- THM_CRIB_SST_LOAD_CALIBRATE
- THM_CRIB_SUPERPO_INTERPOL_HISTO
- THM_CRIB_TPLOT2AUTOPLOT
  Crib sheet showing how to send THEMIS data to Autoplot
- THM_CRIB_TWAVPOL
- THM_CRIB_TWAVPOL_SCM

# Routine Descriptions

## THM_CRIB_CLEANEFP

[Next Routine] [List of Routines]

    Procedure:
      thm_crib_cleanefp

    Purpose:
      Crib sheet for testing thm_efi_clean_efp

    Notes:

    $LastChangedBy: aaflores $
    $LastChangedDate: 2015-05-13 18:00:26 -0700 (Wed, 13 May 2015) $
    $LastChangedRevision: 17598 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_cleanefp.pro $

(See projects/themis/examples/advanced/thm_crib_cleanefp.pro)

## THM_CRIB_CLEANEFW

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

    Procedure:
      thm_crib_cleanefw

    Purpose:
      Crib sheet for testing thm_efi_clean_efw

    Notes:
     WARNING: Running THM_CRIB_EFI (or likely just calling THM_LOAD_EFI)
              after this crib will result in the wrong plot labels).
              The problem is probably in the way that some of the LASP
              code handles, or does not handle, the labelling.

    $LastChangedBy: aaflores $
    $LastChangedDate: 2015-05-13 18:00:26 -0700 (Wed, 13 May 2015) $
    $LastChangedRevision: 17598 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_cleanefw.pro $

(See projects/themis/examples/advanced/thm_crib_cleanefw.pro)

## THM_CRIB_COTRANS_LMN

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

    Procedure:
      thm_crib_cotrans_lmn

    Purpose:
      Crib sheet showing the use of thm_cotrans_lmn.

    Notes:
      Written by: Vladimir Kondratovich

    $LastChangedBy: aaflores $
    $LastChangedDate: 2015-05-13 18:00:26 -0700 (Wed, 13 May 2015) $
    $LastChangedRevision: 17598 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_cotrans_lmn.pro $

(See projects/themis/examples/advanced/thm_crib_cotrans_lmn.pro)

## THM_CRIB_ECLEAN_SUBSOLAR

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

    Procedure:
      thm_crib_eclean_subsolar

    Purpose:
      ?

    Notes:
      WARNING: This crib runs code that is under development.
               Query Jianbao Tao (Jianbao.Tao@colorado.edu) or
               John Bonnel (jbonnell@ssl.berkeley.edu) about
               the quality of the data products.

    $LastChangedBy: aaflores $
    $LastChangedDate: 2015-05-13 18:00:26 -0700 (Wed, 13 May 2015) $
    $LastChangedRevision: 17598 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_eclean_subsolar.pro $

(See projects/themis/examples/advanced/thm_crib_eclean_subsolar.pro)

## THM_CRIB_EFI_CAL

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

    Name:
      thm_crib_efi_cal

    Purpose:
      Allows comparison of calibrated, semi-calibrated and raw EFI data

    Calling Sequence:
      thm_crib_efi_cal [,probe=probe]  [,datatype=datatype]
                       [,date=date,] [,trange = trange]
                       [/split_components]

    Input:
      probe:  probe designation, e.g. 'a', 'b', 'c', 'd', 'e'
      datatype:  efi datatype:  'eff', 'efp', 'efw'
      trange:  two element time range
      date:  date from which to load 1 day of data (alternative to trange)
      split_components:  flag to split ouputs into separate tplot variables

    Output:
      No explicit output.
      Tplot variables are created for the given probe, date and datatype:
         th?_ef?_raw:            Raw data
         th?_ef?_no_edc_offset:  Data in physical units with no EDC offsets
                                 subtracted from the spin-plane components E12 and E34.
         th?_ef?_calfile_edc_offset:  Data in physical units with EDC offsets
                                      obtained from the calibration file subtracted
                                      from the spin-plane components E12 and E34.
         th?_ef?_full:  Data in physical units with spin-averaged EDC offsets
                        from the spin-plane components E12 and E34.

    Notes:
      -Default inputs if not explicitly set:
         probe = 'a'
         date = '2010-01-01'
         datatype = 'eff'

    HISTORY:
     20-sep-2010, jmm, jimm@ssl.berkeley.edu

     $LastChangedBy: aaflores $
     $LastChangedDate: 2015-05-13 18:00:26 -0700 (Wed, 13 May 2015) $
     $LastChangedRevision: 17598 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_efi_cal.pro $

(See projects/themis/examples/advanced/thm_crib_efi_cal.pro)

## THM_CRIB_ESA_BGND_ADVANCED

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

    Procedure:
      thm_crib_esa_bgnd_advanced

    Purpose:
      Demonstrate application of advanced background removal routines.
      These routines attempt to calculate and subtract ESA background
      based on ESA count statistics and SST electron data.

      Photo-electron and secondary backgrounds are also calculated
      for ESA electrons but are not currently subtracted.

      *** This is a work in progress, please report any bugs/issues! ***

    Notes:

    See also:
      thm_crib_esa_bgnd_remove
      thm_crib_part_products

      thm_load_esa_bgk (main routine to calculate background)
      thm_pse_bkg_auto (calculate pser-based background)

    $LastChangedBy: aaflores $
    $LastChangedDate: 2016-07-13 18:54:23 -0700 (Wed, 13 Jul 2016) $
    $LastChangedRevision: 21461 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_esa_bgnd_advanced.pro $

(See projects/themis/examples/advanced/thm_crib_esa_bgnd_advanced.pro)

## THM_CRIB_ESA_BGND_REMOVE

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

    Procedure:
      thm_crib_esa_bgnd_remove

    Purpose:
      Demonstrate examples of background contamination removal from ESA particle data.

    Notes:
      This crib is an updated version of Vassilis's original thm_crib_esa_bgnd_remove.

    See also:
      thm_crib_esa
      thm_crib_part_products

    $LastChangedBy: egrimes $
    $LastChangedDate: 2018-03-28 08:54:31 -0700 (Wed, 28 Mar 2018) $
    $LastChangedRevision: 24964 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_esa_bgnd_remove.pro $

(See projects/themis/examples/advanced/thm_crib_esa_bgnd_remove.pro)

## THM_CRIB_FAC

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

    Procedure:
      thm_crib_fac

    Purpose:
      A crib on showing how to transform into field aligned coordinates DSL coordinates

    Notes:

     $LastChangedBy: aaflores $
     $LastChangedDate: 2015-05-01 13:40:39 -0700 (Fri, 01 May 2015) $
     $LastChangedRevision: 17469 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_fac.pro $

(See projects/themis/examples/advanced/thm_crib_fac.pro)

## THM_CRIB_FLIPBOOKIFY

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

     PROCEDURE:
             thm_crib_flipbookify

     PURPOSE:
             Crib sheet showing how to create flipbook-style figures and
             movies with your current tplot window and 2D ESA/SST slices

     $LastChangedBy: egrimes $
     $LastChangedDate: 2018-08-27 15:21:22 -0700 (Mon, 27 Aug 2018) $
     $LastChangedRevision: 25700 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_flipbookify.pro $

(See projects/themis/examples/advanced/thm_crib_flipbookify.pro)

## THM_CRIB_GMAG_LOCATIONS

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

    Procedure:
      thm_crib_gmag_locations

    Purpose:
      Example 1:
      -------------
        Produce a plot showing the location of all gmag stations
        similar to the ones shown on the THEMIS website.

      Example 2:
      -------------
        Find available data within a specified latitude/longitude.

    See also:
      thm_crib_gmag
      thm_crib_greenland_gmag
      thm_crib_maccs_gmag
      thm_crib_gmag_wavelet

    More info:
      http://themis.ssl.berkeley.edu/instrument_gmags.shtml

    $LastChangedBy: aaflores $
    $LastChangedDate: 2015-02-27 16:08:10 -0800 (Fri, 27 Feb 2015) $
    $LastChangedRevision: 17056 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_gmag_locations.pro $

(See projects/themis/examples/advanced/thm_crib_gmag_locations.pro)

## THM_CRIB_GMAG_WAVELET

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

    Procedure:
      thm_crib_gmag_wavelet

    Purpose:
      Demonstrate wavelet analysis of ground magnetometer data.

    See also:
      thm_crib_gmag
      thm_crib_greenland_gmag
      thm_crib_maccs_gmag

    More info:
      http://themis.ssl.berkeley.edu/instrument_gmags.shtml

    $LastChangedBy: aaflores $
    $LastChangedDate: 2015-02-27 16:08:10 -0800 (Fri, 27 Feb 2015) $
    $LastChangedRevision: 17056 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_gmag_wavelet.pro $

(See projects/themis/examples/advanced/thm_crib_gmag_wavelet.pro)

## THM_CRIB_GREENLAND_GMAG

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

    Procedure:
      thm_crib_greenland_gmag

    Purpose:
      Crib sheet demonstrating loading GMAG data from Greenland stations

    Notes:
      In addition to the NRSQ site included in the standard THEMIS GMAG
      data distribution, Jurgen Matzka(jrgm@space.dtu.dk) from the Technical
      University of Denmark has made data gmag data available from the DTU(previously DMI) and
      the TGO gmag networks.  Availability is 2007 through to the present.
      Although not all gmags are available at all times.
      To access these data, simply use the program thm_load_gmag
      More DMI data can be added upon request.  Otherwise, THEMIS archives will be updated
      approximately every 3 months.

      WARNING:  As with all GMAG data, users should be careful to verify data units
                and coordinate systems, as calibrations can drift from true values
                over time.  Users should be particularly careful with the older data
                from the DMI/DTU network. In particular, DMI/DTU data from the first
                part of 2009 and earlier is uncalibrated.

    $LastChangedBy: aaflores $
    $LastChangedDate: 2015-05-13 18:00:26 -0700 (Wed, 13 May 2015) $
    $LastChangedRevision: 17598 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_greenland_gmag.pro $

(See projects/themis/examples/advanced/thm_crib_greenland_gmag.pro)

## THM_CRIB_ISEE_3D

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

    Purpose:
      Crib demonstrating usage of isee_3d tool with themis particle data

    Notes:
      -Currently only compatible with modified tool at:
        /spedas_gui/stel_3d/stel_3d_pro_20150811/pro

    $LastChangedBy: aaflores $
    $LastChangedDate: 2016-05-24 13:12:04 -0700 (Tue, 24 May 2016) $
    $LastChangedRevision: 21185 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_isee_3d.pro $

(See projects/themis/examples/advanced/thm_crib_isee_3d.pro)

## THM_CRIB_MACCS_GMAG

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

    Procedure:
      thm_crib_maccs_gmag

    Purpose:
      This crib sheet gives examples of how to plot magnetometer data from
      the Magnetometer Array for Cusp and Cleft Studies (MACCS), an array of
      magnetometers in Arctic Canada run by Augsburg College and Boston
      University. Further details of the MACCS array can be found in:
      "W. J. Hughes and M. J. Engebretson, MACCS: Magnetometer Array for Cusp
      and Cleft Studies, in Satellite-Ground Based Coordination Sourcebook,
      (eds. M. Lockwood, M.N. Wild H. J. Opgenoorth), ESA-SP-1198, pp. 119-130, 1997."

    Notes:
      If these data are used in a publication, you must acknowledge the source:
      "Acknowledgement: MACCS magnetometer data were provided by Mark Engebretson,
      Augsburg College"

    See also:
      thm_crib_gmag

    $LastChangedBy: aaflores $
    $LastChangedDate: 2015-05-13 18:00:26 -0700 (Wed, 13 May 2015) $
    $LastChangedRevision: 17598 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_maccs_gmag.pro $

(See projects/themis/examples/advanced/thm_crib_maccs_gmag.pro)

## THM_CRIB_MAKE_AE

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

    Procedure:
     thm_crib_make_ae

    Purpose:
     This is an example crib sheet that will calculate and plot "pseudo" geomagnetic
     indices (thmAE, thmAU, thmAL) as derived from THEMIS ground magnetometer data.
     In future, it is planned to include ground magnetometer data from other magnetometer
     networks. Note that currently the calculation of these "pseudo" indices does not
     subtract quiet day variation but simply the median.

     Open this file in a text editor and then use copy and paste to copy
     selected lines into an idl window.

    Notes:
     Written by Andreas Keiling, 15 May 2008

     Modifications:
       Changed name from thm_crib_AE to thm_crib_make_AE, added print info/stops,
         remove DEL_DATA,'*' command, W.M.Feuerstein, 6/2/2008.

     $LastChangedBy: aaflores $
     $LastChangedDate: 2015-05-13 18:00:26 -0700 (Wed, 13 May 2015) $
     $LastChangedRevision: 17598 $
     $URL $

(See projects/themis/examples/advanced/thm_crib_make_ae.pro)

## THM_CRIB_MAP

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

    Procedures:
      thm_map_ex_1
      thm_map_ex_2
      thm_map_ex_3
      thm_map_ex_4
      thm_map_ex_5
      thm_map_ex_6
      thm_map_ex_7
      thm_map_ex_8
      thm_map_ex_9
      thm_map_ex_12
      thm_map_ex_13
      thm_map_ex_cdf_full

    Purpose:
      Multiple examples of how to use thm_map_set and thm_map_add.

    Input:
      None

    Notes:
      -all these examples reset the plotting window

    $LastChangedBy: aaflores $
    $LastChangedDate: 2015-05-22 16:54:25 -0700 (Fri, 22 May 2015) $
    $LastChangedRevision: 17683 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_map.pro $

(See projects/themis/examples/advanced/thm_crib_map.pro)

## THM_CRIB_MOM_DEAD_TIME_CORRECT

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

    Name:
      thm_crib_mom_dead_time_correct

    Purpose:
      Example for use of dead time corrections for on-board moments
      calculated from ground-based moments.

    Notes:

    $LastChangedBy: jwl $
    $LastChangedDate: 2017-01-10 11:21:27 -0800 (Tue, 10 Jan 2017) $
    $LastChangedRevision: 22562 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_mom_dead_time_correct.pro $

(See projects/themis/examples/advanced/thm_crib_mom_dead_time_correct.pro)

## THM_CRIB_MVA

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

    Procedure:
      thm_crib_mva

    Purpose:
      A crib on showing how to transform into minimum variance
      analysis coordinates

    Notes:

     $LastChangedBy: aaflores $
     $LastChangedDate: 2015-05-13 18:00:26 -0700 (Wed, 13 May 2015) $
     $LastChangedRevision: 17598 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_mva.pro $

(See projects/themis/examples/advanced/thm_crib_mva.pro)

## THM_CRIB_NEUTRAL_SHEET

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

     Name: thm_crib_neutral_sheet

     Purpose:crib to demonstrate use of the neutral sheet routines
          and means for generating plots.

     Notes: 1. run it by compiling in idl and then typing ".go"
            or copy and paste.

     SEE ALSO: idl/external/IDL_GEOPACK/trace/ttrace_crib.pro
               idl/ssl_general/cotrans/aacgm/aacgm_example.pro
               idl/themis/examples/thm_crib_tplotxy.pro

     $LastChangedBy: egrimes $
     $LastChangedDate: 2014-02-06 12:22:09 -0800 (Thu, 06 Feb 2014) $
     $LastChangedRevision: 14178 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_neutral_sheet.pro $

(See projects/themis/examples/advanced/thm_crib_neutral_sheet.pro)

## THM_CRIB_PART_COMBINE

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

    Name:
      thm_crib_part_combine

    Purpose:
      Crib demonstrating basic usage of combined ESA/SST particle code.

    See also:
      thm_crib_part_products
      thm_crib_part_slice2d
      thm_crib_part_combine_ncount
      thm_crib_sst_load_calibrate
      thm_crib_sst.pro
      thm_crib_esa.pro

    Notes:
      If you see any useful examples missing from these cribs, please let us know.
      A lot of instrument specific options (e.g. decontamination) are found in the other cribs.

    Notes on method:
      Internally, combined distributions are created in three steps:
        a) Linear time interpolation
             -time samples are matched by linearly interpolating the
              data set with lower time resolution to match the other
        b) Linear spherical interpolation
             -both data sets are interpolated onto the same angular grid
        c) Energy gap interpolation
             -once all times/angles match the gap between the
              ESA and SST energy ranges is filled in with a logarithmic
              linear interpolation (log(flux) vs log(energy))

    $LastChangedBy: jimmpc1 $
    $LastChangedDate: 2017-10-05 10:40:29 -0700 (Thu, 05 Oct 2017) $
    $LastChangedRevision: 24118 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_part_combine.pro $

(See projects/themis/examples/advanced/thm_crib_part_combine.pro)

## THM_CRIB_PART_COMBINE_NCOUNT

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

    Name:
      thm_crib_part_combine_ncount

    Purpose:
      Crib demonstrating how to subtract or mask a set number of counts
      from combined ESA-SST particle distributions.

      Rather than masking/subtracting the raw data this will create
      a second product in parallel: a mask that can be applied to the
      final product (i.e. the subtraction is applied after averaging
      and/or interpolating the data instead of before)

    See also:
      thm_crib_part_combine
      thm_crib_part_products_ncount
      thm_crib_part_slice2d
      thm_crib_part_products

    Notes:

    $LastChangedBy: aaflores $
    $LastChangedDate: 2016-07-22 16:53:38 -0700 (Fri, 22 Jul 2016) $
    $LastChangedRevision: 21514 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_part_combine_ncount.pro $

(See projects/themis/examples/advanced/thm_crib_part_combine_ncount.pro)

## THM_CRIB_PART_EXPORT

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

     PURPOSE:
       This crib sheet shows how to export THEMIS particle (velocity distribution) data to ASCII files

     NOTES:
       The underlying routine - spd_pgs_export - will create 5 ASCII files:
         [filename]_data.txt: the velocity distribution data
         [filename]_energy.txt: the energy values at each bin
         [filename]_theta.txt: the theta values at each bin
         [filename]_phi.txt: the phi values at each bin
         [filename]_bins.txt: 1 or 0 depending on if this bin is active

       If no filename is specified, dist.project, dist.spacecraft and dist.data_name are used to form the filename

    $LastChangedBy: egrimes $
    $LastChangedDate: 2019-04-10 15:38:44 -0700 (Wed, 10 Apr 2019) $
    $LastChangedRevision: 26999 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_part_export.pro $

(See projects/themis/examples/advanced/thm_crib_part_export.pro)

## THM_CRIB_PART_PRODUCTS_NCOUNT

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

    Procedure:
      thm_crib_part_products_ncount

    Purpose:
      Demonstrate removal of one count level from particle spectrograms.
      Rather than masking/subtracting the raw data this will create
      a second product in parallel: a mask that can be applied to the
      final product (i.e. the subtraction is applied after averaging
      the data instead of before)

    See also:
      thm_crib_part_combine_ncount
      thm_crib_part_products

    Notes:

    $LastChangedBy: aaflores $
    $LastChangedDate: 2016-07-22 16:53:38 -0700 (Fri, 22 Jul 2016) $
    $LastChangedRevision: 21514 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_part_products_ncount.pro $

(See projects/themis/examples/advanced/thm_crib_part_products_ncount.pro)

## THM_CRIB_PART_SLICE1D

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

    Name:
      thm_crib_part_slice1d

    Purpose:
      Demonstrate production of 1D plots from 2D particle distribution contours.

    See Also:
       thm_crib_part_slice2d

    Notes:

    $LastChangedBy: aaflores $
    $LastChangedDate: 2015-05-14 14:38:31 -0700 (Thu, 14 May 2015) $
    $LastChangedRevision: 17616 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_part_slice1d.pro $

(See projects/themis/examples/advanced/thm_crib_part_slice1d.pro)

## THM_CRIB_PART_SLICE2D_ADV

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

    Name
      thm_crib_part_slice2d_adv

    Purpose:
      A crib showing advanced usage of the 2D velocity slices code.

    See also:
      thm_crib_part_slice2d
      thm_crib_part_slice2d_plot
      thm_crib_part_slice2d_multi
      thm_crib_part_slice1d

    Notes:
      Run "thm_ui_slice2d" on the IDL console to use for the GUI version.
       (Also part of the plugins menu in the SPEDAS GUI)

    $LastChangedBy: nikos $
    $LastChangedDate: 2020-06-02 17:15:12 -0700 (Tue, 02 Jun 2020) $
    $LastChangedRevision: 28761 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_part_slice2d_adv.pro $;

(See projects/themis/examples/advanced/thm_crib_part_slice2d_adv.pro)

## THM_CRIB_PART_SLICE2D_MULTI

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

    Procedure:
      thm_crib_part_slice2d_multi

    Purpose:
      Demonstrate how to create a time series of distribution
      slices using a while loop.

    See also:
      thm_crib_part_slice2d
      thm_crib_part_slice2d_adv
      thm_crib_part_slice2d_plot
      thm_crib_part_slice1d

    Notes:

    $LastChangedBy: nikos $
    $LastChangedDate: 2016-11-30 11:43:37 -0800 (Wed, 30 Nov 2016) $
    $LastChangedRevision: 22421 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_part_slice2d_multi.pro $

(See projects/themis/examples/advanced/thm_crib_part_slice2d_multi.pro)

## THM_CRIB_PART_SLICE2D_PLOT

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

    Name
      thm_crib_part_slice2d_plot

    Purpose:
      A crib showing plotting options for 2D particle slices.

    See also:
      thm_crib_part_slice2d
      thm_crib_part_slice2d_adv
      thm_crib_part_slice2d_multi
      thm_crib_part_slice1d

    Notes:

    $LastChangedBy: aaflores $
    $LastChangedDate: 2016-03-24 16:48:06 -0700 (Thu, 24 Mar 2016) $
    $LastChangedRevision: 20586 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_part_slice2d_plot.pro $

(See projects/themis/examples/advanced/thm_crib_part_slice2d_plot.pro)

## THM_CRIB_POYNTING_FLUX

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

    Procedure:
      thm_crib_poynting_flux

    Purpose:
      This crib sheet shows how to correct the THEMIS-EFI high-frequency
      data to compensate for the transfer function, and then shows how to
      calculate Poynting flux from the EFI and SCM data.

    Notes:

    History:
      2012-05-23, jmm, changed input to have user prompted for test case.
      2015-05-14,  af, integrating thm_validate_high_freq_using_phase into this crib

    $LastChangedBy: jwl $
    $LastChangedDate: 2023-06-01 18:09:03 -0700 (Thu, 01 Jun 2023) $
    $LastChangedRevision: 31874 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_poynting_flux.pro $

(See projects/themis/examples/advanced/thm_crib_poynting_flux.pro)

## THM_CRIB_READ_WRITE_ASCII_CMDLINE

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

    Name:
      thm_crib_read_write_ascii_cmdline

    Purpose:
      Demonstrates use of the read_ascii_cmdline and
      the write_ascii_cmdline IDL procedures.

    See also:
      general/misc/write_ascii_cmdline.pro
      general/misc/write_ascii.pro
      general/misc/read_ascii_cmdline.pro
      read_ascii.pro (IDL routine)
      ascii_template (IDL routine)

    Notes:

    $LastChangedBy: aaflores $
    $LastChangedDate: 2015-05-14 16:11:04 -0700 (Thu, 14 May 2015) $
    $LastChangedRevision: 17618 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_read_write_ascii_cmdline.pro $

(See projects/themis/examples/advanced/thm_crib_read_write_ascii_cmdline.pro)

## THM_CRIB_RECOVERY_VXY_MOM_EARLY_2007[1]

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

    Name:
      thm_crib_recovery_Vxy_mom_early_2007

    Purpose:
      This command gets the onboard moments, which are wrong because of an
      error in uploading the onboard tables.

      Correlation likely depends on temperature, so the same coefficients
       may not be applicable to the entire day.  In these cases it may be
       necessary to narrow the interval (intervals of 1/3 day is probably
       about right).  The variables ii and nn mark the start and stop of
       the interval calculated, so adjust those to find appropriate time
       periods.  Adjust the sc and timespan lines to change spacecraft and
       days. Also, the moment data end up being a bit noisy, so you may
       want to run 'avg_data', with a small timestep (maybe 10 seconds or so).
       th?_v?_corr contains the high resolution velocity, and th?_v?_dec
       contains the data decimated to match the low resolution data, for
       comparison.

    Notes:
      2015-05-14: This in an old crib and may or may not be valid and up to date.

    History:
      Written by Larry Kepko (larry.kepko@unh.edu)

    $LastChangedBy: aaflores $
    $LastChangedDate: 2015-05-14 16:11:04 -0700 (Thu, 14 May 2015) $
    $LastChangedRevision: 17618 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_recovery_Vxy_mom_early_2007.pro $

(See projects/themis/examples/advanced/thm_crib_recovery_Vxy_mom_early_2007.pro)

## THM_CRIB_RECOVERY_VXY_MOM_EARLY_2007[2]

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

     Crib helper function

(See projects/themis/examples/advanced/thm_crib_recovery_Vxy_mom_early_2007.pro)

## THM_CRIB_RECOVERY_VXY_MOM_EARLY_2007[2]

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

     Crib helper function

(See projects/themis/examples/advanced/thm_crib_recovery_Vxy_mom_early_2007.pro)

## THM_CRIB_RXY

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

    Procedure:
      rxy_crib.pro

    Purpose:
      A crib showing how to transform data into the RXY coordinate system. This
      coordinate system is a variant of GSM that has the GSM Z axis, but the XY-plane is
      rotated so that the X-axis is on the Earth->Spacecraft line, and more positive values
      are further from the earth.

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

     $LastChangedBy: aaflores $
     $LastChangedDate: 2015-05-14 16:11:04 -0700 (Thu, 14 May 2015) $
     $LastChangedRevision: 17618 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_rxy.pro $

(See projects/themis/examples/advanced/thm_crib_rxy.pro)

## THM_CRIB_SCPOT2DENS

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

    Procedure:
      thm_crib_scpot2dens

    Purpose:
      Demonstrate how to calculate particle density
      from the measured spacecraft potential.

    Notes:
      Contact J. McFadden (mcfadden@ssl.berkeley.edu)
      with questions about quality of output.

    $LastChangedBy: aaflores $
    $LastChangedDate: 2015-05-14 16:11:04 -0700 (Thu, 14 May 2015) $
    $LastChangedRevision: 17618 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_scpot2dens.pro $

(See projects/themis/examples/advanced/thm_crib_scpot2dens.pro)

## THM_CRIB_SLP_SSE

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

    Name:
      thm_crib_slp_sse

    Purpose:
      Crib to demonstrate how to use Solar Lunar Planetary Data,
      And how to perform SSE transformation

    Notes:

     $LastChangedBy: aaflores $
     $LastChangedDate: 2015-05-14 17:01:41 -0700 (Thu, 14 May 2015) $
     $LastChangedRevision: 17619 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_slp_sse.pro $

(See projects/themis/examples/advanced/thm_crib_slp_sse.pro)

## THM_CRIB_SPINFIT

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

    Procedure:
      thm_crib_spinfit

    Purpose:
      Demonstration of finding spin fit parameters for spinning data.
      The FIT module calculates the E-Field and B-Field vectors by taking 32 points at equal angles
      and fitting a sine wave least squares fit to the data. The best fit of the data is defined by the
      formula: A + B*cos() + C*sin(). The module calculates the standard deviation of the fit
      called Sigma, and the number of points remaining in the curve called N.

    Usage documentation for thm_spinfit

        Arguments:
          required parameters:
            var_name_in = tplot variable name containing data to fit

        Keywords:
           sigma = If set, will cause program to output tplot variable with sigma for each period.
           npoints = If set, will cause program to output tplot variable with number of points in fit.
           spinaxis = If set, program will output a tplot variable storing the average over the spin axis dimension
                    for each time period.
           median  = If spinaxis set, program will output a median of each period instead of the average.
           plane_dim = Tells program which dimension to treat as the plane. 0=x, 1=y, 2=z. Default 0.
           axis_dim = Tells program which dimension contains axis to average over. Default 0.  Will not
                    create a tplot variable unless used with /spinaxis.
           min_points = Minimum number of points to fit.  Default = 5.
           alpha = A parameter for finding fits.  Points outside of sigma*(alpha + beta*i)
                 will be thrown out.  Default 1.4.
           beta = A parameter for finding fits.  See above.  Default = 0.4
           phase_mask_starts = Time to start masking data.  Default = 0
           phase_mask_ends = Time to stop masking data.  Default = -1
           sun2sensor = Tells how much to rotate data to align with sun sensor.

       Notes:
        	 The module determines which data is more than xN * �N (sN = standard deviation) away from fit,
           and removes those points and repeats the fit. The second time the standard deviation is
           smaller so the tolerance is increased a bit. The tolerance xN varies with try as:
           Alpha*NBeta, where A=1.4 and Beta=0.4 provide good results. The operation continues
           until no points are outside the bounds and the process is considered convergent.

    Written by Katherine Ramer
     $LastChangedBy: aaflores $
     $LastChangedDate: 2015-03-04 14:34:06 -0800 (Wed, 04 Mar 2015) $
     $LastChangedRevision: 17089 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_spinfit.pro $

(See projects/themis/examples/advanced/thm_crib_spinfit.pro)

## THM_CRIB_SSE

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

    Procedure:
      thm_crib_sse

    Purpose:
      A crib showing how to transform data from GSE to SSE coordinate system.

    See also:
      thm_crib_cotrans

    Notes:
      -Code heavily based on make_mat_Rxy.pro & transform_gsm_to_rxy.pro
       by Christine Gabrielse(cgabrielse@ucla.edu)
      -SSE is defined as:
         X: Moon->Sun Line projected into the ecliptic plane
         Y: Z x X
         Z: Ecliptic north

     $LastChangedBy: aaflores $
     $LastChangedDate: 2015-05-18 16:11:30 -0700 (Mon, 18 May 2015) $
     $LastChangedRevision: 17643 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_sse.pro $

(See projects/themis/examples/advanced/thm_crib_sse.pro)

## THM_CRIB_SST_ION_DECONTAMINATE

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

    Procedure: thm_crib_sst_ion_decontaminate

    Purpose:  A crib on showing how to subtract the SST-FT channels from the SST-O data to remove electron contamination from ion moments.

    Notes:

     $LastChangedBy: pcruce $
     $LastChangedDate: 2017-01-09 09:37:04 -0800 (Mon, 09 Jan 2017) $
     $LastChangedRevision: 22534 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_sst_ion_decontaminate.pro $

(See projects/themis/examples/advanced/thm_crib_sst_ion_decontaminate.pro)

## THM_CRIB_SST_LOAD_CALIBRATE

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

     Name: thm_crib_sst_load_calibrate

     Purpose:  Demonstrate usage of thm_sst_load_calibrate

     $LastChangedBy: egrimes $
     $LastChangedDate: 2018-07-20 10:29:36 -0700 (Fri, 20 Jul 2018) $
     $LastChangedRevision: 25499 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_sst_load_calibrate.pro $

(See projects/themis/examples/advanced/thm_crib_sst_load_calibrate.pro)

## THM_CRIB_SUPERPO_INTERPOL_HISTO

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

    Name:
      thm_crib_superpo_interpol_histo

    Purpose:
      Demonstrates the application of the routines
      superpo_interpol and superpo_histo

    Notes:
      The examples in this crib sheet call 'superpo_interpol'. Simply
      replace the calls with 'superpo_histo' to try the other routine.
      Both routines accept the same input parameters.

    History:
      Written by Andreas Keiling
      2015-05-14 (af) load only THEMIS GBO sites instead of all (there are a lot now)

    $LastChangedBy:   $
    $LastChangedDate:   $
    $LastChangedRevision:  $
    $URL $

(See projects/themis/examples/advanced/thm_crib_superpo_interpol_histo.pro)

## THM_CRIB_TPLOT2AUTOPLOT

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

     PROCEDURE:
             thm_crib_tplot2autoplot

     PURPOSE:
             Crib sheet showing how to send THEMIS data to Autoplot

     NOTES:
             For this to work, you'll need to open Autoplot and enable the 'Server' feature via
             the 'Options' menu with the default port (12345)

     $LastChangedBy: egrimes $
     $LastChangedDate: 2018-05-14 07:45:30 -0700 (Mon, 14 May 2018) $
     $LastChangedRevision: 25217 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_tplot2autoplot.pro $

(See projects/themis/examples/advanced/thm_crib_tplot2autoplot.pro)

## THM_CRIB_TWAVPOL

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

    Name:
      thm_crib_twavpol

    Purpose:

      This version stores these outputs as tplot variables with the
      specified prefix
             These are follows:

             Wave power: On a linear scale (units of nT^2/Hz if input Bx, By, Bz are in nT)

             Degree of Polarisation:
    		This is similar to a measure of coherency between the input
    		signals, however unlike coherency it is invariant under
    		coordinate transformation and can detect pure state waves
    		which may exist in one channel only.100% indicates a pure
    		state wave. Less than 70% indicates noise. For more
    		information see J. C. Samson and J. V. Olson 'Some comments
    		on the description of the polarization states
    		of waves' Geophys. J. R. Astr. Soc. (1980) v61 115-130

             Wavenormal Angle:
    		the angle between the direction of minimum
    		variance calculated from the complex off diagonal
    		elements of the spectral matrix and the Z direction
    		of the input
    		ac field data. For magnetic field data in
    		field aligned coordinates this is the
    		wavenormal angle assuming a plane wave.

             Ellipticity:The ratio (minor axis)/(major axis) of the
    		ellipse transcribed by the field variations of the
    		components transverse to the Z direction. The sign
    		indicates the direction of rotation of the field vector in
      		the plane. Negative signs refer to left-handed
    		rotation about the Z direction. In the field
    		aligned coordinate system these signs refer to
    		plasma waves of left and right handed
    		polarisation.

             Helicity:Similar to Ellipticity except defined in terms of the
    	direction of minimum variance instead of Z. Stricltly the Helicity
    	is defined in terms of the wavenormal direction or k.
    	However since from single point observations the
    	sense of k cannot be determined,  helicity here is
    	simply the ratio of the minor to major axis transverse to the
           minimum variance direction without sign.

    History:
      Written by : Kaori(I'll remember to get her last name soon)

     $LastChangedBy: pcruce $
     $LastChangedDate: 2007-12-06 14:56:54 -0800 (Thu, 06 Dec 2007) $
     $LastChangedRevision: 2161 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/ssl_general/trunk/misc/tplotxy.pro $

(See projects/themis/examples/advanced/thm_crib_twavpol.pro)

## THM_CRIB_TWAVPOL_SCM

[Previous Routine] [List of Routines]

    NAME:
     thm_crib_twavpol_scm

    Purpose:
     Demonstrate the usage of the wave polarization routines
     for SCM data in magnetic field aligned coordinates.

    NOTES:
      Shortened version of Olivier Le Contel's <olivier.lecontel@lpp.polytechnique.fr> wave polarization
      crib(scm_mfa_wpol_ole_fc_crib.pro)
      Edited for clarity, minor updates - 2016-06-17 af

     $LastChangedBy: aaflores $
     $LastChangedDate: 2016-06-17 16:55:39 -0700 (Fri, 17 Jun 2016) $
     $LastChangedRevision: 21338 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/advanced/thm_crib_twavpol_scm.pro $

(See projects/themis/examples/advanced/thm_crib_twavpol_scm.pro)