Skip to main content

DiscontinuityPy

PyPI Pixi Badge pdm-managed

User Guide

This package is designed to identify and analyze discontinuities in time series data.

  1. Finding the discontinuities, see this notebook
    • Corresponding to limited feature extraction / anomaly detection
  2. Calculating the properties of the discontinuities, see this notebook
    • One can use higher time resolution data

For how to use this project as a python library, please see this page.

See accompanying package Discontinuity.jl for Julia about data processing and visualization.

Installation

pip install discontinuitypy

Getting started

Import the package

from discontinuitypy.utils.basic import *
from discontinuitypy.core import *

Related projects and publications

Properties of Discontinuities

Notations:

  • $\vec{B}$ : Magnetic field in ANY coordinate system
  • $B$ : Magnetic field magnitude
  • $V$ : Ion velocity in ANY coordinate system, in units of $km/s$
  • $n$ : Plasma density, in units of $1/cm^3$

For the unit, by default we use

  • length : $km$
  • time : $s$
  • magnetic field : $nT$
  • current : $nA/m^2$

Outputs

For more derivable outputs, please see Discontinuity.jl

  • t_{us,ds} : moments of time corresponding to upstream and downstream boundaries of the current sheet

  • b_mag : mean of magnetic field magnitude across the discontinuity

  • $|Δ B|/B$ : Change in magnetic field magnitude over magnetic field magnitude (mean) db_over_b

    • see Fig.14 in Tsurutani and Smith (1979)
  • bn_over_b : $\bar{B}_N/\bar{B}$ : Normal component of magnetic field over magnetic field magnitude (mean)

  • $\vec{e}_l, \vec{e}_m, \vec{e}_n$ : unit vector in the direction of the maxium, medium, minium variance magnetic field in ANY coordinate system e_{max/med/min}{x,y,z}

  • $\vec{n}$ : normal of the discontinuity plane

  • $\vec{n}_{\text{MVA}}$ : normal from minimum variance analysis (unit vector in the minium variance direction) n_mva = e_min

  • $\vec{n}_{\text{cross}}$ : cross product of the magnetic field vector $B_u$ upstream and the field vector $B_d$ downstream of the transition n_cross

  • $V$ : Velocity vector in ANY coordinate system V

  • $V_l$ : Velocity component along the maximum variance direction V_l

  • $V_{n,MVA}$ : Velocity component along the normal direction from minimum variance analysis V_n_mva

  • $V_{n,cross}$ : Velocity component along the normal direction from cross product of upstream and downstream magnetic field V_n_cross

  • j0{_norm}: current density, in units of $nA/m^2$

Tsurutani, Bruce T., and Edward J. Smith. 1979. “Interplanetary Discontinuities: Temporal Variations and the Radial Gradient from 1 to 8.5 AU.” Journal of Geophysical Research: Space Physics 84 (A6): 2773–87. https://doi.org/10.1029/JA084iA06p02773.

Metadata

Release files for discontinuitypy 0.4.0

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

Source distribution (sdist)

Source distribution for discontinuitypy 0.4.0
File Size Uploaded Provenance
discontinuitypy-0.4.0.tar.gz 27.2 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 61.7 kB

Release files / discontinuitypy-0.4.0.tar.gz

Download URL discontinuitypy-0.4.0.tar.gz
Size 27.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a78a1e96998808b5f5f039917ab6e47a0b60e0f7687ad62c3f04975f59d9e87e
BLAKE2b-256 checksum
How to use checksums
fb7d0153a5b13835d8e402b12b3179e265a43b56c577db1f8c12c7770117ca75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.20.1 CPython/3.13.0 Darwin/24.1.0

Release files / discontinuitypy-0.4.0-py3-none-any.whl

Download URL discontinuitypy-0.4.0-py3-none-any.whl
Size 34.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
439b022c035ec8f7676989a00d985b13dd5c6c257476b485ed5440198b42f237
BLAKE2b-256 checksum
How to use checksums
4297f187327df02d51072c09f4d08655845b5fd482f773f50c9f509860cf1295
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.20.1 CPython/3.13.0 Darwin/24.1.0

Security for discontinuitypy 0.4.0

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