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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f78776a6349c354806caa11c578436d2d175abf836b034a344d3b06e7d25136
|
|
| MD5 |
81aef4afc02e6d736a0fc6cd69a6dfe6
|
|
| BLAKE2b-256 |
b3e05a44cd962e38e7b4d3a00285fab0cf2c811114c2c12afd06e0bf938b16b0
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2d4a60aeba20d29b9e78e14c2ba745e132652396a7efee2e7ce3269e79c8517
|
|
| MD5 |
5851cdda7cb9897f91bebd0a7a8a1fc5
|
|
| BLAKE2b-256 |
a0dce3edde72e65595cfd7b4b37c5548bc52841e1b861c13a13cd5ce5f78242c
|