Skip to main content

Small Python package to calculate the Hopf index of vector fields from finite-difference simulations.

Project description

Python Finite-Difference Hopf Index Calculation

This package provides Python implementations of the calculation of the Hopf index of the magnetisation texture for finite-difference micromagnetic simulations. The four methods implemented are twopointstencil, fivepointstencil, solidangle, and solidanglefourier. The package assumes NumPy arrays of the shape (Nx, Ny, Nz, 3), where $N_i$ are the number of cells in each direction, and the final dimension is for the three components. It is assumed that the vector field is normalised.

Example usage to calculate the Hopf index, Hopf density $\boldsymbol{F} \cdot \boldsymbol{A}$, and emergent magnetic field of a vector field stored in a file Magnetisation.npy using the solid angle method is shown in the following.

from pyhopf.hopfindex import HopfIndexCalculator

m = np.load('Magnetisation.npy')

hopf_index_calculator = HopfIndexCalculator(m, 'solidangle')
hopf_index            = hopf_index_calculator.hopf_index()
hopf_density          = hopf_index_calculator.hopf_density()
emergent_field        = hopf_index_calculator.emergent_field()

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

pyhopf-1.0.1.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

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

pyhopf-1.0.1-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file pyhopf-1.0.1.tar.gz.

File metadata

  • Download URL: pyhopf-1.0.1.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for pyhopf-1.0.1.tar.gz
Algorithm Hash digest
SHA256 8f78776a6349c354806caa11c578436d2d175abf836b034a344d3b06e7d25136
MD5 81aef4afc02e6d736a0fc6cd69a6dfe6
BLAKE2b-256 b3e05a44cd962e38e7b4d3a00285fab0cf2c811114c2c12afd06e0bf938b16b0

See more details on using hashes here.

File details

Details for the file pyhopf-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyhopf-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for pyhopf-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d2d4a60aeba20d29b9e78e14c2ba745e132652396a7efee2e7ce3269e79c8517
MD5 5851cdda7cb9897f91bebd0a7a8a1fc5
BLAKE2b-256 a0dce3edde72e65595cfd7b4b37c5548bc52841e1b861c13a13cd5ce5f78242c

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