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

Last modified: Fri Nov 7 18:17:52 2025.

# Directory Listing of Routines

# general/spedas_tools/python_validation

- GENERAL_VALIDATION_UT__DEFINE
  This object contains general PySPEDAS validation tests
- PY_VALIDATION_EXAMPLE_UT__DEFINE
  This object is an example of using MGunit to build unit tests that validate Python code
- SPD_RUN_PY_VALIDATION
  Runs a Python script and checks that tplot variables match those currently loaded in IDL

# Routine Descriptions

## GENERAL_VALIDATION_UT__DEFINE

[Next Routine] [List of Routines]

     OBJECT:
           general_validation_ut

     PURPOSE:
           This object contains general PySPEDAS validation tests

     NOTES:
           To run:
             IDL> mgunit, 'general_validation_ut'

     $LastChangedBy: egrimes $
     $LastChangedDate: 2022-04-08 12:53:56 -0700 (Fri, 08 Apr 2022) $
     $LastChangedRevision: 30760 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spedas_tools/python_validation/general_validation_ut__define.pro $

(See general/spedas_tools/python_validation/general_validation_ut__define.pro)

## PY_VALIDATION_EXAMPLE_UT__DEFINE

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

     OBJECT:
           py_validation_example_ut

     PURPOSE:
           This object is an example of using MGunit to build unit tests that validate Python code

     NOTES:
           To run:
             IDL> mgunit, 'py_validation_example_ut'

           For the MMS validation tests, see:
             projects/mms/common/tests/mms_python_validation_ut__define.pro

     $LastChangedBy: egrimes $
     $LastChangedDate: 2020-10-08 10:37:39 -0700 (Thu, 08 Oct 2020) $
     $LastChangedRevision: 29225 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spedas_tools/python_validation/py_validation_example_ut__define.pro $

(See general/spedas_tools/python_validation/py_validation_example_ut__define.pro)

## SPD_RUN_PY_VALIDATION

[Previous Routine] [List of Routines]

     FUNCTION:
         spd_run_py_validation

     PURPOSE:
         Runs a Python script and checks that tplot variables match those currently loaded in IDL

     INPUT:
         py_script: Python script, specified as a string or array of strings
         vars: variables to check, specified as a string or array of strings

     KEYWORDS:
         tolerance: maximum percent difference between the data and time values (default: 1e-3)
         py_exe_dir: location of the python executable on your machine
         tmp_dir: local directory where the Python scripts are stored prior to running
         points_to_check: number of data points to check

     NOTES:
         - IDL variables must already be loaded
         - This routine only checks a few data points throughout the variables (set by the 'tolerance' keyword)

     $LastChangedBy: egrimes $
     $LastChangedDate: 2021-08-20 15:33:18 -0700 (Fri, 20 Aug 2021) $
     $LastChangedRevision: 30232 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spedas_tools/python_validation/spd_run_py_validation.pro $

(See general/spedas_tools/python_validation/spd_run_py_validation.pro)