Update home authored by Wei Changfeng's avatar Wei Changfeng
# 1.Process # 1.Process
## (1) adjust amplitude ## (1) Adjust amplitude
BBH waveform generated from Bilby can't tell the distance. We adjust its amplitude the same to Korean waveform's, then we can infer BBH waveform's distance(since we know all information of Korean waveform). BBH waveform generated from Bilby can't tell the distance. We adjust its amplitude the same to Korean waveform's, then we can infer BBH waveform's distance(since we know all information of Korean waveform).
## (2) make injection ## (2) Make injection
## (3) plot the Amplitude Spectral Density (ASD) ## (3) Plot the Amplitude Spectral Density (ASD)
Plotting these data in the Fourier domain gives us an idea of the frequency content of the data. A way to visualize the frequency content of the data is to plot the amplitude spectral density, ASD. Plotting these data in the Fourier domain gives us an idea of the frequency content of the data. A way to visualize the frequency content of the data is to plot the amplitude spectral density, ASD. The ASDs are the square root of the power spectral densities (PSDs), which are averages of the square of the fast fourier transforms (FFTs) of the data. They are an estimate of the "strain-equivalent noise" of the detectors versus frequency, which limit the ability of the detectors to identify GW signals.
The ASDs are the square root of the power spectral densities (PSDs), which are averages of the square of the fast fourier transforms (FFTs) of the data.
They are an estimate of the "strain-equivalent noise" of the detectors versus frequency, which limit the ability of the detectors to identify GW signals.
They are in units of strain/rt(Hz).
![asd_interp](uploads/31d664954ede2ba2cf1a51d85b0de8c0/asd_interp.png) ![asd_interp](uploads/31d664954ede2ba2cf1a51d85b0de8c0/asd_interp.png)
Then we consider reasonable frequency range from LIGO's detection. On the one hand, the limit of the seismic isolation systems designed by aLIGO is 10Hz, which is actually not good for low frequency noise below 20Hz. On the other hand, according to Nyquist–Shannon sampling theorem, for half of the sampling rate(128Hz) and above, signal's frequency is meaningless. Then we consider reasonable frequency range from LIGO's detection. On the one hand, the limit of the seismic isolation systems designed by aLIGO is 10Hz, which means signal doesn't have good quality for low frequency noise below 20Hz. On the other hand, according to Nyquist–Shannon sampling theorem, for half of the sampling rate(128Hz) and above, signal's frequency is meaningless.
Then we get a new plot: Therefore, set f_min = 20Hz, f_max = 128Hz, we get a new plot:
![asd_interp_02](uploads/e893aab5c4a32024daddda50754c86e6/asd_interp_02.png) ![asd_interp_02](uploads/e893aab5c4a32024daddda50754c86e6/asd_interp_02.png)
## (4) whiten signal $$\hat{x}\left ( f \right )=\int_{-\infty }^{\infty } e^{-2\pi ift}x(t)dt$$
Whitening signal means dividing it by the ASD in the fourier domain, suppressing the extra noise at low frequencies and at the spectral lines, to better see the weak signals in the most sensitive band. ## (4) Whiten signal
> The way forward is to whiten the signal generations and then add white noise to it. So we need to know what noise curve VItamin is expecting for the whitening.
> For Vitamin we would require the data to match the properties fo the training data. For Vitalmin box, We would expect the input data to then have whitened signal,Gaussian white noise of unit variance and zero mean. Whitening signal means dividing it by the ASD in the fourier domain, suppressing the extra noise at low frequencies and at the spectral lines, to better see the weak signals in the most sensitive band.
It’s important that your signals are whitened in the same way. We would expect the input data to then have whitened signal + Gaussian white noise of unit variance and zero mean. ```
def whiten_signal(signal, asd):
> Hunter is using the aLIGO zero detuning, high power design sensitivity PSD found at the link below under the file titled "aLIGO_ZERO_DET_high_P_psd.txt". For Virgo the file is "AdV_psd.txt". These are the default noise curves used by bilby. signal_rfft = np.fft.rfft(signal)
https://git.ligo.org/lscsoft/bilby/-/tree/master/bilby/gw/detector/noise_curves whitened_signal_rfft = signal_rfft / asd
whitened_signal = np.fft.irfft(whitened_signal_rfft, n=Nt)
return whitened_signal
```
We use aLIGO zero detuning, high power design sensitivity PSD found at the link below under the file titled "aLIGO_ZERO_DET_high_P_psd.txt". For Virgo the file is "AdV_psd.txt". These are the default noise curves used by bilby.
> https://git.ligo.org/lscsoft/bilby/-/tree/master/bilby/gw/detector/noise_curves
For example, we whiten a signal which generated from "h_m16_L0.18_l2m2_r300.dat". For example, we whiten a signal which generated from "h_m16_L0.18_l2m2_r300.dat".
First plot the orignal data: First plot the orignal data:
![original_signal](uploads/e9a54640743b17a507aadf4d0aa3f950/original_signal.png) ![original_signal](uploads/eb18b45e8ebc80c2fc820d4307d603df/original_signal.png)
Once it get whitened, the plot goes like: Once it get whitened, the plot goes like:
![whitened_signal](uploads/df67472595b6315c7a83eb00aa0379ae/whitened_signal.png) ![whitened_signal](uploads/8cec6c288e9b83847396dc85d5fcecc7/whitened_signal.png)
The resulting time series is no longer in units of strain, now in units of "sigmas" away from the mean. The resulting time series is no longer in units of strain, now in units of "sigmas" away from the mean.
## In terms of the machine learning side of things, the whitening is primarily done to normalise the data for input to the neural network. So long as you give the network signals with similar noise properties and priors as those it was trained on, it should function properly.
To calculate the PSD of the data, we choose an overlap and a window (common to all detectors) that minimizes "spectral leakage"
## (5)window...?
an overlap and a window to minimizes "spectral leakage"
# 2.Data # 2.Data
## (1)Korean merger wavform ## (1)Korean merger wavform
...@@ -51,12 +57,16 @@ To calculate the PSD of the data, we choose an overlap and a window (common to a ...@@ -51,12 +57,16 @@ To calculate the PSD of the data, we choose an overlap and a window (common to a
> y_data_noisefree == The noisefree waveform at each observatory with dimension (number of detectors, sampling frequency * duration). > y_data_noisefree == The noisefree waveform at each observatory with dimension (number of detectors, sampling frequency * duration).
# 3.Code # 3.Code
## (1)Adjust BBH waveform's amplitude the same to Korean waveform's. ## (1)Adjust BBH waveform's amplitude the same to Korean waveform's
https://gilsay.physics.gla.ac.uk/gitlab/wei.changfeng/weichangfeng_project/blob/master/adjust_amplitude.ipynb https://gilsay.physics.gla.ac.uk/gitlab/wei.changfeng/weichangfeng_project/blob/master/adjust_amplitude.ipynb
## (2)Make new injections from the waveforms (from Daniel). ## (2)Make new injections from the waveforms (from Daniel)
https://gilsay.physics.gla.ac.uk/gitlab/hype-e/waveforms/blob/master/notebooks/making-injections.ipynb https://gilsay.physics.gla.ac.uk/gitlab/hype-e/waveforms/blob/master/notebooks/making-injections.ipynb
## (3)Plot waveform genreated by making-injections.ipynb. ## (3)Plot waveform genreated by making-injections.ipynb
https://gilsay.physics.gla.ac.uk/gitlab/wei.changfeng/weichangfeng_project/blob/master/plot_waveform.ipynb https://gilsay.physics.gla.ac.uk/gitlab/wei.changfeng/weichangfeng_project/blob/master/plot_waveform.ipynb
## (4)Whiten signal
https://gilsay.physics.gla.ac.uk/gitlab/wei.changfeng/weichangfeng_project/blob/master/whiten_signal.ipynb
# 4.Issue # 4.Issue
## ##
\ No newline at end of file