From 9d3a6253b6f3885da5901aaed35b3c0c5b042dda Mon Sep 17 00:00:00 2001 From: Nick H <34072991+nickssl@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:55:11 -0700 Subject: [PATCH] Added documentation for ssc, ssc_pre --- docs/source/themis.rst | 34 ++++++++++++++++++- pyspedas/projects/themis/tests/tests_state.py | 4 +-- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/docs/source/themis.rst b/docs/source/themis.rst index 5a562f62..69a79dc4 100644 --- a/docs/source/themis.rst +++ b/docs/source/themis.rst @@ -149,7 +149,6 @@ Example - State data ---------------------------------------------------------- .. autofunction:: pyspedas.themis.state @@ -170,6 +169,39 @@ Example +Orbit data from SSCWeb +---------------------------------------------------------- +.. autofunction:: pyspedas.themis.ssc + +Example +^^^^^^^^^ + +.. code-block:: python + + from pyspedas.themis import ssc + ssc_vars = ssc(probe='d', trange=['2012-10-01', '2012-10-02']) + print(ssc_vars) + + ['GEO_LAT', 'GEO_LON', 'GEO_LCT_T', 'GM_LAT', 'GM_LON', 'GM_LCT_T', 'GSE_LAT', 'GSE_LON', 'GSE_LCT_T', 'GSM_LAT', 'GSM_LON', 'SM_LAT', 'SM_LON', 'SM_LCT_T', 'NorthBtrace_GEO_LAT', 'NorthBtrace_GEO_LON', 'NorthBtrace_GEO_ARCLEN', 'SouthBtrace_GEO_LAT', 'SouthBtrace_GEO_LON', 'SouthBtrace_GEO_ARCLEN', 'NorthBtrace_GM_LAT', 'NorthBtrace_GM_LON', 'NorthBtrace_GM_ARCLEN', 'SouthBtrace_GM_LAT', 'SouthBtrace_GM_LON', 'SouthBtrace_GM_ARCLEN', 'RADIUS', 'MAG_STRTH', 'DNEUTS', 'BOW_SHOCK', 'MAG_PAUSE', 'L_VALUE', 'INVAR_LAT', 'MAG_X', 'MAG_Y', 'MAG_Z', 'XYZ_GEO', 'XYZ_GM', 'XYZ_GSE', 'XYZ_GSM', 'XYZ_SM'] + + + +Orbit data from SSCWeb (predicted) +---------------------------------------------------------- +.. autofunction:: pyspedas.themis.ssc_pre + +Example +^^^^^^^^^ + +.. code-block:: python + + from pyspedas.themis import ssc_pre + ssc_pre_vars = ssc_pre(probe='a', trange=['2028-12-01', '2028-12-02']) + print(ssc_pre_vars) + + ['GEO_LAT', 'GEO_LON', 'GEO_LCT_T', 'GM_LAT', 'GM_LON', 'GM_LCT_T', 'GSE_LAT', 'GSE_LON', 'GSE_LCT_T', 'GSM_LAT', 'GSM_LON', 'SM_LAT', 'SM_LON', 'SM_LCT_T', 'NorthBtrace_GEO_LAT', 'NorthBtrace_GEO_LON', 'NorthBtrace_GEO_ARCLEN', 'SouthBtrace_GEO_LAT', 'SouthBtrace_GEO_LON', 'SouthBtrace_GEO_ARCLEN', 'NorthBtrace_GM_LAT', 'NorthBtrace_GM_LON', 'NorthBtrace_GM_ARCLEN', 'SouthBtrace_GM_LAT', 'SouthBtrace_GM_LON', 'SouthBtrace_GM_ARCLEN', 'RADIUS', 'MAG_STRTH', 'DNEUTS', 'BOW_SHOCK', 'MAG_PAUSE', 'L_VALUE', 'INVAR_LAT', 'MAG_X', 'MAG_Y', 'MAG_Z', 'XYZ_GEO', 'XYZ_GM', 'XYZ_GSE', 'XYZ_GSM', 'XYZ_SM'] + + Ground magnetometer data ---------------------------------------------------------- diff --git a/pyspedas/projects/themis/tests/tests_state.py b/pyspedas/projects/themis/tests/tests_state.py index 9e147313..efae619b 100644 --- a/pyspedas/projects/themis/tests/tests_state.py +++ b/pyspedas/projects/themis/tests/tests_state.py @@ -1,6 +1,6 @@ import logging import unittest -from pyspedas.projects.themis import state +from pyspedas.projects.themis import state, ssc, ssc_pre from pytplot import data_exists, get_data, del_data, tplot_restore from numpy.testing import assert_allclose @@ -102,12 +102,10 @@ def test_state_exclude_format(self): self.assertFalse(data_exists('thb_pos_sse')) def test_ssc(self): - from pyspedas.themis import ssc vars = ssc() self.assertTrue(len(vars) > 0) def test_ssc_pre(self): - from pyspedas.themis import ssc_pre vars = ssc_pre() self.assertTrue(len(vars) > 0)