Metadata-Version: 2.4
Name: SpinWaveToolkit
Version: 1.2.0
Summary: Set of tools useful in spin wave research.
Author-email: Ondřej Wojewoda <ondrej.wojewoda@ceitec.vutbr.cz>
Maintainer-email: Ondřej Wojewoda <ondrej.wojewoda@ceitec.vutbr.cz>, Jan Klíma <jan.klima4@vutbr.cz>, Dominik Pavelka <dominik.pavelka@vutbr.cz>, Michal Urbánek <michal.urbanek@ceitec.vutbr.cz>
Project-URL: Homepage, https://github.com/CEITECmagnonics/SpinWaveToolkit
Project-URL: Documentation, https://ceitecmagnonics.github.io/SpinWaveToolkit/stable/index.html
Project-URL: Bug Reports, https://github.com/CEITECmagnonics/SpinWaveToolkit/issues
Project-URL: Forum, https://github.com/CEITECmagnonics/SpinWaveToolkit/discussions
Project-URL: Release Notes, https://ceitecmagnonics.github.io/SpinWaveToolkit/stable/release_notes.html
Keywords: magnetism,physics,analytical,magnonic,spin-wave
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>1.20
Requires-Dist: scipy>1.8
Requires-Dist: tqdm>4.66
Provides-Extra: dev
Requires-Dist: black; extra == "dev"
Requires-Dist: pylint; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: matplotlib; extra == "dev"
Provides-Extra: dev-doc
Requires-Dist: black; extra == "dev-doc"
Requires-Dist: pylint; extra == "dev-doc"
Requires-Dist: pytest; extra == "dev-doc"
Requires-Dist: matplotlib; extra == "dev-doc"
Requires-Dist: sphinx; extra == "dev-doc"
Requires-Dist: pydata-sphinx-theme==0.16.0; extra == "dev-doc"
Requires-Dist: numpydoc; extra == "dev-doc"
Requires-Dist: nbsphinx<=0.9.6; extra == "dev-doc"
Requires-Dist: pypandoc; extra == "dev-doc"
Requires-Dist: sphinx-design; extra == "dev-doc"
Requires-Dist: sphinx-gallery; extra == "dev-doc"
Requires-Dist: ipython; extra == "dev-doc"
Requires-Dist: sphinx-toolbox; extra == "dev-doc"
Requires-Dist: sphinx-copybutton; extra == "dev-doc"
Provides-Extra: deploy
Requires-Dist: sphinx; extra == "deploy"
Requires-Dist: pydata-sphinx-theme==0.16.0; extra == "deploy"
Requires-Dist: numpydoc; extra == "deploy"
Requires-Dist: nbsphinx<=0.9.6; extra == "deploy"
Requires-Dist: pypandoc; extra == "deploy"
Requires-Dist: sphinx-design; extra == "deploy"
Requires-Dist: sphinx-gallery; extra == "deploy"
Requires-Dist: ipython; extra == "deploy"
Requires-Dist: sphinx-toolbox; extra == "deploy"
Requires-Dist: sphinx-copybutton; extra == "deploy"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Dynamic: license-file

# SpinWaveToolkit

<img src="https://raw.githubusercontent.com/CEITECmagnonics/SpinWaveToolkit/new-release/docs/source/_static/logo+text.svg#L1" width=60%>

SpinWaveToolkit is an open-source Python package which provides analytical tools for spin-wave physics and research.

> [!TIP]
> This package could use some updating. If you want to contrubute, see [CONTRIBUTING GUIDELINES](CONTRIBUTING.md).


## Installation

Currently you can either
1. *(recommended)* install latest release from PyPI via `pip` by typing in the command line
```
py -m pip install SpinWaveToolkit --user
```
2. or install from GitHub any branch via `pip` by typing in the command line
```
py -m pip install https://github.com/CEITECmagnonics/SpinWaveToolkit/tarball/<branch-name> --user
```
<details>
<summary> older installation approaches <i>(not recommended)</i> </summary>

3. or copy the [SpinWaveToolkit][SWTpy] folder to your `site-packages` folder manually. Usually (on Windows machines) located at
```
C:\Users\<user>\AppData\Roaming\Python\Python<python-version>\site-packages
```
for user-installed modules, or at
```
C:\<python-installation-folder>\Python<python-version>\Lib\site-packages
```
for global modules.
</details>


## Dependencies
The SpinWaveToolkit package is compatible with Python >3.7, and uses the following modules:
- [numpy] >1.20 (>2.0 is also ok, bugs be reported in [Issues])
- [scipy] >1.8

> [!NOTE]
> If you encounter compatibility errors in contradiction with this list, let us know by posting your findings in a new [Issue][Issues].

## About
This package provides analytical tools in spin-wave physics. This section gives an overview of its capabilites. All functionalities are described in the [SpinWaveToolkit Documentation][docs].

Features:
- Calculation of the dispersion relation and derived quantities for several systems using analytical, semi-analytical, and numerical models. These include
  - single magnetic layer (thin film) surrounded by dielectrics [^1] [^2],
  - coupled magnetic double layer (e.g. a synthetic antiferromagnet) [^3],
  - single magnetic layer inductively coupled to a superconducting layer from one side [^4].
- Simple magnetic material management using a `Material` class.
- Functions for modelling Brillouin light scattering (BLS) signal and experiments.


### Example
Example of calculation of the spin-wave dispersion relation `f(k_xi)`, and other important quantities, for the lowest-order mode in a 30 nm thick NiFe (Permalloy) layer.
```Python
import numpy as np
import SpinWaveToolkit as SWT

kxi = np.linspace(1e-6, 150e6, 150)

PyChar = SWT.SingleLayer(Bext=20e-3, kxi=kxi, theta=np.pi/2,
                         phi=np.pi/2, d=30e-9, weff=2e-6,
                         boundary_cond=2, material=SWT.NiFe)
DispPy = PyChar.GetDispersion()*1e-9/(2*np.pi)  # GHz
vgPy = PyChar.GetGroupVelocity()*1e-3  # km/s
lifetimePy = PyChar.GetLifetime()*1e9  # ns
decLen = PyChar.GetDecLen()*1e6  # um
```
For more examples (with images) look [here](https://ceitecmagnonics.github.io/SpinWaveToolkit/stable/examples.html).

## Cite us

If you use SpinWaveToolkit in your work, please cite it as follows:

[1] Wojewoda, O., & Klíma, J. *SpinWaveToolkit: Set of tools useful in spin wave research.* GitHub, 2025. [https://github.com/CEITECmagnonics/SpinWaveToolkit]()


BibTeX entry:
``` BibTeX
@online{swt,
    author = {Wojewoda, Ondřej and Klíma, Jan},
    title = {SpinWaveToolkit: Set of tools useful in spin wave research},
    year = {2025},
    publisher = {GitHub},
    version = {1.2.0},
    url = {https://github.com/CEITECmagnonics/SpinWaveToolkit},
    language = {en},
}
```

All sources of models used within the SpinWaveToolkit are cited in their respective documentation. Consider citing them as well if you use these models.



[^1]: B. A. Kalinikos and A. N. Slavin, *J. Phys. C: Solid State Phys.*, **19**, 7013 (1986).
[^2]: S. Tacchi et al., *Phys. Rev. B*, **100**, 104406 (2019).
[^3]: R. A. Gallardo et al., *Phys. Rev. Applied*, **12**, 034012 (2019).
[^4]: X.-H. Zhou et al., *Phys. Rev. B*, **110**, L020404 (2024).


[SWTpy]:SpinWaveToolkit
[numpy]:https://numpy.org/
[scipy]:https://scipy.org/
[Issues]:https://github.com/CEITECmagnonics/SpinWaveToolkit/issues
[docs]:https://ceitecmagnonics.github.io/SpinWaveToolkit/stable/

