Skip to content

Beforerr/discontinuitypy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0491078 · Feb 13, 2025
Sep 23, 2024
Nov 9, 2024
Dec 5, 2023
Jan 6, 2025
Jan 6, 2025
Nov 8, 2024
Oct 28, 2024
Oct 28, 2024
Jul 3, 2024
Feb 13, 2025
Feb 13, 2025
Nov 7, 2024
Nov 7, 2024
Nov 13, 2024
Nov 7, 2024

Repository files navigation

DiscontinuityPy

PyPI Pixi Badge pdm-managed DOI

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:

  • B : Magnetic field in ANY coordinate system
  • B : Magnetic field magnitude
  • V : Ion velocity in ANY coordinate system, in units of k m / s
  • n : Plasma density, in units of 1 / c m 3

For the unit, by default we use

  • length : k m
  • time : s
  • magnetic field : n T
  • current : n A / 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 : B ¯ N / B ¯ : Normal component of magnetic field over magnetic field magnitude (mean)

  • e l , e m , 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}

  • n : normal of the discontinuity plane

  • n MVA : normal from minimum variance analysis (unit vector in the minium variance direction) n_mva = e_min

  • n 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 , M V A : Velocity component along the normal direction from minimum variance analysis V_n_mva

  • V n , c r o s s : 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 n A / 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.

About

Identify and analyze discontinuities in time series data.

Resources

Citation

Stars

Watchers

Forks

Packages

No packages published

Languages