Skip to main content

Spherical Elementary Current System (SECS) Calculations.

Project description

pysecs

DOI PyPi Downloads

pysecs is an open-source library for calculating Spherical Elementary Current Systems (SECS).

Features

  • Based upon the scikit-learn framework with fit() and predict() methods.
  • The only dependency is NumPy. It is built using fast broadcasting techniques to provide highly scalable calculations.
  • Divergence-free and curl-free systems, including the curl-free magnetic field for observations above the current shell (satellite altitudes).
  • Uncertainty propagation: amplitude variances and prediction variance maps (predict(..., return_var=True)).
  • Robust fitting (fit(..., robust='huber'|'bisquare')) that automatically downweights localized single-station disturbances.
  • Temporal estimation with KalmanSECS: a Kalman filter / smoother over the SEC amplitudes with innovation gating for impulsive outliers.
  • Automatic SECS grid generation from an observation network (SECS.from_observations(obs_loc, r_shell)), with sensible defaults for spacing and padding and a guard against poles landing on a station.

Examples

Examples can be found in examples/

Install

The easiest method to install pysecs is with pip.

> pip install pysecs

For a source install you can follow these instructions:

  1. Clone the git repository

    > git clone https://github.com/greglucas/pysecs
    
  2. Build and install the package

    > pip install .
    
  3. Testing The package has a test suite that can be run with pytest

    > pytest
    

License

The code is released under an MIT license License described in LICENSE.md

References

This package has been developed from different publications. Please consider citing the papers that are relevant to the work you are doing if you are utilizing this code.

Software

Lucas, G., Rigler, E. J., Murphy, B. (2024). greglucas/pysecs: REL: v0.3.0 (v0.3.0).
Zenodo. https://doi.org/10.5281/zenodo.14511596

Original Paper

Amm, O. "Ionospheric Elementary Current Systems in Spherical Coordinates and Their Application."
Journal of geomagnestism and geoelectricity 49.7 (1997): 947-955. doi:10.5636/jgg.49.947

Applications Paper

Amm, O., and A. Viljanen. "Ionospheric disturbance magnetic field continuation
from the ground to the ionosphere using spherical elementary current systems."
Earth, Planets and Space 51.6 (1999): 431-440. doi:10.1186/BF03352247

Review Chapter (curl-free magnetic field)

The magnetic field of the curl-free system (Equation 2.15) implemented in this package is given in this review chapter.

Vanhamäki, H., and L. Juusola. "Introduction to Spherical Elementary Current Systems."
Ionospheric Multi-Spacecraft Analysis Tools, ISSI Scientific Report Series 17 (2020): 5-33.
doi:10.1007/978-3-030-26732-2_2

Problems or Questions

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysecs-0.4.0.tar.gz (58.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pysecs-0.4.0-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

Details for the file pysecs-0.4.0.tar.gz.

File metadata

  • Download URL: pysecs-0.4.0.tar.gz
  • Upload date:
  • Size: 58.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pysecs-0.4.0.tar.gz
Algorithm Hash digest
SHA256 cacce2d4addc2c2fa0dd560db52cd23d23481aa2457126265e73db6966b6aa8f
MD5 d94e4b0614a70d9ccacb4283e150bf98
BLAKE2b-256 2ec1f47571a79f04a12f8e7752b72798271c13cbb2d5a74f766ae53458900491

See more details on using hashes here.

Provenance

The following attestation bundles were made for pysecs-0.4.0.tar.gz:

Publisher: release.yml on greglucas/pysecs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pysecs-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: pysecs-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 23.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pysecs-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 240e99e04f4788aea3e2c6c0889cbbc28d98f3e9fa369c94bec9cc167cf4b536
MD5 67bb4aee09aa73b170c45773ebf32ddf
BLAKE2b-256 f08b39e6baae4bf38580d82c088ba7cdc7d9610f879a8d5ba21f390b884d87cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pysecs-0.4.0-py3-none-any.whl:

Publisher: release.yml on greglucas/pysecs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page