Installation
Requirements
axionbloch requires Python 3.10 or later. The following packages are installed automatically as dependencies:
Package |
Purpose |
|---|---|
Numerical arrays |
|
Sparse linear algebra, interpolation, signal processing |
|
Plotting |
|
Physical units and constants |
|
HDF5 file I/O for simulation results |
Install from TestPyPI
Development versions are published on TestPyPI. Since TestPyPI does not host the dependencies, point pip at both indexes:
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ axionbloch
Install from source
Clone the repository and install in editable mode so that local changes are picked up immediately:
git clone https://github.com/Yuzhe98/AxionBloch.git
cd AxionBloch
pip install -e .
Verify the installation
import axionbloch
from axionbloch.MilkyWayAxionHalo import MilkyWayAxionHalo
from astropy import units as unit
axion = MilkyWayAxionHalo(nu_a=1 * unit.kHz)
print("nu_a =", axion.nu_a)
print("tau_a (estimated) =", axion.tau_a_est.to(unit.s))