Installation¶
This section describes the various methods for installing lvm_tools and its dependencies.
Requirements¶
lvm_tools requires Python 3.10 or later. The package has the following core dependencies:
- astropy (>=6.0.0): Astronomical data handling and FITS I/O
- dask (>=2024.1.0): Lazy array operations
- jax (>=0.4.31): Accelerated numerical computing
- numpy (>=2.0.0): Numerical array operations
- scipy (>=1.11.0): Scientific computing utilities
- xarray (>=2024.1.0): Labelled multi-dimensional arrays
Installation from PyPI¶
The simplest installation method is via PyPI using pip:
Using uv (Recommended)¶
For faster, more reliable dependency resolution, we recommend using uv:
Installation from Source¶
For development or to access the latest features, install from source:
This creates an editable installation, allowing changes to the source code to take effect immediately.
Optional Dependencies¶
spectracles Integration¶
For use with the spectracles spectrospatial modelling package:
spectracles needs Python 3.11 or later, so on Python 3.10 the extra installs lvm_tools without it.
This installs the spectracles package and enables the sky_data (and αδ_data) properties on FitData objects.
Verifying Installation¶
To verify the installation, open a Python interpreter and import the package:
This should output:
Troubleshooting¶
JAX Installation Issues¶
If you encounter issues with JAX installation, particularly on systems with NVIDIA GPUs, consult the JAX installation guide for platform-specific instructions.
FITS File Access¶
lvm_tools requires access to LVM DRP output files. These files are typically available through the SDSS Science Archive Server (SAS). Ensure you have appropriate access credentials and network connectivity.