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_cuda12x-1.2.8-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

lisaanalysistools_cuda12x-1.2.8-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

lisaanalysistools_cuda12x-1.2.8-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

lisaanalysistools_cuda12x-1.2.8-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file lisaanalysistools_cuda12x-1.2.8-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for lisaanalysistools_cuda12x-1.2.8-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e5b121078121844a94a125fc9643206d7b2ceef43bc944d4b9defa45c44bc91a
MD5 8546be36aadb4d99d6ff72ca138dd12d
BLAKE2b-256 1e2dc7ab243a40721261321088695f58bd64a60b9e3397818e8a496a848130bc

See more details on using hashes here.

File details

Details for the file lisaanalysistools_cuda12x-1.2.8-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for lisaanalysistools_cuda12x-1.2.8-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a18f73cdb9e311958d106efa89bb00b237bbefe0389c12fe76a80a9c0a826188
MD5 5448bf0442d4c4189b475ff01b3d29da
BLAKE2b-256 15034bc558f9d11f850345421c358d6a30533815530f5bfc7f352460a640a881

See more details on using hashes here.

File details

Details for the file lisaanalysistools_cuda12x-1.2.8-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for lisaanalysistools_cuda12x-1.2.8-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5f5d87159b5128ff4094ee315702dd460ef96c9b5f03a5fb43cc850e4b9cfc2b
MD5 7dd008a3667b74b7ee4f255f2546898f
BLAKE2b-256 850fcdc5741c0fa06f7428d038ad534d31c9e321dcd62594336d8632978d3a1c

See more details on using hashes here.

File details

Details for the file lisaanalysistools_cuda12x-1.2.8-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for lisaanalysistools_cuda12x-1.2.8-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d69d3ec71e4b0e44d08929ea59df7f3e151ec73db8d80486f3717f3de4d30771
MD5 ef3800a2b551471ee50ec6c4c12a6383
BLAKE2b-256 b0ca05222b6eb751d087792b7dddf8f0c3af69c0ee8a5a749c15e9d00911d3ab

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