Skip to content

Commit

Permalink
Bring branch up to date with master (#579)
Browse files Browse the repository at this point in the history
* Temporarily specifying pandas 2.0.0 dependency for testing purposes

* Disabling akebono tests....works in my environment, looks like connection/download problems in github test environment are still an issue

* generate gse2sse file and skeleton; update jwu_testto call gse2sse

* Removing pandas 2.0.0 dependency (it seems to work fine)
Re-enabling akebono tests to verify that the test failure there is not related to pandas 2.0.0.

* Disabling akebono tests again -- test failure is unrelated to pandas 2.0.0, perhaps triggering DDOS protections with too many connections in a short time period?

* Apply cotrans to sun/moon positions if necessary
Apply earth-moon translation when working with positions
Transpose rotation matrices if doing inverse transform (pyspedas tvector_rotate does not support invert keyword)

* Switch to using CDF for IDL-Python validation (still not picking up coordinate system metadata, though)
Set coordinate system explicitly where needed
Add GSE to SSE rotation matrix to test variables

* bumping required version of pytplot to get EIS bug fix
also bumping version to get this into PyPI

* fixing bug with repeated calls to FEEPS PADs with different time ranges

* Adding slice_x and slice_norm keywords for MMS

* Adding more 2D slices tests for MMS

* Adding calls to plot the EIS data after it's loaded to the test suite (to catch any metadata regressions inside tplot)

* Adding calls to plot the FEEPS data after it's loaded to the test suite (to catch any metadata regressions inside tplot)

* bumping version again

* Replaced first batch of tplot math/utility routines with wrappers that forward to pytplot versions.

* Slight rewrite of test case

* Bump required version of pytplot, to pick up relocated utilities

* Temporarily (we hope!) commenting out HAPI tests, due to server problems at SPDF.

* Restoring hapi tests, SPDF server is back online

* Add WAVES L3 routines, fix impact STB

* Downgraded the "Coordinate system not found" message from an error to a debug message.

* Explicitly set coordinate system metadata in the SLP load procedure (at least until the data or master CDFs are updated)

* Set the coordinate system in the output tplot variable.

* Fixed a few typos; no longer need to set SLP coordinate systems explicitly; add tests for coordinate system metadata in output variables.

* Add README example for WAVES

* Pass sample times to np.gradient() to calculate a time derivative.

* Add variable_type string parameter (default "Other"), if "pos", use lunar position as an offset value; if "vel", use lunar velocity; anything else, equivalent to rotate_only=True.

* Add variable_type parameter to flag position and velocity transforms; relax velocity comparison tolerance to 1 m/sec for validation.

* Trying to get coverage stats for pytplot using source_pkgs option. Also, can probably leave /home/travis/ out of the config.

* improving documentation

* Ignore QtPlotter directory for coverage stats

* Adding geopack tests to github action

* Add option to change fill_value in scipy.interpolate.interp1d

* Renamed rotate_only to rotation_only to match IDL version.

* Added tests for rotation-only transforms, and tests using FGM spin fit data instead of state data.

* Migrated another group of tplot tools to pytplot package, replaced with wrappers that forward to the pytplot versions.

* Version bump on pytplot requirement to pick up migrated tplot tools

* Version bump to pick up missing imports from pytplot

* Added forwarding wrappers for time_float_one and time_string_one

* add sse2sel.py; fail test in tests_lunar_cotrans.py;

* Removed position and velocity offset calculations, added a tplot variable for sel_y_sse for ease of testing and debugging.

* Removed variable_type and rotation_only parameters (always a rotate-only transform)
Added more sse<->sel tests

* First batch of updated imports, for tools that moved from pyspedas.utilities to pytplot.

* Next batch of import updates, for tools that have been moved to pytplot.tplot_math

* Changed some np.sum calls to nansum (but not all -- some calls resulted in mismatched IDL and Python results).
Uses bottleneck version of nansum if available.

* Added relative tolerances to test comparisons, to catch potential differences in small output values.

* Changed tplot_names() calls to data_exists() to reduce noisy output.

* Changed print calls to logging calls; separate tests for bad input and output coordinate systems.

* Check validity of input and output coordinate systems separately, more informative diagnostic messages.

* Changed print calls to logging calls.

* Removed logging messages for importing bottleneck vs. numpy version of nansum; output can be confusing, since twavpol is imported into pyspedas by default.

* Better organization of imports

* Simplifying matrix squaring a bit more

* Added themis lunar cotrans tests

* Added pytplot forwarding wrappers to coverage exclusion list....there are no remaining references to them in pyspedas proper.

* Added Spinmodel object to import list

* Added tvector_rotate to cotrans imports

* Added tests for cotrans_set_coord not clobbering 'units' in data_att

* Do not clobber other entries in data_att structure

* Cleaned up imports

* Cleaned up imports; ensure that input metadata is carried through intermediate variables

* Cleaned up imports

* Cleaned up imports

* Cleaned up imports; switched back to tplot save file for baseline data; added tests to ensure 'units' metadata not getting clobbered in cotrans operations

* Bump pytplot-mpl-temp required version to 2.1.32

* Bumping required pytplot version to 2.1.33, to pick up correct matplotlib requirement

* Version bump for pytplot to resolve matplotlib version conflict

* Version bump for pypi update

* Try running the tests under Python 3.8....we have at least one backward compatibility issue, need to see if there are others.

* Use backward compatible type annotation for spinmodel dictionary.

* now using time_clip from pytplot

* Fixing off-by-one bug

* Updated to support automatic determination of the size of the Hanning window, using the same method as the IDL routine

* Version bump to get Python 3.8 compatibility fix into pypi

* Rolling out new version to PyPI to get dynamic power spectra bug fix

* Adding docstring

* updated RBSP RBSPICE routines to use bottleneck, if it's available

* Fixing a crash that occurs when the user uses a decimal in the energy range of a PAD, and updating the test suite

* New release, to get the latest RBSP bug fix into PyPI

* Fixing a few more issues

* another version bump for RBSP bug fixes

* fix for issue with hourly OMNI data (#470)

* version bump to get OMNI hourly bug fix into PyPI

* bumping required version of PyTplot, to test new astropy units functionality

* bumping required version of PyTplot, to get regression bug fix

* Now setting units for HPCA angles in flux/PSD data

* Performance improvements for FEEPS (get_data -> get; avoids unnecessarily converting datetime64s to floats)

* Adding test for MMS LMN transformations
Also adding the MMS cotrans tests to the test suite, including installation of spacepy (for the tests only)

* Fixing crash when input variables don't exist

* increasing code coverage for MMS cotrans functionality

* Fixing crash with MMS FEEPS SITL data

* Bumping version to get FEEPS bug fixes into PyPI

* more FEEPS SITL bug fixes

* another version bump to get FEEPS SITL bug fixes into PyPI

* Now assuming datetime objects in the trange are in UTC (should fix #487)
Also adding a return_times keyword to return the times

* bumping version to get dailynames datetime fix into PyPI

* fixing issues with EIS load routine

* moving EIS fix to FEEPS as well

* Update minvar_matrix_make.py

Removed the unnecessary 'v' variable from the minvar_matrix function. This variable was not needed and was causing issues when `store_data`.

* Update requirements.txt

cdflib 1.0.0 introduces breaking changes

* message for pyqt5

pyqt5 is not longer required, so we need to ask the user to install it, if it is not already installed.

* Now using logging instead of print

* Add STEREO beacon data, unit test, add assertion error for an instrument passed to stereo.load

* Fixing crash with RBSP ESRHELT data

* Bumping version for RBSP ESRHELT bug fix

* Added last_version parameter to psp load routines

* Now forcing latest major version for EDP data due to mixture of new/old files at the SDC

* Adding support for Solar Orbiter L3 SWA HIS data

* bumping version to get latest updates into PyPI

* Tests for pytplot timespan and tlimit routines, and other issues pertaining to time representation.  Probably not suited for automated testing until we can script plot output comparisons.

* Version bump to 2.1.40, to pick up tlimit and timespan fixes, netcdf2tplot fix.

* New version of CDAWeb GUI.

New GUI version uses Tkinter, which is included in python.
No additional requirements are needed.
PyQt5 is no longer used or required.

* minor update to mms_qcotrans tests

* Minor changes to the GUI

Improved alignment of buttons.

* updates to the FEEPS test suite

* adding a few more checks to increase MMS code coverage

* adding error for missing trange

* more MMS test suite updates

* Add tests for tlimit 'last' and 'full' functions (as arguments, and as flags)

* Replaced cotrans_get/set_coord with wrappers that call pytplot.get/set_coords

* Replaced calls to cotrans_get/set_coord with pytplot.get/set_coords

* Added new tests for pytplot get_coords, set_coords,get_units,set_units, and the wrapper functions for set_coords and get_coords

* Version bump to pytplot-mpl-temp 2.1.41, to pick up attribute getters/setters

* Disabling the HAPI tests, due to the CDAWeb HAPI server being offline temporarily

* Autoload support data (spin axis) rather than passing support data parameters.  Added probe and

* Autoload support data (spin axis) rather than passing support data parameters.  Added probe and use_spinaxis_corrections parameters to load and use the right support variables.

* Autoload support data (spin model), added probe and eclipse_correction_level parameters to load and use the right spin model.

* Autoload support data (sun and moon positions, SEL coordinate axes), rather than passing as parameters.

* Updated tests, now that ssl2dsl, dsl2gse, gse2sse, and sse2sel now autoload the support data they need.

* Removed support data parameters no longer needed

* Removed support data parameters no longer needed

* Add test of various timebar string formats

* Version bump to 2.1.42 to pick up timebar changes

* Re-enabling HAPI tests, now that SPDF's HAPI service is back online

* Fixing crash due to incompatible files at the SDC (mixture of v6 and v7 files)

* Fixing crash when PA data can't be found

* Adding flag to assume no wild cards in the URL/filename

* minor update, fixing typo in the docstring

* Adding initial code for grabbing and caching the latest burst intervals from the SDC

* Adding test for routine that updates the SDC burst segment intervals

* moving cdflib version requirement over from requirements.txt

* bumping version to get new cdflib requirement into PyPI

* When the downloaded file cannot be opened, try again.

Added downloading the file for a second time, if it is a CDF or netCDF file and cannot be opened correctly.

* improving the error handling in mms_qcotrans (fixes #515)

* Fixing problem with latest FEEPS masking table for MMS1 (extra column appended to the end); fixes #545

* bumping version to get FEEPS bug fix into PyPI

* Fix sqtn_rfs_V1V2 non-public download

* fixing bug time clipping spin averaged FEEPS spectra (should fix #498)

* adding regression test for FEEPS time clipping bug

* Now deleting the temporary file when NamedTemporaryFile is closed

* Version bump to get temp file bug fix into PyPI

* Now loading burst intervals from the SDC by default; should fix #378

* Updating burst mode data bar test

* Disabling checks for Solar Orbiter RPW FLUX_DENSITY# variables (these variables no longer exist in the v05 CDFs

* Slightly different fix for #555, to fix #562 (now deleting the temporary file using os.unlink instead of relying on NamedTemporaryFile)

* Slightly different fix for #555, to fix #562 (now deleting the temporary file using os.unlink instead of relying on NamedTemporaryFile)

* Now preserving metadata after interpolation; should fix #475

* version bump

* fixing regression due to units now being returned by np.arccos

* version bump to get FEEPS gyrophase bug fix into PyPI

* Temporarily increase logging verbosity to detect any new deprecation warnings

* Temporarily removing basemap installation and secs test, to allow testing with numpy 1.25

* Backing out inadvertent commit

* Temporarily requiring numpy 1.25.0 to find new deprecations in test suites

* Use Python 3.9 to allow use of numpy 1.25

* Temporarily commenting out spacepy installation and mms cotrans tests to run under python 3.9/numpy 1.25

* Fixing deprecated singleton array -> scalar implicit conversion reported by numpy 1.25

* Fixing deprecated singleton array -> scalar implicit conversion reported by numpy 1.25, cleaning up indexing a bit by flattening index arrays

* Fixing deprecated singleton array -> scalar implicit conversion reported by numpy 1.25.

* Revert to numpy >= 1.19.5, bump pytplot version to 2.1.46 to pick up UNIT_PTR fix

* Revert to Python 3.8 environment w/ spacepy and basemap installations, less verbose logging

* Bumping to pytplot 2.1.47 to pick up bug fix when units metadata specified as an array

* rfs_hfr has /%Y/%m/ path format on SSL server

* test

* All Berkeley files stored in monthly directories

* added barrel data loader

* Changed default date to one where data is available

* Restoring akebono tests; adding barrel tests

* Adding BARREL_DATA_DIR to environment

* Taking akebono test suite back out; connection attempts from Github timing out for some reason.

* Bump required version of Python to 3.8 (due to numpy dependency).

---------

Co-authored-by: Jim Lewis <[email protected]>
Co-authored-by: jwu <[email protected]>
Co-authored-by: supervised <[email protected]>
Co-authored-by: Samuel Badman <[email protected]>
Co-authored-by: Jim Lewis <[email protected]>
Co-authored-by: Tien Vo <[email protected]>
Co-authored-by: Beforerr <[email protected]>
Co-authored-by: Nick H <[email protected]>
Co-authored-by: Marc Pulupa <[email protected]>
Co-authored-by: Warren Rexroad <[email protected]>
  • Loading branch information
11 people authored Aug 25, 2023
1 parent 0dd92cf commit 004e59d
Show file tree
Hide file tree
Showing 405 changed files with 17,308 additions and 3,176 deletions.
19 changes: 17 additions & 2 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
[run]
source_pkgs =
pyspedas
pytplot
omit =
/home/travis/virtualenv/*
*/site-packages/*
*/bin/*
*/docs/*
*/QtPlotter/*
*/pyspedas/utilities/data_exists.py
*/pyspedas/utilities/time_double.py
*/pyspedas/utilities/time_string.py
*/pyspedas/utilities/tkm2re.py
*/pyspedas/utilities/tnames.py
*/pyspedas/analysis/clean_spikes.py
*/pyspedas/analysis/subtract_average.py
*/pyspedas/analysis/subtract_median.py
*/pyspedas/analysis/tcross.py
*/pyspedas/analysis/tdotp.py
*/pyspedas/analysis/time_clip.py
*/pyspedas/analysis/tnormalize.py
*/pyspedas/analysis/tsmooth.py
87 changes: 79 additions & 8 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,65 +10,128 @@ jobs:
matrix:
#python-version: [3.5, 3.6, 3.7, 3.8]
#os: [ubuntu-latest, macos-latest, windows-latest]
os: [macos-latest]
os: [ubuntu-latest]
#os: [ubuntu-latest]
#os: [windows-latest]
python-version: [3.9]
python-version: [3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/eric-superfast' || github.ref == 'refs/heads/themis'
- name: Install dependencies (Linux)
env:
MMS_AUTH_U: ${{ secrets.MMS_AUTH_U }}
MMS_AUTH_P: ${{ secrets.MMS_AUTH_P }}
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install spacepy # required for MMS qcotrans tests
pip install coveralls
pip install basemap
python -m pyspedas.mms.tests.setup_tests
if: matrix.os == 'ubuntu-latest' && github.ref == 'refs/heads/master'
if: matrix.os == 'ubuntu-latest' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/eric-superfast' || github.ref == 'refs/heads/themis')
- name: Install dependencies (Windows)
env:
MMS_AUTH_U: ${{ secrets.MMS_AUTH_U }}
MMS_AUTH_P: ${{ secrets.MMS_AUTH_P }}
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install spacepy # required for MMS qcotrans tests
pip install coveralls
pip install basemap
python -m pyspedas.mms.tests.setup_tests
if: matrix.os == 'windows-latest' && github.ref == 'refs/heads/master'
- name: Install dependencies (macOS)
env:
MMS_AUTH_U: ${{ secrets.MMS_AUTH_U }}
MMS_AUTH_P: ${{ secrets.MMS_AUTH_P }}
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install spacepy # required for MMS qcotrans tests
pip install coveralls
pip install basemap
python -m pyspedas.mms.tests.setup_tests
if: matrix.os == 'macos-latest' && github.ref == 'refs/heads/master'
- name: Lint with flake8
if: github.ref == 'refs/heads/master'
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude 'erg'
# exit-zero treats all errors as warnings.
flake8 . --count --exit-zero --max-complexity=10 --statistics # --max-line-length=127
flake8 . --count --exit-zero --max-complexity=10 --statistics # --max-line-length=127 --exclude 'erg'
- name: Test with unittest
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/eric-superfast' || github.ref == 'refs/heads/themis'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
SPEDAS_DATA_DIR: data
ACE_DATA_DIR: ace_data/
BARREL_DATA_DIR: barrel_data/
CLUSTER_DATA_DIR: cluster_data/
DSC_DATA_DIR: dsc_data/
CSSWE_DATA_DIR: csswe_data/
EQUATORS_DATA_DIR: eqs_data/
FAST_DATA_DIR: fast_data/
GEOTAIL_DATA_DIR: geotail_data/
GOES_DATA_DIR: goes_data/
IMAGE_DATA_DIR: img_data/
MICA_DATA_DIR: mica_data/
MMS_DATA_DIR: mms_data/
OMNI_DATA_DIR: omni_data/
POES_DATA_DIR: poes_data/
POLAR_DATA_DIR: polar_data/
PSP_DATA_DIR: psp_data/
RBSP_DATA_DIR: rbsp_data/
SOLO_DATA_DIR: solo_data/
STEREO_DATA_DIR: stereo_data/
THM_DATA_DIR: themis_data/
TWINS_DATA_DIR: twins_data/
ULY_DATA_DIR: uly_data/
WIND_DATA_DIR: wind_data/
LANL_DATA_DIR: lanl_data/
CNOFS_DATA_DIR: cnofs_data/
ST5_DATA_DIR: st5_data/
PYTPLOT_LOGGING_LEVEL: error
run: |
# coverage run -a -m pyspedas.akebono.tests.tests
coverage run -a -m pyspedas.barrel.tests.tests
coverage run -a -m pyspedas.soho.tests.tests
coverage run -a -m pyspedas.de2.tests.tests
coverage run -a -m pyspedas.st5.tests.tests
coverage run -a -m pyspedas.lanl.tests.tests
coverage run -a -m pyspedas.cotrans.tests.quaternions
coverage run -a -m pyspedas.cnofs.tests.tests
coverage run -a -m pyspedas.secs.tests.tests
coverage run -a -m pyspedas.sosmag.tests.tests
coverage run -a -m pyspedas.hapi.tests.tests
coverage run -a -m pyspedas.mms.tests.cotrans
coverage run -a -m pyspedas.mms.tests.events
coverage run -a -m pyspedas.mms.tests.orbit_plots
coverage run -a -m pyspedas.mms.tests.neutral_sheet
coverage run -a -m pyspedas.mms.tests.ql_l1b_sitl_tests
coverage run -a -m pyspedas.mms.tests.mms_part_getspec
coverage run -a -m pyspedas.mms.tests.load_routine_tests
coverage run -a -m pyspedas.mms.tests.feeps
# coverage run -a -m pyspedas.mms.tests.eis
coverage run -a -m pyspedas.mms.tests.eis
coverage run -a -m pyspedas.mms.tests.fpi_tests
coverage run -a -m pyspedas.mms.tests.file_filter
coverage run -a -m pyspedas.mms.tests.data_rate_segments
coverage run -a -m pyspedas.mms.tests.curlometer
coverage run -a -m pyspedas.mms.tests.wavpol
coverage run -a -m pyspedas.mms.tests.slice2d
coverage run -a -m pyspedas.dscovr.tests.tests
coverage run -a -m pyspedas.utilities.tests.download_tests
coverage run -a -m pyspedas.utilities.tests.misc_tests
coverage run -a -m pyspedas.utilities.tests.time_tests
coverage run -a -m pyspedas.cotrans.tests.cotrans
coverage run -a -m pyspedas.cotrans.tests.quaternions
coverage run -a -m pyspedas.cotrans.tests.test_minvar
coverage run -a -m pyspedas.cluster.tests.tests
coverage run -a -m pyspedas.csswe.tests.tests
coverage run -a -m pyspedas.ace.tests.tests
Expand All @@ -81,8 +144,10 @@ jobs:
coverage run -a -m pyspedas.wind.tests.tests
coverage run -a -m pyspedas.poes.tests.tests
coverage run -a -m pyspedas.polar.tests.tests
coverage run -a -m pyspedas.geopack.tests.tests
coverage run -a -m pyspedas.geotail.tests.tests
coverage run -a -m pyspedas.analysis.tests.tests
coverage run -a -m pyspedas.analysis.tests.test_twavpol
coverage run -a -m pyspedas.fast.tests.tests
coverage run -a -m pyspedas.omni.tests.tests
coverage run -a -m pyspedas.themis.tests.tests
Expand All @@ -95,4 +160,10 @@ jobs:
coverage run -a -m pyspedas.kyoto.tests.tests
coverage run -a -m pyspedas.swarm.tests.tests
coverage run -a -m pyspedas.themis.tests.tests_themis_check_args
coverage run -a -m pyspedas.themis.tests.tests_cal_fit
coverage run -a -m pyspedas.themis.tests.tests_dsl_cotrans
coverage run -a -m pyspedas.themis.tests.tests_lunar_cotrans
coverage run -a -m pyspedas.themis.tests.tests_spinmodel
coverage run -a -m pyspedas.themis.tests.tests_state
coverage run -a -m pyspedas.themis.tests.test_cal_fit_tplot_metadata
coveralls
73 changes: 62 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,38 @@
[![build](https://github.com/spedas/pyspedas/workflows/build/badge.svg)](https://github.com/spedas/pyspedas/actions)
[![Coverage Status](https://coveralls.io/repos/github/spedas/pyspedas/badge.svg)](https://coveralls.io/github/spedas/pyspedas)
[![Version](https://img.shields.io/pypi/v/pyspedas.svg)](https://pypi.org/project/pyspedas/)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/spedas/pyspedas.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/spedas/pyspedas/context:python)
![Status](https://img.shields.io/pypi/status/pyspedas.svg)
![License](https://img.shields.io/pypi/l/pyspedas.svg)

PySPEDAS is an implementation of the SPEDAS framework for Python.

The Space Physics Environment Data Analysis Software ([SPEDAS](http://spedas.org/wiki)) framework is written in IDL and contains data loading, data analysis and data plotting tools for various scientific missions (NASA, NOAA, etc.) and ground magnetometers.

Please see our documentation at:

https://pyspedas.readthedocs.io/

The Python-based Space Physics Environment Data Analysis Software (PySPEDAS) framework supports multi-mission, multi-instrument retrieval, analysis, and visualization of heliophysics time series data.

## Projects Supported
- [Advanced Composition Explorer (ACE)](https://pyspedas.readthedocs.io/en/latest/ace.html)
- [Akebono](https://pyspedas.readthedocs.io/en/latest/akebono.html)
- [Arase (ERG)](https://pyspedas.readthedocs.io/en/latest/erg.html)
- [Cluster](https://pyspedas.readthedocs.io/en/latest/cluster.html)
- [Colorado Student Space Weather Experiment (CSSWE)](https://pyspedas.readthedocs.io/en/latest/csswe.html)
- [Communications/Navigation Outage Forecasting System (C/NOFS)](https://pyspedas.readthedocs.io/en/latest/cnofs.html)
- [Deep Space Climate Observatory (DSCOVR)](https://pyspedas.readthedocs.io/en/latest/dscovr.html)
- [Dynamics Explorer 2 (DE2)](https://pyspedas.readthedocs.io/en/latest/de2.html)
- [Equator-S](https://pyspedas.readthedocs.io/en/latest/equator-s.html)
- [Fast Auroral Snapshot Explorer (FAST)](https://pyspedas.readthedocs.io/en/latest/fast.html)
- [Geotail](https://pyspedas.readthedocs.io/en/latest/geotail.html)
- [Geostationary Operational Environmental Satellite (GOES)](https://pyspedas.readthedocs.io/en/latest/goes.html)
- [Imager for Magnetopause-to-Aurora Global Exploration (IMAGE)](https://pyspedas.readthedocs.io/en/latest/image.html)
- [Kyoto Dst Index](https://pyspedas.readthedocs.io/en/latest/kyoto.html)
- [LANL](https://pyspedas.readthedocs.io/en/latest/lanl.html)
- [Mars Atmosphere and Volatile Evolution (MAVEN)](https://pyspedas.readthedocs.io/en/latest/maven.html)
- [Magnetic Induction Coil Array (MICA)](https://pyspedas.readthedocs.io/en/latest/mica.html)
- [Magnetospheric Multiscale (MMS)](https://pyspedas.readthedocs.io/en/latest/mms.html)
- [OMNI](https://pyspedas.readthedocs.io/en/latest/omni.html)
- [Polar Orbiting Environmental Satellites (POES)](https://pyspedas.readthedocs.io/en/latest/poes.html)
- [Polar](https://pyspedas.readthedocs.io/en/latest/polar.html)
- [Parker Solar Probe (PSP)](https://pyspedas.readthedocs.io/en/latest/psp.html)
- [Solar & Heliospheric Observatory (SOHO)](https://pyspedas.readthedocs.io/en/latest/soho.html)
- [Solar Orbiter (SOLO)](https://pyspedas.readthedocs.io/en/latest/solo.html)
- [Solar Terrestrial Relations Observatory (STEREO)](https://pyspedas.readthedocs.io/en/latest/stereo.html)
- [Space Technology 5 (ST5)](https://pyspedas.readthedocs.io/en/latest/st5.html)
- [Spherical Elementary Currents (SECS)](https://github.com/spedas/pyspedas/blob/master/pyspedas/secs/README.md)
- [Swarm](https://github.com/spedas/pyspedas/blob/master/pyspedas/swarm/README.md)
- [Time History of Events and Macroscale Interactions during Substorms (THEMIS)](https://pyspedas.readthedocs.io/en/latest/themis.html)
Expand All @@ -47,13 +45,13 @@ https://pyspedas.readthedocs.io/

## Requirements

Python 3.7+ is required.
Python 3.8+ is required.

We recommend [Anaconda](https://www.continuum.io/downloads/) which comes with a suite of packages useful for scientific data analysis. Step-by-step instructions for installing Anaconda can be found at: [Windows](https://docs.anaconda.com/anaconda/install/windows/), [macOS](https://docs.anaconda.com/anaconda/install/mac-os/), [Linux](https://docs.anaconda.com/anaconda/install/linux/)

## Installation

### Setup your Virtual Environment
### Virtual Environment
To avoid potential dependency issues with other Python packages, we suggest creating a virtual environment for PySPEDAS; you can create a virtual environment in your terminal with:

```bash
Expand Down Expand Up @@ -158,6 +156,54 @@ stereo_files = pyspedas.stereo.mag(trange=['2013-11-1', '2013-11-6'], downloadon
- `no_update`: if set, only load the data from the local cache
- `notplot`: if set, load the variables into dictionaries containing numpy arrays (instead of creating the tplot variables)

## Examples
Please see the following notebooks for examples of using PySPEDAS
### PyTplot Basics
- [Introduction to PyTplot](https://github.com/spedas/pyspedas_examples/blob/master/pyspedas_examples/notebooks/Introduction_to_PyTplot.ipynb)

### Loading Data
- [MMS examples](https://github.com/spedas/mms-examples/tree/master/basic)
- [THEMIS examples](https://github.com/spedas/themis-examples/tree/main/basic)
- [Load data from HAPI servers](https://github.com/spedas/pyspedas_examples/blob/master/pyspedas_examples/notebooks/PySPEDAS_loading_data_from_HAPI_servers.ipynb)
- [Exploring the Heliosphere with Python](https://github.com/spedas/pyspedas_examples/blob/master/pyspedas_examples/notebooks/Exploring_the_Heliosphere_with_Python.ipynb)

### Plotting
- [Annotations](https://github.com/spedas/pyspedas_examples/blob/master/pyspedas_examples/notebooks/PyTplot_annotations.ipynb)
- [Range options](https://github.com/spedas/pyspedas_examples/blob/master/pyspedas_examples/notebooks/PyTplot_range_options.ipynb)
- [Spectrogram options](https://github.com/spedas/pyspedas_examples/blob/master/pyspedas_examples/notebooks/PyTplot_spectrogram_options.ipynb)
- [Legend options](https://github.com/spedas/pyspedas_examples/blob/master/pyspedas_examples/notebooks/PyTplot_legend_options.ipynb)
- [Markers and symbols](https://github.com/spedas/pyspedas_examples/blob/master/pyspedas_examples/notebooks/PyTplot_markers_and_symbols.ipynb)
- [Error bars](https://github.com/spedas/pyspedas_examples/blob/master/pyspedas_examples/notebooks/PyTplot_error_bars.ipynb)
- [Pseudo variables](https://github.com/spedas/pyspedas_examples/blob/master/pyspedas_examples/notebooks/PyTplot_pseudo_variables.ipynb)
- [Highlight intervals and vertical bars](https://github.com/spedas/pyspedas_examples/blob/master/pyspedas_examples/notebooks/PyTplot_highlight_intervals_and_vertical_bars.ipynb)

Additional examples of loading and plotting data can be found in the documentation for the project you're interested in ([PySPEDAS projects](https://pyspedas.readthedocs.io/en/latest/projects.html)), as well as the project's README file.

### Dates and Times
- [Working with dates and times](https://github.com/spedas/pyspedas_examples/blob/master/pyspedas_examples/notebooks/Working_with_dates_and_times_with_PySPEDAS_PyTplot.ipynb)

### Coordinate Transformations
- [Coordinate transformations](https://github.com/spedas/pyspedas_examples/blob/master/pyspedas_examples/notebooks/Coordinate_transformations_with_OMNI_data.ipynb)
- [Boundary normal (LMN) coordinates](https://github.com/spedas/mms-examples/blob/master/advanced/MMS_LMN_coordinate_transformation.ipynb)
- [Quaternion transformations with SpacePy](https://github.com/spedas/mms-examples/blob/master/basic/MMS_quaternion_coordinate_transformations.ipynb)

### Analysis
- [Plasma calculations with PlasmaPy](https://github.com/spedas/mms-examples/blob/master/advanced/Plasma%20calculations%20with%20PlasmaPy.ipynb)
- [Poynting flux with MMS data](https://github.com/spedas/mms-examples/blob/master/advanced/Poynting_flux_with_MMS_data.ipynb)
- [Plasma beta with MMS data](https://github.com/spedas/mms-examples/blob/master/basic/Plasma%20Beta%20with%20FGM%20and%20FPI%20data.ipynb) (note: the PlasmaPy notebook above shows a much easier method)
- [Curlometer calculations](https://github.com/spedas/mms-examples/blob/master/basic/Curlometer%20Technique.ipynb)
- [Neutral sheet models](https://github.com/spedas/mms-examples/blob/master/advanced/MMS_neutral_sheet_models.ipynb)
- [Wave polarization calculations](https://github.com/spedas/mms-examples/blob/master/advanced/Wave_polarization_using_SCM_data.ipynb)
- [Dynamic power spectra calculations](https://github.com/spedas/mms-examples/blob/master/basic/Search-coil%20Magnetometer%20(SCM).ipynb)
- [2D slices of MMS distribution functions](https://github.com/spedas/mms-examples/blob/master/advanced/Generate_2D_slices_of_FPI_and_HPCA_data.ipynb)
- [Generating spectrograms and moments from MMS distribution functions](https://github.com/spedas/mms-examples/blob/master/advanced/Generate%20spectrograms%20and%20moments%20with%20mms_part_getspec.ipynb)


## Documentation
For more information, please see our HTML documentation at:

https://pyspedas.readthedocs.io/

## Getting Help
To find the options supported, call `help` on the instrument function you're interested in:
```python
Expand All @@ -169,6 +215,11 @@ You can ask questions by creating an issue or by joining the [SPEDAS mailing lis
## Contributing
We welcome contributions to PySPEDAS; to learn how you can contribute, please see our [Contributing Guide](https://github.com/spedas/pyspedas/blob/master/CONTRIBUTING.md)

## Plug-in Development
An introduction to PySPEDAS plug-in development can be found here:

[Introduction to PySPEDAS plug-in development](https://github.com/spedas/pyspedas/tree/master/docs/pyspedas_plugin_development.pdf)

## Code of Conduct
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. To learn more, please see our [Code of Conduct](https://github.com/spedas/pyspedas/blob/master/CODE_OF_CONDUCT.md).

Expand Down
Binary file added docs/pyspedas_plugin_development.pdf
Binary file not shown.
4 changes: 3 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ netCDF4
pywavelets
astropy
https://github.com/MAVENSDC/PyTplot/archive/matplotlib-backend.zip
geopack>=1.0.9
geopack>=1.0.9
viresclient
hapiclient
Binary file added docs/source/_static/cnofs_cindi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/cnofs_plp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/cnofs_vefi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/rbsp_rbspice.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 004e59d

Please sign in to comment.