superkludgeindie

SuperKludge - fast and accurate EMRI waveforms beyond the adiabatic evolution. Augments the PaperProduction tag of FEW 2.0.

https://github.com/perturber/superkludgeindie

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org, zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.4%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

SuperKludge - fast and accurate EMRI waveforms beyond the adiabatic evolution. Augments the PaperProduction tag of FEW 2.0.

Basic Info
  • Host: GitHub
  • Owner: perturber
  • License: other
  • Language: Jupyter Notebook
  • Default Branch: SuperKludgeFullEq
  • Homepage:
  • Size: 148 MB
Statistics
  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created 9 months ago · Last pushed 7 months ago
Metadata Files
Readme Contributing License Citation

README.md

few: Fast EMRI Waveforms

This package contains the highly modular framework for fast and accurate extreme mass ratio inspiral (EMRI) waveforms from arxiv.org/2104.04582 and arxiv.org/2008.06071. The waveforms in this package combine a variety of separately accessible modules to form EMRI waveforms on both CPUs and GPUs. Generally, the modules fall into four categories: trajectory, amplitudes, summation, and utilities. Please see the documentation for further information on these modules. The code can be found on Github here. The data necessary for various modules in this package will automatically download the first time it is needed. If you would like to view the data, it can be found on Zenodo. The current and all past code release zip files can also be found on Zenodo here. Please see the citation section below for information on citing FEW.

This package is a part of the Black Hole Perturbation Toolkit.

If you use all or any parts of this code, please cite arxiv.org/2104.04582 and arxiv.org/2008.06071. See the documentation to properly cite specific modules.

Getting started

To install the latest pre-compiled version of fastemriwaveforms, simply run:

```sh

For CPU-only version

pip install --pre fastemriwaveforms

For GPU-enabled versions with CUDA 11.Y.Z

pip install --pre fastemriwaveforms-cuda11x

For GPU-enabled versions with CUDA 12.Y.Z

pip install --pre fastemriwaveforms-cuda12x ```

The --pre flag means that you are installing a pre-release version of the project. This flag will not be necessary once version 2.0 is officially released.

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

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

Now, in a python file or notebook:

py3 import few

You may check the currently available backends:

```py3

for backend in ["cpu", "cuda11x", "cuda12x", "cuda", "gpu"]: ... print(f" - Backend '{backend}': {"available" if few.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:

```py3

import few few.getbackend("cuda12x") ModuleNotFoundError: No module named 'fewbackend_cuda12x'

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

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

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

few.cutils.MissingDependencies: FastEMRIWaveforms CUDA plugin is missing. If you are using few in an environment managed using pip, run: $ pip install fastemriwaveforms-cuda12x

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

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

Once FEW is working and the expected backends are selected, you may see examples notebook 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)

Some installation steps require the external library LAPACK along with its C-bindings provided by LAPACKE. If these libraries and their header files (in particular lapacke.h) are available on your system, they will be detected and used automatically. If they are available on a non-standard location, see below for some options to help detecting them. Note that by default, if LAPACKE is not available on your system, the installation step will attempt to download its sources and add them to the compilation tree. This makes the installation a bit longer but a lot easier.

If you want to enable GPU support in FEW, 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).

There are a set of files required for total use of this package. They will download automatically the first time they are needed. Files are generally under 10MB. However, there is a 100MB file needed for the slow waveform and the bicubic amplitude interpolation. This larger file will only download if you run either of those two modules. The files are hosted on the Black Hole Perturbation Toolkit Download Server.

Installation instructions using conda

We recommend to install FEW using conda in order to have the compilers all within an environment. First clone the repo git clone https://github.com/BlackHolePerturbationToolkit/FastEMRIWaveforms.git cd FastEMRIWaveforms git checkout Kerr_Equatorial_Eccentric

Now create an environment (here Mac OSX arm M chip) conda create -n few_env -y -c conda-forge -y python=3.12 clangxx_osx-arm64 clang_osx-arm64 h5py wget gsl liblapacke lapack openblas fortran-compiler scipy numpy matplotlib jupyter

Instead for MACOS: conda create -n few_env -c conda-forge -y clangxx_osx-64 clang_osx-64 h5py wget gsl liblapacke lapack openblas fortran-compiler scipy numpy matplotlib jupyter python=3.12 activate the environment conda activate few_env and finally remember to install lisaconstants pip install lisaconstants

You should have now installed the packages that allow FEW to be compiled but let's enforce the compilers by running export CXXFLAGS="-march=native" export CFLAGS="-march=native"

Find the clang compiler by running ls ${CONDA_PREFIX}/bin/*clang ls ${CONDA_PREFIX}/bin/*clang++

Then export and define the compilers, on my laptop it looks like export CC=/opt/miniconda3/envs/few_env/bin/arm64-apple-darwin20.0.0-clang export CXX=/opt/miniconda3/envs/few_env/bin/arm64-apple-darwin20.0.0-clang++

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 Fast EMRI Waveform package on GPUs and linux.

sh conda create -n few_env -c conda-forge gcc_linux-64 gxx_linux-64 wget gsl lapack=3.6.1 hdf5 numpy Cython scipy tqdm jupyter ipython h5py requests matplotlib python=3.12 pandas fortran-compiler conda activate few_env pip install lisaconstants

Locate where the nvcc compile is located and add it to the path, in my case it is located in /usr/local/cuda-12.5/bin/ export PATH=$PATH:/usr/local/cuda-12.5/bin/

Check the version of your compiler by running nvcc --version and install the corresponding FEW cuda version for running on GPUs: pip install --pre fastemriwaveforms-cuda12x

Test the installation device by running python python import few few.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:

```sh

Clone the repository

git clone https://github.com/BlackHolePerturbationToolkit/FastEMRIWaveforms.git cd FastEMRIWaveforms

Run the install

pip install . ```

Many options are available to change the installation behaviour. These can be set by adding --config-settings=cmake.define.OPTION_NAME=OPTION_VALUE to the pip command. Available options are:

  • FEW_LAPACKE_FETCH=ON|OFF|[AUTO]: Whether LAPACK and LAPACKE should be automatically fetched from internet.
    • ON: ignore pre-installed LAPACK(E) and always fetch and compile their sources
    • OFF: disable LAPACK(E) fetching and only use pre-installed library and headers (install will fail if pre-installed lib and headers are not available)
    • AUTO (default): try to detect pre-installed LAPACK(E) and their headers. If found, use them, otherwise fetch LAPACK(E).
  • FEW_LAPACKE_DETECT_WITH=[CMAKE]|PKGCONFIG: How LAPACK(E) should be detected
    • CMAKE: LAPACK(E) will be detected using the cmake FindPackage command. If your LAPACK(E) install provides lapacke-config.cmake in a non-standard location, add its path to the CMAKE_PREFIX_PATH environment variable.
    • PKGCONFIG: LAPACK(E) will be detected using pkg-config by searching for the files lapack.pc and lapacke.pc . If these files are provided by your LAPACK(E) install in a non-standard location, add their path to the environment variable PKG_CONFIG_PATH
    • AUTO (default): attempt both CMake and PkgConfig approaches
  • FEW_WITH_GPU=ON|OFF|[AUTO]: Whether GPU-support must be enabled
    • ON: Forcefully enable GPU support (install will fail if GPU prerequisites are not met)
    • OFF: Disable GPU support
    • AUTO (default): Check whether nvcc and the CUDA Toolkit are available in environment and enable/disable GPU support accordingly.
  • FEW_CUDA_ARCH: List of CUDA architectures that will be targeted by the CUDA compiler using CMake CUDA_ARCHITECTURES syntax. (Default = all).

Example of custom install with specific options to forcefully enable GPU support with support for the host's GPU only (native architecture) using LAPACK fetched from internet:

sh pip install . \ --config-settings=cmake.define.FEW_WITH_GPU=ON \ --config-settings=cmake.define.FEW_CUDA_ARCH="native" \ --config-settings=cmake.define.FEW_LAPACKE_FETCH=ON

If you enabled GPU support (or it was automatically enabled by the AUTO mode), you will also need to install the nvidia-cuda-runtime package corresponding to the CUDA version detected by nvidia-smi as explained in the Getting Started section above. You will also need to manually install cupy-cuda11x or cupy-cuda12x according to your CUDA version.

Please contact the developers if the installation does not work.

Running the Tests

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

```sh

For CPU-only version with testing enabled

pip install fastemriwaveforms[testing]

For GPU version with CUDA 12.Y and testing enabled

pip install fastemriwaveforms-cuda12x[testing]

For from-source install with testing enabled

git clone https://github.com/BlackHolePerturbationToolkit/FastEMRIWaveforms.git cd FastEMRIWaveforms pip install '.[testing]' ```

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

```sh $ git clone https://github.com/BlackHolePerturbationToolkit/FastEMRIWaveforms.git $ cd FastEMRIWaveforms $ python -m few.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 FEW and produce documentation, install few from source with the [dev] label and in editable mode:

$ git clone https://github.com/BlackHolePerturbationToolkit/FastEMRIWaveforms.git $ cd FastEMRIWaveforms 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, 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.

Authors/Developers

  • Michael Katz
  • Lorenzo Speri
  • Christian Chapman-Bird
  • Alvin J. K. Chua
  • Niels Warburton
  • Scott Hughes

Contributors

  • Philip Lynch
  • Soichiro Isoyama
  • Ryuichi Fujita
  • Monica Rizzo
  • Ollie Burke
  • Maxime Pigou

License

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

Citation

Please make sure to cite FEW papers and the FEW software on Zenodo. 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.

Acknowledgments

  • This research resulting in this code was supported by National Science Foundation under grant DGE-0948017 and the Chateaubriand Fellowship from the Office for Science & Technology of the Embassy of France in the United States.
  • It was also supported in part through the computational resources and staff contributions provided for the Quest/Grail high performance computing facility at Northwestern University.

Owner

  • Name: Shubham Kejriwal
  • Login: perturber
  • Kind: user

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: FastEMRIWaveforms
message: >-
  If you use this software, please make sure to cite both
  the software itself, the papers 'arXiv:2008.06071' and
  'arXiv:2104.04582' as well as the papers specific to the
  classes that you use (see the class "citation" attribute
  and the documentation).
type: software
authors:
  - given-names: Michael
    family-names: Katz
    orcid: 'https://orcid.org/0000-0002-7605-5767'
    affiliation: NASA Marshall Space Flight Center
    email: mikekatz04@gmail.com
  - given-names: Lorenzo
    family-names: Speri
    orcid: 'https://orcid.org/0000-0002-5442-7267'
    affiliation: European Space Research Technology Center
  - given-names: Christian
    family-names: Chapman-Bird
    affiliation: University of Birmingham
    orcid: 'https://orcid.org/0000-0002-2728-9612'
  - given-names: Alvin J. K.
    family-names: Chua
    affiliation: National University of Singapore
  - given-names: Niels
    family-names: Warburton
    affiliation: University College Dublin
    orcid: 'https://orcid.org/0000-0003-0914-8645'
  - given-names: Scott
    family-names: Hughes
    affiliation: Massachusetts Institute of Technology
    orcid: 'https://orcid.org/0000-0001-6211-1388'
identifiers:
  - type: doi
    value: 10.5281/zenodo.3969004
    description: Zenodo repository of this project
repository-code: >-
  https://github.com/BlackHolePerturbationToolkit/FastEMRIWaveforms
url: 'https://bhptoolkit.org/FastEMRIWaveforms/html/index.html'
repository: 'https://zenodo.org/records/3969004'
repository-artifact: 'https://pypi.org/project/fastemriwaveforms/'
abstract: >-
  This package contains the highly modular framework for
  fast and accurate extreme mass ratio inspiral (EMRI)
  waveforms from arxiv.org/2104.04582 and
  arxiv.org/2008.06071. The waveforms in this package
  combine a variety of separately accessible modules to form
  EMRI waveforms on both CPUs and GPUs.
keywords:
  - Gravitational Wave
  - LISA
  - EMRI
  - Waveform
license: MIT
references:
  - abbreviation: "Chua:2020stf"
    authors:
      - family-names: Chua
        given-names: Alvin J. K.
      - family-names: Katz
        given-names: Michael L.
      - family-names: Warburton
        given-names: Niels
      - family-names: Hugues
        given-names: Scott A.
    doi: 10.1103/PhysRevLett.126.051102
    year: 2021
    month: 2
    journal: Physical Review Letters
    volume: 126
    issue: 5
    title: >-
      Rapid Generation of Fully Relativistic Extreme-Mass-Ratio-Inspiral
      Waveform Templates for LISA Data Analysis
    pages: 6
    start: 51102
    publisher:
      name: American Physical Society
    url: 'https://link.aps.org/doi/10.1103/PhysRevLett.126.051102'
    issn: 1079-7114
    identifiers:
      - type: other
        value: 'arXiv:gr-qc/2008.06071'
        description: arXiv preprint of this article
    type: article
  - abbreviation: "Katz:2021yft"
    authors:
      - family-names: Katz
        given-names: Michael L.
      - family-names: Chua
        given-names: Alvin J. K.
      - family-names: Speri
        given-names: Lorenzo
      - family-names: Warburton
        given-names: Niels
      - family-names: Hugues
        given-names: Scott A.
    doi: 10.1103/physrevd.104.064047
    year: 2021
    month: 9
    journal: Physical Review D
    volume: 104
    issue: 6
    title: >-
      Fast extreme-mass-ratio-inspiral waveforms: New tools for millihertz
      gravitational-wave data analysis
    pages: 25
    start: 64047
    publisher:
      name: American Physical Society
    url: 'https://link.aps.org/doi/10.1103/PhysRevD.104.064047'
    issn: 2470-0029
    identifiers:
      - type: other
        value: 'arXiv:gr-qc/2104.04582'
        description: arXiv preprint of this article
    type: article
  - abbreviation: "Chua:2018woh"
    authors:
      - family-names: Chua
        given-names: Alvin J. K.
      - family-names: Galley
        given-names: Chad R.
      - family-names: Vallisneri
        given-names: Michele
    doi: 10.1103/physrevlett.122.211101
    year: 2019
    month: 5
    journal: Physical Review Letters
    volume: 122
    issue: 21
    title: >-
      Reduced-Order Modeling with Artificial Neurons for Gravitational-Wave
      Inference
    pages: 7
    start: 211101
    publisher:
      name: American Physical Society
    url: 'https://link.aps.org/doi/10.1103/PhysRevLett.122.211101'
    issn: 1079-7114
    identifiers:
      - type: other
        value: 'arXiv:astro-ph.IM/1811.05491'
        description: arXiv preprint of this article
    type: article
  - abbreviation: "Fujita:2020zxe"
    authors:
      - family-names: Fujita
        given-names: Ryuichi
      - family-names: Shibata
        given-names: Masaru
    doi: 10.1103/physrevd.102.064005
    year: 2020
    month: 9
    journal: Physical Review D
    volume: 102
    issue: 6
    title: >-
      Extreme mass ratio inspirals on the equatorial plane in the adiabatic
      order
    pages: 18
    start: 64005
    publisher:
      name: American Physical Society
    url: 'https://link.aps.org/doi/10.1103/PhysRevD.102.064005'
    issn: 2470-0029
    identifiers:
      - type: other
        value: 'arXiv:gr-qc/2008.13554'
        description: arXiv preprint of this article
    type: article
  - abbreviation: "Stein:2019buj"
    authors:
      - family-names: Stein
        given-names: Leo C.
      - family-names: Warburton
        given-names: Niels
    doi: 10.1103/physrevd.101.064007
    year: 2020
    month: 3
    journal: Physical Review D
    volume: 101
    issue: 6
    title: Location of the last stable orbit in Kerr spacetime
    pages: 16
    start: 64007
    publisher:
      name: American Physical Society
    url: 'https://link.aps.org/doi/10.1103/physrevd.101.064007'
    issn: 2470-0029
    identifiers:
      - type: other
        value: 'arXiv:gr-qc/1912.07609'
        description: arXiv preprint of this article
    type: article
  - abbreviation: "Chua:2015mua"
    authors:
      - family-names: Chua
        given-names: Alvin J. K.
      - family-names: Gair
        given-names: Jonathan R.
    doi: 10.1088/0264-9381/32/23/232002
    year: 2015
    month: 11
    journal: Classical and Quantum Gravity
    volume: 32
    issue: 23
    title: >-
      Improved analytic extreme-mass-ratio inspiral model for scoping out eLISA
      data analysis
    pages: 8
    start: 232002
    publisher:
      name: IOP Publishing
    issn: 1361-6382
    identifiers:
      - type: other
        value: 'arXiv:gr-qc/1510.06245'
        description: arXiv preprint of this article
    type: article
  - abbreviation: "Chua:2017ujo"
    authors:
      - family-names: Chua
        given-names: Alvin J. K.
      - family-names: Moore
        given-names: Christopher J.
      - family-names: Gair
        given-names: Jonathan R.
    doi: 10.1103/physrevd.96.044005
    year: 2017
    month: 8
    journal: Physical Review D
    volume: 96
    issue: 4
    title: Augmented kludge waveforms for detecting extreme-mass-ratio inspirals
    pages: 17
    start: 44005
    publisher:
      name: American Physical Society
    url: 'https://link.aps.org/doi/10.1103/PhysRevD.96.044005'
    issn: 2470-0029
    identifiers:
      - type: other
        value: 'arXiv:gr-qc/1705.04259'
        description: arXiv preprint of this article
    type: article
  - abbreviation: "Barack:2003fp"
    authors:
      - family-names: Barack
        given-names: Leor
      - family-names: Cutler
        given-names: Curt
    doi: 10.1103/physrevd.69.082005
    year: 2004
    month: 4
    journal: Physical Review D
    volume: 69
    issue: 8
    title: >-
      LISA capture sources: Approximate waveforms, signal-to-noise ratios, and
      parameter estimation accuracy
    pages: 24
    start: 82005
    publisher:
      name: American Physical Society
    url: 'https://link.aps.org/doi/10.1103/PhysRevD.69.082005'
    issn: 1550-2368
    identifiers:
      - type: other
        value: 'arXiv:gr-qc/0310125'
        description: arXiv preprint of this article
    type: article
  - abbreviation: "Speri:2023jte"
    authors:
      - family-names: Speri
        given-names: Lorenzo
      - family-names: Katz
        given-names: Michael L.
      - family-names: Chua
        given-names: Alvin J. K.
      - family-names: Hugues
        given-names: Scott A.
      - family-names: Warburton
        given-names: Niels
      - family-names: Thompson
        given-names: Jonathan E.
      - family-names: Chapman-Bird
        given-names: Christian E. A.
      - family-names: Gair
        given-names: Jonathan R.
    doi: 10.3389/fams.2023.1266739
    year: 2024
    month: 1
    journal: Frontiers in Applied Mathematics and Statistics
    volume: 9
    title: >-
      Fast and Fourier: extreme mass ratio inspiral waveforms in the frequency
      domain
    pages: 13
    publisher:
      name: Frontiers Media SA
    issn: 2297-4687
    identifiers:
      - type: other
        value: 'arXiv:gr-qc/2307.12585'
        description: arXiv preprint of this article
    type: article

GitHub Events

Total
  • Watch event: 1
  • Member event: 3
  • Push event: 27
  • Create event: 1
Last Year
  • Watch event: 1
  • Member event: 3
  • Push event: 27
  • Create event: 1

Dependencies

.github/workflows/documentation-links.yml actions
  • readthedocs/actions/preview v1 composite
.github/workflows/pages.yml actions
  • ConorMacBride/install-package v1 composite
  • actions/cache/restore v4 composite
  • actions/checkout v4 composite
  • actions/deploy-pages v4 composite
  • actions/setup-python v5 composite
  • actions/upload-pages-artifact v3 composite
.github/workflows/publish.yml actions
  • actions/checkout v4 composite
  • actions/download-artifact v4 composite
  • actions/upload-artifact v4 composite
  • docker/setup-qemu-action v3 composite
  • fortran-lang/setup-fortran v1 composite
  • install-pinned/twine e0e1034852ffdf3e7867300539b1065f1bff2a87 composite
  • pypa/cibuildwheel v2.22.0 composite
.github/workflows/run-tests.yml actions
  • ConorMacBride/install-package v1 composite
  • actions/cache/restore v4 composite
  • actions/cache/save v4 composite
  • actions/checkout v4 composite
  • actions/download-artifact v4 composite
  • actions/setup-python v5 composite
  • actions/upload-artifact v4 composite
  • irongut/CodeCoverageSummary v1.3.0 composite
.devcontainer/Dockerfile docker
  • ubuntu 24.04 build
pyproject.toml pypi
  • exceptiongroup python_version<'3.11'
  • h5py *
  • jsonschema *
  • lisaconstants *
  • multispline *
  • numba *
  • numpy *
  • nvidia-ml-py *
  • platformdirs *
  • pydantic *
  • pyyaml *
  • requests *
  • rich *
  • scipy *
  • tqdm *