Skip to main content

Basic documentation for pySatData

Most functions' structure and some loaders are from the pySPEDAS (https://github.com/spedas/pyspedas) repository. I just used and organized it in a way that I felt was more accessible for my purposes :). There is an option to store the variables in a pandas DataFrame format or pytplot format.

Requirements

Python 3.8+

Installation:

conda create -n yourenvname python=x.x anaconda
conda activate yourenvname

pip install pysatdata

config_file.json

It can be done in this file if some change in downloading directories is needed.

pysatdata/resources/config_file.json

This file sets the HTTP directory for downloading data and the local directory to save the downloaded data.

The local directory files are organized as http directory, i.e.:

  • RBSP: HOME/sat_data/rbsp/rbspa/l2/ect/rept/sectors/rel03/YYYY/filename.cdf

This files handles with the different http subpaths for the different levels and intruments in each probe.


Examples: Loading data.

RBSP REPT data

#Import the loading functions.
from pysatdata.loaders.load import *

# Define the time range for downloading data.
trange=['2021-05-26', '2021-05-30']

# Loading Van Allen probes REPT data.
varss_rept = load_sat(trange=trange, satellite="rbsp",
                        probe=['a', 'b'], level="3", 
                        rel="rel03", instrument="rept",
                        datatype="sectors",
                        downloadonly=False, 
                        searchFilesFirst=True,
                        usePandas=False,
                        usePyTplot=True)

RBSP EMFISIS data.

varss_emfisis = load_sat(trange=trange, satellite="rbsp",
                            probe=['a','b'], rel="rel03", level="3",
                            instrument="emfisis", datatype="magnetometer",
                            cadence="1sec", coord="gse",
                            varnames=[], downloadonly=False,
                            usePandas=True, usePyTplot=False)

RBSP MAGEIS data.

varss_mageis = load_sat(trange=trange, satellite="rbsp",
                        probe=['a','b'], level="3", 
                        rel="rel03", instrument="mageis",
                        datatype="sectors",
                        downloadonly=False, 
                        usePandas=False, usePyTplot=True)

RBSP EFW data.

varss_efw = load_sat(trange=trange, satellite="rbps",
                        probe=['a','b'], level="2", rel='rel03',
                        instrument="efw", datatype="esvy_despun",
                        varnames=['efield_mgse', 'lshell'], downloadonly=False,
                        usePandas=False, usePyTplot=True)

OMNI Solar wind data

varss_omni = load_sat(trange=trange, satellite="omni",
                         probe="omni"
                         instrument="omni_cdaweb",datatype="hro_1min",
                         downloadonly=False,
                         usePandas=False, usePyTplot=True)

See plot_interpFlux_RBSP.py for an example of plotting the interpolated electron flux.

Metadata

Release files for pysatdata 1.0.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pysatdata 1.0.12
File Size Uploaded Provenance Actions
pysatdata-1.0.12.tar.gz 56.5 kB Without provenance Details for pysatdata-1.0.12.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pysatdata 1.0.12
File Interpreter ABI Platform Actions
pysatdata-1.0.12-py3-none-any.whl Python 3 none any Details for pysatdata-1.0.12-py3-none-any.whl

Total release size: 125.6 kB

Release files / pysatdata-1.0.12.tar.gz

Download URL pysatdata-1.0.12.tar.gz
Size 56.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c6387bcbdf1255c0576575749de5760a8d353440600e1a54daa2f92884c527cb
BLAKE2b-256 checksum
How to use checksums
64ab1433796abab89c44d47d48b43e7e5f19a93f81a8abe5f31e45bb8f98120b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / pysatdata-1.0.12-py3-none-any.whl

Download URL pysatdata-1.0.12-py3-none-any.whl
Size 69.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ec46816ab73be8d89ff5df568098d2a10d762fe3d936992a015482eb6a955e25
BLAKE2b-256 checksum
How to use checksums
827567a5dfe31c23e59fbd34cca556339e2f7ff6398898c2b3f36afbf6bab24a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Security for pysatdata 1.0.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page