Skip to main content

A package for LISA Data Analysis

Project description

LISA Analysis Tools

Doc badge DOI

LISA Analysis Tools is a package for performing LISA Data Analysis tasks, including building the LISA Global Fit.

To install the latest version of lisaanalysistools using pip, simply run:

# For CPU-only version
pip install lisaanalysistools

# For GPU-enabled versions with CUDA 11.Y.Z
pip install lisaanalysistools-cuda11x

# For GPU-enabled versions with CUDA 12.Y.Z
pip install lisaanalysistools-cuda12x

To know your CUDA version, run the tool nvidia-smi in a terminal a check the CUDA version reported in the table header:

$ nvidia-smi
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.54.15              Driver Version: 550.54.15      CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
...

Now, in a python file or notebook:

import lisatools

You may check the currently available backends:

>>> for backend in ["cpu", "cuda11x", "cuda12x", "cuda", "gpu"]:
...     print(f" - Backend '{backend}': {"available" if lisatools.has_backend(backend) else "unavailable"}")
 - Backend 'cpu': available
 - Backend 'cuda11x': unavailable
 - Backend 'cuda12x': unavailable
 - Backend 'cuda': unavailable
 - Backend 'gpu': unavailable

Note that the cuda backend is an alias for either cuda11x or cuda12x. If any is available, then the cuda backend is available. Similarly, the gpu backend is (for now) an alias for cuda.

If you expected a backend to be available but it is not, run the following command to obtain an error message which can guide you to fix this issue:

>>> import lisatools
>>> lisatools.get_backend("cuda12x")
ModuleNotFoundError: No module named 'lisatools_backend_cuda12x'

The above exception was the direct cause of the following exception:
...

lisatools.cutils.BackendNotInstalled: The 'cuda12x' backend is not installed.

The above exception was the direct cause of the following exception:
...

lisatools.cutils.MissingDependencies: LISAanalysistools CUDA plugin is missing.
    If you are using lisatools in an environment managed using pip, run:
        $ pip install lisaanalysistools-cuda12x

The above exception was the direct cause of the following exception:
...

lisatools.cutils.BackendAccessException: Backend 'cuda12x' is unavailable. See previous error messages.

Once LISA Analysis Tools is working and the expected backends are selected, check out the examples notebooks on how to start with this software.

Installing from sources

Prerequisites

To install this software from source, you will need:

  • A C++ compiler (g++, clang++, ...)
  • A Python version supported by scikit-build-core (>=3.7 as of Jan. 2025)

If you want to enable GPU support in LISA Analysis Tools, you will also need the NVIDIA CUDA Compiler nvcc in your path as well as the CUDA toolkit (with, in particular, the libraries CUDA Runtime Library, cuBLAS and cuSPARSE).

Installation instructions using conda

We recommend to install LISA Analysis Tools using conda in order to have the compilers all within an environment. First clone the repo

git clone https://github.com/mikekatz04/LISAanalysistools.git
cd LISAanalysistools

Now create an environment (these instructions work for all platforms but some adjustements can be needed, refer to the detailed installation documentation for more information):

conda create -n lisatools_env -y -c conda-forge --override-channels |
    cxx-compiler pkgconfig conda-forge/label/lapack_rc::liblapacke

activate the environment

conda activate lisatools_env

Then we can install locally for development:

pip install -e '.[dev, testing]'

Installation instructions using conda on GPUs and linux

Below is a quick set of instructions to install the LISA Analysis Tools package on GPUs and linux.

conda create -n lisatools_env -c conda-forge lisaanalysistools-cuda12x python=3.12
conda activate lisatools_env

Test the installation device by running python

import lisatools
lisatools.get_backend("cuda12x")

Running the installation

To start the from-source installation, ensure the pre-requisite are met, clone the repository, and then simply run a pip install command:

# Clone the repository
git clone https://github.com/mikekatz04/LISAanalysistools.git
cd LISAanalysistools

# Run the install
pip install .

If the installation does not work, first check the detailed installation documentation. If it still does not work, please open an issue on the GitHub repository or contact the developers through other means.

Running the Tests

The tests require a few dependencies which are not installed by default. To install them, add the [testing] label to LISA Analysis Tools package name when installing it. E.g:

# For CPU-only version with testing enabled
pip install lisaanalysistools[testing]

# For GPU version with CUDA 12.Y and testing enabled
pip install lisaanalysistools-cuda12x[testing]

# For from-source install with testing enabled
git clone https://github.com/mikekatz04/LISAanalysistools.git
cd LISAanalysistools
pip install '.[testing]'

To run the tests, open a terminal in a directory containing the sources of LISA Analysis Tools and then run the unittest module in discover mode:

$ git clone https://github.com/mikekatz04/LISAanalysistools.git
$ cd LISAanalysistools
$ python -m lisatools.tests  # or "python -m unittest discover"
...
----------------------------------------------------------------------
Ran 20 tests in 71.514s
OK

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

If you want to develop LISA Analysis Tools and produce documentation, install lisatools from source with the [dev] label and in editable mode:

$ git clone https://github.com/mikekatz04/LISAanalysistools.git
$ cd LISAanalysistools
pip install -e '.[dev, testing]'

This will install necessary packages for building the documentation (sphinx, pypandoc, sphinx_rtd_theme, nbsphinx) and to run the tests.

The documentation source files are in docs/source. To compile the documentation locally, change to the docs directory and run make html.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Contributors

A (non-exhaustive) list of contributors to the LISA Analysis Tools code can be found in CONTRIBUTORS.md.

License

This project is licensed under the Apache License - see the LICENSE file for details.

Citation

Please make sure to cite LISA Analysis Tools papers and the LISA Analysis Tools software on Zenodo. We provide a set of prepared references in PAPERS.bib. There are other papers that require citation based on the classes used. For most classes this applies to, you can find these by checking the citation attribute for that class. All references are detailed in the CITATION.cff file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

lisaanalysistools_cuda11x-1.1.17-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

lisaanalysistools_cuda11x-1.1.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

lisaanalysistools_cuda11x-1.1.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

lisaanalysistools_cuda11x-1.1.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

lisaanalysistools_cuda11x-1.1.17-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

Details for the file lisaanalysistools_cuda11x-1.1.17-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lisaanalysistools_cuda11x-1.1.17-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 84dfd55f60f5ac8891f4fa5a2c824c616fc76188aa3e9f93bdb50912e441336e
MD5 e057314ad10ef59f0a4071f23d5e1f5f
BLAKE2b-256 86f5fc4dea685f2dc233f0cba122e509305b01546ddd223b26e47db665af15c9

See more details on using hashes here.

File details

Details for the file lisaanalysistools_cuda11x-1.1.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lisaanalysistools_cuda11x-1.1.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 be274e06e9797cacf077441dbd8e9c947251511ea819aa57f498f76afaa3413e
MD5 4e9f72153714c18e08c9056c4f4c1f22
BLAKE2b-256 8cc8abab26ce389ba1ef8d379d308803ab09a6dc7db84db547fa02f8ddaf1414

See more details on using hashes here.

File details

Details for the file lisaanalysistools_cuda11x-1.1.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lisaanalysistools_cuda11x-1.1.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 581d0482383aa4530616acc090ed9f456a0b2d8cf015afa7a8ab4889cc489071
MD5 9212828d89507564ed3f05bdc1eb7d3a
BLAKE2b-256 f4f6fba8e0c54cace0f996a555dd2b5f496ceebc94bd8c96728c91b05b3e1af0

See more details on using hashes here.

File details

Details for the file lisaanalysistools_cuda11x-1.1.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lisaanalysistools_cuda11x-1.1.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ad1ac20df3bed9142deca49b5679467c4915a43c05d494b1fe8c605f3ebeae1b
MD5 f56512bdba61e825b575a518d41fabb8
BLAKE2b-256 6d0dd99d1dce7ca4b58159d2aace26c3969eae7d07f02573a9e42bf98c50c1f7

See more details on using hashes here.

File details

Details for the file lisaanalysistools_cuda11x-1.1.17-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lisaanalysistools_cuda11x-1.1.17-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c6eb3150b942bc6397ba35550094a7f2e727b45441518a8dfcae79d4112553be
MD5 86f3cbaee95b91c87527cfc613d1893c
BLAKE2b-256 fd88e1fa60d5857bf24425b4332da34676a2cf2914a9e3c38560bc737f19dd78

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page