Glitch model for events in the GWTC-3 catalog that used either BayesWave glitch subtraction or linear noise subtraction. Each data file for events processed with BayesWave contain three channels: 1) the calibrated strain data, including any glitches that are present 2) a model of the glitches, produced using the BayesWave algorithm 3) the calibrated data with the glitch model subtracted, used for parameter estimation Each data file for events processed with linear noise subtraction contain one channel: 1) the calibrated data with the glitch linearly subtracted, used for parameter estimation H1 data for events GW191109_010717, GW191113_071753, GW191127_050227, and GW191219_163120 was generated with BayesWave. The names and sample rates of the channels in these files are 1) H1:DCS-CALIB_STRAIN_CLEAN_SUB60HZ_C01 16384 2) H1:DCS-CALIB_STRAIN_CLEAN_SUB60HZ_C01_glitch 16384 3) H1:DCS-CALIB_STRAIN_CLEAN_SUB60HZ_C01_T1700406_v4 16384 L1 data for events GW191109_010717, GW191219_16312, GW200105_162426, and GW200115_042309 was generated with BayesWave. The names and sample rates of the channels in these files are 1) L1:DCS-CALIB_STRAIN_CLEAN_SUB60HZ_C01 16384 2) L1:DCS-CALIB_STRAIN_CLEAN_SUB60HZ_C01_glitch 16384 3) L1:DCS-CALIB_STRAIN_CLEAN_SUB60HZ_C01_T1700406_v4 16384 V1 data for event GW191105_143521 was generated with BayesWave. The names and sample rates of the channels in this file are 1) V1:Hrec_hoft_16384Hz 16384 2) V1:Hrec_hoft_16384Hz_glitch 16384 3) V1:Hrec_hoft_16384Hz_T1700406_v4 16384 L1 data for event GW200129_065458 was generated with linear noise subtraction. The names and sample rates of the channel in this file is 1) L1:DCS-CALIB_STRAIN_CLEAN_SUB60HZ_C01_P1800169_v4 16384
from gwpy.timeseries import TimeSeriesDict
import matplotlib
%matplotlib inline
# channel and file information for event GW191109_010717
channels = ['H1:DCS-CALIB_STRAIN_CLEAN_SUB60HZ_C01',
'H1:DCS-CALIB_STRAIN_CLEAN_SUB60HZ_C01_glitch',
'H1:DCS-CALIB_STRAIN_CLEAN_SUB60HZ_C01_T1700406_v4']
data_dict = TimeSeriesDict.read('H-H1_HOFT_CLEAN_SUB60HZ_C01_T1700406_v4-1257296641-3327.gwf',channels)
print(data_dict['H1:DCS-CALIB_STRAIN_CLEAN_SUB60HZ_C01'])
TimeSeries([-5.67948818e-20, -7.19379566e-20, -8.49401435e-20, ..., -1.43077465e-19, -1.65978143e-19, -1.64915300e-19] unit: dimensionless, t0: 1257296641.0 s, dt: 6.103515625e-05 s, name: H1:DCS-CALIB_STRAIN_CLEAN_SUB60HZ_C01, channel: H1:DCS-CALIB_STRAIN_CLEAN_SUB60HZ_C01)
# crop the data around the glitch (make a copy)
gps_glitch = 1257296853.7
data_dict_cropped = data_dict.copy().crop(gps_glitch-1.5,gps_glitch+1.5)
# plot all data in the frame file
plot = data_dict_cropped.plot()
ax = plot.gca()
ax.legend()
ax.set_ylabel('[strain]')
plot.show()
# the y-scale is too large to see the glitch model,
# and the green deglitched data lie right on top of the blue original data.
# plot only the glitch model
plot = data_dict_cropped['H1:DCS-CALIB_STRAIN_CLEAN_SUB60HZ_C01_glitch'].plot(label='L1:DCS-CALIB_STRAIN_CLEAN_SUB60HZ_C01_glitch')
ax = plot.gca()
ax.legend()
ax.set_ylabel('[strain]')
plot.show()
# plot a spectrogram the original data using the q-transform
qscan = data_dict['H1:DCS-CALIB_STRAIN_CLEAN_SUB60HZ_C01']\
.crop(gps_glitch-32,gps_glitch+32)\
.q_transform(outseg=(gps_glitch-1, gps_glitch+1), qrange=(20,20))
plot = qscan.plot(figsize=(12,4))
ax = plot.gca()
ax.set_xscale('seconds')
ax.set_yscale('log')
ax.set_ylim(10, 500)
ax.set_ylabel('Frequency [Hz]')
ax.grid(True, axis='y', which='both')
ax.colorbar(cmap='viridis', label='Normalized energy',vmin=0,vmax=25)
plot.show()
# plot a spectrogram of the data with the glitch subtracted using the q-transform
qscan = data_dict['H1:DCS-CALIB_STRAIN_CLEAN_SUB60HZ_C01_T1700406_v4']\
.crop(gps_glitch-32,gps_glitch+32)\
.q_transform(outseg=(gps_glitch-1, gps_glitch+1), qrange=(20,20))
plot = qscan.plot(figsize=(12,4))
ax = plot.gca()
ax.set_xscale('seconds')
ax.set_yscale('log')
ax.set_ylim(10, 500)
ax.set_ylabel('Frequency [Hz]')
ax.grid(True, axis='y', which='both')
ax.colorbar(cmap='viridis', label='Normalized energy',vmin=0,vmax=25)
plot.show()