Skip to content

Commit

Permalink
Merge pull request #1024 from nickssl/master
Browse files Browse the repository at this point in the history
Added documentation for ssc, ssc_pre
  • Loading branch information
nickssl authored Sep 30, 2024
2 parents 0b5483b + 9d3a625 commit ceca38b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
34 changes: 33 additions & 1 deletion docs/source/themis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ Example




State data
----------------------------------------------------------
.. autofunction:: pyspedas.themis.state
Expand All @@ -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
----------------------------------------------------------
Expand Down
4 changes: 1 addition & 3 deletions pyspedas/projects/themis/tests/tests_state.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit ceca38b

Please sign in to comment.