Skip to main content

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

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.

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.

Release files for mlgw_bns 0.10.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mlgw_bns 0.10.0
File Size Uploaded
mlgw_bns-0.10.0.tar.gz 1.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for mlgw_bns 0.10.0
File Interpreter ABI Platform
mlgw_bns-0.10.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.8 MB

Release files / mlgw_bns-0.10.0.tar.gz

Download URL mlgw_bns-0.10.0.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
1535cf2b771c3c1beb6041f3ab1892d1f2a061b0f34eb1a3d5c9e68977804683
BLAKE2b-256 checksum
How to use checksums
2d95634f015d942d0838791dff6112db154fa959f7314af309e88d0ccec0643e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.8.10 Linux/5.13.0-10039-tuxedo

Release files / mlgw_bns-0.10.0-py3-none-any.whl

Download URL mlgw_bns-0.10.0-py3-none-any.whl
Size 1.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
3713d9cef1a77570a593a385dc7a5227fd8f0a40c954c7ce20550ec29ba3bb8e
BLAKE2b-256 checksum
How to use checksums
91c0e58d53b8118d9ce599c33c81abffe27a41fdc2b7280e0b5cc7dabc8bfdd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.8.10 Linux/5.13.0-10039-tuxedo
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page