Skip to main content

Accelerating gravitational wave template generation with machine learning.

Project description

CI Pipeline for mlgw_bns Documentation Status PyPI version Code style: black Coverage Status Downloads

Machine Learning for Gravitational Waves from Binary Neutron Star mergers

This package's purpose is to speed up the generation of template gravitational waveforms for binary neutron star mergers by training a machine learning model on a dataset of waveforms generated with some physically-motivated surrogate.

It is able to reconstruct them with mismatches lower than 1/10000, with as little as 1000 training waveforms; the accuracy then steadily improves as more training waveforms are used.

Currently, the only model used for training is TEOBResumS, but it is planned to introduce the possibility to use others.

The documentation can be found here.

Installation

To install the package, use

pip install mlgw-bns

For more details see the documentation.

Changelog

Changes across versions are documented since version 0.10.1 in the CHANGELOG.

Inner workings

The main steps taken by mlgw_bns to train on a dataset are as follows:

  • generate the dataset, consisting of EOB waveforms
  • decompose the Fourier transforms of the waveforms into phase and amplitude
  • downsample the dataset to a few thousand points
  • compute the residuals of the EOB waveforms from PN ones
  • apply a PCA to reduce the dimensionality to a few tens of real numbers
  • train a neural network on the relation between the waveform parameters and the PCA components

After this, the model can reconstruct a waveform within its parameter space, resampled at arbitrary points in frequency space.

In several of the training steps data-driven optimizations are performed:

  • the points at which the waveforms are downsampled are not uniformly chosen: instead, a greedy downsampling algorithm determines them
  • the hyperparameters for the neural network are optimized, according to both the time taken for the training and the estimated reconstruction error, also varying the number of training waveforms available.

Project details


Download files

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

Source Distribution

mlgw_bns-0.12.1.tar.gz (2.8 MB view details)

Uploaded Source

Built Distribution

mlgw_bns-0.12.1-py3-none-any.whl (2.8 MB view details)

Uploaded Python 3

File details

Details for the file mlgw_bns-0.12.1.tar.gz.

File metadata

  • Download URL: mlgw_bns-0.12.1.tar.gz
  • Upload date:
  • Size: 2.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.9.11 Linux/5.15.0-10052-tuxedo

File hashes

Hashes for mlgw_bns-0.12.1.tar.gz
Algorithm Hash digest
SHA256 852510de4e34851952bee735ab737a5e7fe85523383042b4c62eeac6429c19d7
MD5 84cd7500b040ba1db0780266703aed6f
BLAKE2b-256 f9a1b936b51c65871810095e26c95a3feb8bd29c6819dbd67dcd44142cc22e83

See more details on using hashes here.

File details

Details for the file mlgw_bns-0.12.1-py3-none-any.whl.

File metadata

  • Download URL: mlgw_bns-0.12.1-py3-none-any.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.9.11 Linux/5.15.0-10052-tuxedo

File hashes

Hashes for mlgw_bns-0.12.1-py3-none-any.whl
Algorithm Hash digest
SHA256 467cca984120a087727a2d910532e9cda4ed2b1e3aa863068a61d9259aecf53d
MD5 e22be82f1220efd1181121cf8970baa8
BLAKE2b-256 24288fc36a1605e24fef30f16db7ba58926edea2ba99061f5ab4ac929256a63c

See more details on using hashes here.

Supported by

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