Skip to main content

Simulation and analysis of multifractal fields

Project description

ScaleInvariance

⚠️ This package is under active development. Current functionality is limited to Hurst exponent estimation and fractional Brownian motion simulation.

Simulation and analysis tools for scale-invariant processes and multifractal fields.

Current Features

Simulation

  • 1D fractional Brownian motion: acausal_fBm_1D() - Spectral synthesis method
  • 2D fractional Brownian motion: acausal_fBm_2D() - Isotropic 2D fields with proper frequency normalization

Hurst Exponent Estimation

  • Haar fluctuation method: haar_fluctuation_hurst()
  • Structure function method: structure_function_hurst()
  • Spectral method: spectral_hurst()

All methods support multi-dimensional arrays and return uncertainty estimates.

Installation

pip install scaleinvariance

Basic Usage

from scaleinvariance import acausal_fBm_1D, acausal_fBm_2D, haar_fluctuation_hurst

# Generate 1D fractional Brownian motion
fBm_1d = acausal_fBm_1D(1024, H=0.7)

# Generate 2D fractional Brownian motion  
fBm_2d = acausal_fBm_2D((512, 1024), H=0.7)

# Estimate Hurst exponent
H_est, H_err = haar_fluctuation_hurst(fBm_1d)
print(f"Estimated H = {H_est:.3f} ± {H_err:.3f}")

Testing

# Test 1D fBm generation and Hurst estimation
python tests/test_acausal_fBm_hurst_estimation.py 0.7

# Test 2D fBm with isotropy validation
python tests/test_2d_fbm.py 0.7

Examples

data source for LGMR: https://www.ncei.noaa.gov/access/paleo-search/study/33112

Planned Features

  • Fractionally integrated flux (FIF) simulation
  • Advanced multifractal analysis tools
  • Additional Hurst estimation methods
  • Comprehensive documentation

Requirements

  • Python ≥ 3.8
  • NumPy, SciPy, PyTorch, Matplotlib

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

scaleinvariance-0.2.0.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

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

scaleinvariance-0.2.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file scaleinvariance-0.2.0.tar.gz.

File metadata

  • Download URL: scaleinvariance-0.2.0.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.13

File hashes

Hashes for scaleinvariance-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d15c48fe3fae36c684ac4520387fde78ea9c911bd1ec5f537f2f7c20ed5ecfa3
MD5 3ace3c4930ca168f8ebdccffba346ff3
BLAKE2b-256 0a5ac35c79eb46a82f21a7877c25a748840cc10d9027b60b747d66d27ccae8d8

See more details on using hashes here.

File details

Details for the file scaleinvariance-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for scaleinvariance-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 57d7542f22ba0ed8313e1561d7f884c1a9ea6f7c139792206e8b39c64ccfa6a4
MD5 f76cf00c9aa4da970f576ec60f17d10a
BLAKE2b-256 478163ac4046d27ebf25b4d80bf1d1361b3d587c4ef4ac9c25831758a081e394

See more details on using hashes here.

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