https://github.com/chrisrac/pyenfra

A Python package for fractal and complexity analysis of time series.

https://github.com/chrisrac/pyenfra

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.7%) to scientific vocabulary

Keywords

atmosphere chaos environment environmental-data fractals hydrology modeling time-series
Last synced: 5 months ago · JSON representation

Repository

A Python package for fractal and complexity analysis of time series.

Basic Info
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
atmosphere chaos environment environmental-data fractals hydrology modeling time-series
Created 10 months ago · Last pushed 8 months ago
Metadata Files
Readme Changelog License

README.md

pyenfra

Python Package for Environmental Fractal Analysis and Chaos Estimation

Static Badge Static Badge Static Badge Static Badge Static Badge

Official repository: github: pyenfra

Description

pyenfra is a Python library for fractal analysis, modeling and chaos estimation in time-series with the emphasis on environmental datasets. Package contains a suite of fractal and chaos metrics: - Hurst exponent for rescaled range, - Detrended Fluctuation Analysis (DFA), - Multifractality by Generalized Hurst Slope, - Wavelet Transform Modulus Maxima (with varying bands and modulus methods), - Sample Entropy, - Recurrence Quantification Analysis (RQA), - Lyapunov exponents.

Installation

pyenfra can be installed using pip or locally by downloading package copy.

pip install: python pip install pyenfra local:

use repositiory to obtain package copy.

Usage

Below are a couple examples of package usage.

Please refer to examples.py for extended, detailed examples and computation workflows.

```python import numpy as np import matplotlib.pyplot as plt

import pyenfra

Generate White noise sample data

ts_white = np.random.RandomState(0).randn(2000)

Example: Compute Hurst exponent

hvalue = pyenfra.functions.hurst(tswhite, num=30, minn=10, minsegments=10)

Example: Interpret Hurst

print(pyenfra.interpreters.interprethurst(tswhite, useconfidenceinterval=False))

Example: Plot Hurst climacogram for AR(1)

axhurst = pyenfra.plotting.plothurst(tswhite, num=30, minn=10, minsegments=10, figsize=(5,4), scatterkwargs={'color':'C0'}, linekwargs={'color':'C1'}) axhurst.figure.suptitle("Climacogram: AR(1) Persistent Process") plt.show()

Example: Compute Lyapunov Exponent

lyapval, divergence, times = pyenfra.functions.lyapunov(tswhite, dim=3, tau=1, fs=1.0, maxiter=200, theiler=1) print(f"Estimated Lyapunov exponent (logistic r=3.99): {lyapval:.4f}") print("Interpretation:", pyenfra.interpreters.interpretlyapunov(lyapval)) ```

Roadmap

Future works on the package include: - [ ] HOST model integration. - [ ] On demand functions.

Contributing

Pull requests are welcome.

For major changes, please open an issue first to discuss implementation or changes.

Acknowledgment

This work was supported by NOAA grant NA19NOS4730207. Funding agency had no impact on work structure or findings.

License

This package is available under MIT license.

Owner

  • Name: Krzysztof Raczynski
  • Login: chrisrac
  • Kind: user
  • Location: Starkville, USA
  • Company: Mississippi State University

GitHub Events

Total
  • Push event: 4
Last Year
  • Push event: 4

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 15 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
pypi.org: pyenfra

A Python package for fractal and complexity analysis of time series.

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 15 Last month
Rankings
Dependent packages count: 8.9%
Average: 29.5%
Dependent repos count: 50.0%
Maintainers (1)
Last synced: 6 months ago