Gravitational waves (GWs) are ripples in the spacetime fabric that are generated during some of the most extreme events that happen in the Universe, like the explosion of a supernova or the collision of black holes (BHs) and neutron stars. These waves travel through spacetime at the speed of light until they eventual reach the Earth. There are three sites on planet Earth where extremely sensitive detectors lie waiting for a GW to pass through them, reveling its passage: the two LIGO detector in Hanford and Livingston (USA) and the VIRGO detector near Pisa (Italy).
The detectors work like this (though I'm simplifying a lot!): a laser beam is reflected between two mirrors, which are suspended to isolate them from the ground movements. Knowing the distance between the mirrors and the speed of the laser beam (speed of light), one known how long it should take for the laser beam to do a round trip from a mirror to the next one and back to the first one. When a GW passes through the detector, its effect is that of slightly reducing and incresing - in an oscillatory behaviour - the distance between the mirrors. Thus, a GW can be detected when an oscillatory increase and decrease of the laser travel time between the mirrors is revealed.
To give an example of the incredible sensitivity that is needed to detect the passage of a GW, I'm quoting Wikipedia: "... the waves given off by the cataclysmic final merger of GW150914 reached Earth after travelling over a billion light-years, as a ripple in spacetime that changed the length of a 4 km LIGO arm by a thousandth of the width of a proton, proportionally equivalent to changing the distance to the nearest star outside the Solar System by one hair's width ...".
Unfortunately, all detectors suffer from noise. In the case of GW detectors, being astonishingly sensitive, they continuously register noise that comes from various natural and human activities, like earthquakes, thunderstorms and even traffic on the nearby highway! For this reason, GWs passing through the detectors are completely buried inside the detector noise, and are totally unrecognisable by the human eye.
Fortunately, there exist a quite old technique called "matched filter" which allows one to detect the presence of a template signal (i.e. what we expect the GW to be like) in an unknown signal (i.e. the signal registered by the detector, that is dominated by noise). However, this technique requires first the computation and storage of hundreds of thousand of templates, and then the computation of the matched filter for all templates stored for all signal registered by the detector. Thus, it is extremely time consuming and computationally expensive.
For this reason, in the recent years much effort has been devoted to the development of neural networks to discover the presence of a GW signal inside the noise registered by the detector. This is thanks to the scalability of neural networks, their ability to generalise to previously unseen patterns and their speed once training has been completed.
This notebook is used to define, train and test a convolutional neural network that detects a gravitational wave (GW) signal buried in detector noise.
This repository contains two main files:
-
data_generator.ipynb
generates a list of GW signals generated by the merger of binary BHs, for various masses of the black holes and distances to Earth, and saves them in either TFRecords files, ready to be read by Tensorflow, or in text files. Data is split into training/validation set - computed in a parallel way and saved in.tfrecords
files - and test set - computed serially and saved in.txt
files. The data generation process is done using thepycbc
library. Data files can be found at this link. -
my_cnn_v11.ipynb
is used to define, train and test a convolutional neural network that detects a gravitational wave (GW) signal buried in detector noise.