Giter Site home page Giter Site logo

ldc-gb's Introduction

Accelerated global Galactic binary search algorithm

The parameter estimate of Galactic binaries (GBs) is split into two parts. The first part extracts the best fitting GBs in the provided data set based on a differential evolution search algorithm. The second part uses the GBGPU, https://github.com/mikekatz04/GBGPU, to quickly sample across a reduced parameter space around the maximum likelihood estimate from the first steps. That way we are able to obtain a posterior distribution of a found GB within 2 seconds on a laptop grade GPU.

The first part only requires the pip installable lisa-data-challenge. The second part requires GBGPU with GPU access. The following information about GBGPU and its installement is a close version of https://github.com/mikekatz04/GBGPU.

GBGPU is a GPU-accelerated version of the FastGB waveform which has been developed by Neil Cornish, Tyson Littenberg, Travis Robson, and Stas Babak. It computes gravitational waveforms for Galactic binary systems observable by LISA using a fast/slow-type decomposition. For more details on the original construction of FastGB see arXiv:0704.1808.

The current version of the code is very closely related to the implementation of FastGB in the LISA Data Challenges' Python code package. The waveform code is entirely Python-based. It is about 1/2 the speed of the full C version, but much simpler in Python for right now. There are also many additional functions including fast likelihood computations for individual Galactic binaries, as well as fast C-based methods to combine waveforms into global fitting templates.

The code is CPU/GPU agnostic. CUDA and NVIDIA GPUs are required to run these codes for GPUs.

See the documentation for more details. This code was designed for (# TODO: add new arxiv number). If you use any part of this code, please cite (# TODO: add new arxiv number), its Zenodo page, arXiv:0704.1808, and arXiv:1806.00500.

Prerequisites

To install this software for CPU usage, you need gsl >2.0, Python >3.4, and NumPy. We generally recommend installing everything, including gcc and g++ compilers, in the conda environment as is shown in the examples here. This generally helps avoid compilation and linking issues. If you use your own chosen compiler, you may need to add information to the setup.py file.

To install this software for use with NVIDIA GPUs (compute capability >2.0), you need the CUDA toolkit and CuPy. The CUDA toolkit must have cuda version >8.0. Be sure to properly install CuPy within the correct CUDA toolkit version. Make sure the nvcc binary is on $PATH or set it as the CUDAHOME environment variable.

Installing

  1. Install Anaconda if you do not have it.

  2. Create a virtual environment. Note: There is no available conda compiler for Windows. If you want to install for Windows, you will probably need to add libraries and include paths to the setup.py file.

conda create -n ldc-gpu -c conda-forge gcc_linux-64 gxx_linux-64 gsl numpy Cython scipy h5py matplotlib python=3.9
conda activate ldc-gpu
If on MACOSX, substitute `gcc_linux-64` and `gxx_linus-64` with `clang_osx-64` and `clangxx_osx-64`.
  1. If using GPUs, use pip to install cupy and make sure you have cudatoolkit installed. If you have cuda version 11, for example:
conda install -c conda-forge cudatoolkit=11.2.2 cudnn=8.1.0
pip install cupy-cuda11x
  1. Install requirements and run install. Make sure CUDA is on your PATH.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/
pip install -r requirements.txt
python setup.py install

ldc-gb's People

Contributors

mlejeune avatar stefanstrub avatar vallis avatar stasbabak avatar sylvainmarsat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.