Signal Visibility Reduction in Spectrograms Following Whitening Process (PyCBC)

Dear all,

I am currently using PyCBC to simulate gravitational wave data and have encountered an output related to spectrogram that I would like to better understand.

Enclosed are three spectrogram images for your perusal:

  1. The first image illustrates the spectrogram generated without the application of whitening or band-pass filtering, where the signal is clearly visible.
  2. The subsequent images depict the results after implementing whitening and band-pass filtering processes, where, intriguingly, the signal seems to vanish.

I have utilized the noise data from the LIGO website, and I find it quite strange that the signal disappears after the whitening process. Could you please share your thoughts on this?

Best regards,
Elahe



Hi Elahe:
It seems that you’re suffering from whitening.
Can you tell us how do you perform the whitening? Since the motivation of whitening is to mitigate the effect of instrumental noise. So you should select a stationary segment near the data and then estimate your PSD on it, then perform the whitening on the data. (I suppose you’re whitening with the data contains the signal which will mitigate the signal itself)

BTW, if you’re using gwpy package, I mean gwpy timeseries, their q_transform and spectrogram has a normalization( I’ve mentioned this in a thread about spectrogram) on the time-frequency plot which is pretty similar to the whitening of the data, so one might not be able to find much difference between them. A suggestion is write your own q-transform of spectrogram plot without applying the normalization strategy to see the differences.

Hello Barry,

Thank you for your detailed explanation. Upon reviewing the code, I noticed that the amplitude of the generated signal is larger than that of the noise. I’m not sure where I might have made a mistake. Here is the code:

params = dict(
wf_approximant=“SEOBNRv4” ,
mass_1=36,
mass_2=29,
luminosity_distance = 400,
f_start=20,
f_ref=20,
sample_rate=2048
)
def strain_T(params):
hp, hc = get_td_waveform(
approximant=params[‘wf_approximant’],
mass1=params[‘mass_1’],
mass2=params[‘mass_2’],
distance=params[‘luminosity_distance’],
f_lower=params[‘f_start’],
f_ref=params[‘f_ref’],
delta_t=1.0 / params[‘sample_rate’]
)
return hp, hc

hf=hp.to_frequencyseries()
freq=hf.sample_frequencies
flen=len(freq)
delta_f=hf.delta_f
low_frequency_cutoff=20
delta_t=1.0/2048

psd = pycbc.psd.aLIGODesignSensitivityP1200087(flen, delta_f, low_frequency_cutoff)
noise = pycbc.noise.noise_from_psd(len(hp.data), delta_t, psd, seed=127)
noise.start_time=hp.start_time
data= hp+noise

Once this issue is resolved, I will proceed with applying the whitening process as you suggested.

It can be the problem of parameter selection.
An idea is:

  1. Obtain the PSD of the current noise
  2. Use the noise PSD to calculate the current SNR
  3. set new_sig = sig/current_SNR * tartget_SNR to obtain a signal with specified SNR

Hi,

Yes, Thanks so much for your time and help.

1 Like