Metadata-Version: 2.3
Name: pyhopf
Version: 1.0.1
Summary: Small Python package to calculate the Hopf index of vector fields from finite-difference simulations.
Author: Ross Knapman, Maria Azhar, Alessandro Pignedoli, Louis Gallard, Riccardo Hertel, Jonathan Leliaert, Karin Everschor-Sitte
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Dist: numpy
Project-URL: Homepage, https://git.uni-due.de/twist-external/numericalhopfindexcalculation/numericalhopfindexcalculation_pythonhopfindex
Project-URL: Issues, https://git.uni-due.de/twist-external/numericalhopfindexcalculation/numericalhopfindexcalculation_pythonhopfindex/-/issues

# 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.

```python
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()
```

