Import packages

In [1]:
import h5py
import numpy
import pandas
import scipy

from gwpy.timeseries import TimeSeries
from gwpy.spectrogram import Spectrogram
from gwpy.table import EventTable
from gwpy.segments import DataQualityFlag

Figure 1

In [2]:
# figure generated using mermaid
flowchart LR start[Record interferometer data] final[Publish results] subgraph one[Instrumental Investigations] a2(Identify
instrumental problem) a3(Identify source of
instrumental problem) a4(Change detector
configuration) a2-->a3 a3-->a4 a4-->a2 end subgraph two[Searches for Transient Gravitational Waves] b2(Identify data quality
problem) b3(Create data quality
product) b4(Search data for
gravitational wave candidates) b5(Event validation) b2-->b3 b3-->b4 b4-->b2 b4-->b5 end subgraph three[Searches for Persistent Gravitational Waves] c2(Identify data quality
problem) c3(Create data quality
product) c4(Search data for
gravitational wave candidates) c2-->c3 c3-->c4 c4-->c2 end one-->two start-->one start-->two start-->three one-->three three-->final two-->final

Figure 2

Range subfigure

In [3]:
range_file = h5py.File('fig2-O2_O3_range.hdf','r')
In [4]:
print(range_file.keys())
print(range_file['O2'].keys())
print(range_file['O2/LIGO-Hanford'].keys())
<KeysViewHDF5 ['O2', 'O3']>
<KeysViewHDF5 ['LIGO-Hanford', 'LIGO-Livingston', 'Virgo']>
<KeysViewHDF5 ['range_Mpc', 'time_weeks']>
In [5]:
o2_range_mpc_hanford = range_file['O2/LIGO-Hanford/range_Mpc'][:]
o2_range_times_hanford = range_file['O2/LIGO-Hanford/time_weeks'][:]

o3_range_mpc_hanford = range_file['O3/LIGO-Hanford/range_Mpc'][:]
o3_range_times_hanford = range_file['O3/LIGO-Hanford/time_weeks'][:]
In [6]:
range_file.close()

ASD subfigure

In [7]:
asd_file = h5py.File('fig2-O2_O3_asd.hdf','r')
In [8]:
print(asd_file.keys())
print(asd_file['O2'].keys())
print(asd_file['O2/LIGO-Hanford'].keys())
<KeysViewHDF5 ['O2', 'O3']>
<KeysViewHDF5 ['LIGO-Hanford', 'LIGO-Livingston', 'Virgo']>
<KeysViewHDF5 ['freq_Hz', 'strain_per_sqrt_Hz']>
In [9]:
o2_asd_strain_hanford = asd_file["O2/LIGO-Hanford/strain_per_sqrt_Hz"][:]
o2_asd_freq_hanford = asd_file['O2/LIGO-Hanford/freq_Hz'][:]

o3_asd_strain_hanford = asd_file["O3/LIGO-Hanford/strain_per_sqrt_Hz"][:]
o3_asd_freq_hanford = asd_file['O3/LIGO-Hanford/freq_Hz'][:]
In [10]:
asd_file.close()

Figure 3

In [11]:
fig3_strain_file = h5py.File('fig3-H1-HOFT_SECTRO_NORM-1240279218-21600.hdf5','r')
fig3_sqz_file = h5py.File('fig3-H1-SQZ_SECTRO_NORM-1240279218-21600.hdf5','r')

fig3_spectrogram_strain = Spectrogram.read(fig3_strain_file)
fig3_spectrogram_sqz = Spectrogram.read(fig3_sqz_file)

fig3_strain_file.close()
fig3_sqz_file.close()
In [12]:
print(fig3_spectrogram_strain)
print(fig3_spectrogram_sqz)
Spectrogram([[1.94485086, 1.94419054, 1.73395937, ...,
              1.13371532, 0.99295618, 0.86739468],
             [1.61029193, 1.60742588, 1.48873022, ...,
              0.95317417, 1.06838809, 1.13407146],
             [0.83077857, 0.83505618, 0.94012746, ...,
              0.80199913, 1.1165587 , 1.08882683],
             ...,
             [1.14710505, 1.1442494 , 1.26856621, ...,
              0.98088888, 1.00863993, 1.11858132],
             [0.91354127, 0.91695587, 0.65887228, ...,
              1.03326713, 1.09144492, 0.88447844],
             [1.03126873, 1.02760612, 1.12234473, ...,
              0.94944108, 1.07004968, 0.52920814]]
            unit: dimensionless,
            name: H1:DCS-CALIB_STRAIN_CLEAN_C01,
            epoch: 1240279218.0,
            channel: H1:DCS-CALIB_STRAIN_CLEAN_C01,
            x0: 1240279218.0 s,
            dx: 16.0 s,
            xindex: [1.24027922e+09 1.24027923e+09 1.24027925e+09 ... 1.24030077e+09
                     1.24030079e+09 1.24030080e+09] s,
            y0: 0.0 Hz,
            dy: 0.5 Hz,
            yindex: [0.000e+00 5.000e-01 1.000e+00 ... 5.110e+02 5.115e+02 5.120e+02] Hz)
Spectrogram([[1.2760592 , 0.7108241 , 0.7927919 , ...,
              0.9947461 , 1.0494702 , 0.9577479 ],
             [0.91807026, 0.903312  , 1.2258853 , ...,
              1.0016792 , 1.2192109 , 1.2846124 ],
             [0.7231522 , 0.70790595, 0.9420485 , ...,
              0.7415293 , 0.76733863, 0.80381465],
             ...,
             [1.1170355 , 1.121321  , 0.79836214, ...,
              1.1549791 , 1.3622006 , 1.1925998 ],
             [0.9122504 , 1.1294322 , 1.2470531 , ...,
              1.082049  , 1.4935596 , 1.7421203 ],
             [0.72327775, 0.8015756 , 0.9257477 , ...,
              1.3249825 , 1.1592752 , 0.52378523]]
            unit: dimensionless,
            name: H1:SQZ-OMC_TRANS_RF3_Q_NORM_DQ,
            epoch: 1240279218.0,
            channel: H1:SQZ-OMC_TRANS_RF3_Q_NORM_DQ,
            x0: 1240279218.0 s,
            dx: 16.0 s,
            xindex: [1.24027922e+09 1.24027923e+09 1.24027925e+09 ... 1.24030077e+09
                     1.24030079e+09 1.24030080e+09] s,
            y0: 0.0 Hz,
            dy: 0.5 Hz,
            yindex: [0.0000e+00 5.0000e-01 1.0000e+00 ... 1.0230e+03 1.0235e+03
                     1.0240e+03] Hz)

Figure 4

In [13]:
fig4_blip_data = TimeSeries.read('fig4-blip-STRAIN_DATA-1258745539-60.hdf')
print(fig4_blip_data)
TimeSeries([7.79770190e-19, 7.05154979e-19, 5.57414620e-19, ...,
            4.34560795e-19, 2.22719722e-19, 1.52841761e-20]
           unit: strain,
           t0: 1258745539.9869995 s,
           dt: 6.103515625e-05 s,
           name: L1:DCS-CALIB_STRAIN_CLEAN_C01,
           channel: L1:DCS-CALIB_STRAIN_CLEAN_C01)
In [14]:
fig4_ex_loud_data = TimeSeries.read('fig4-extremely_loud-STRAIN_DATA-1266658476-60.hdf')
print(fig4_ex_loud_data)
TimeSeries([ 1.41272952e-18,  1.41694545e-18,  1.43466017e-18,
            ..., -3.42129284e-19, -3.10757135e-19,
            -3.37158009e-19]
           unit: strain,
           t0: 1266658476.9099731 s,
           dt: 6.103515625e-05 s,
           name: L1:DCS-CALIB_STRAIN_CLEAN_C01,
           channel: L1:DCS-CALIB_STRAIN_CLEAN_C01)
In [15]:
fig4_slow_scat_data = TimeSeries.read('fig4-slow_scattering-STRAIN_DATA-1260189587-60.hdf')
print(fig4_slow_scat_data)
TimeSeries([-2.24692386e-19, -2.37414180e-19, -2.37977779e-19,
            ...,  4.51559619e-19,  4.56836211e-19,
             4.47736572e-19]
           unit: strain,
           t0: 1260189587.6879883 s,
           dt: 6.103515625e-05 s,
           name: L1:DCS-CALIB_STRAIN_CLEAN_C01,
           channel: L1:DCS-CALIB_STRAIN_CLEAN_C01)
In [16]:
fig4_fast_scat_data = TimeSeries.read('fig4-fast_scattering-STRAIN_DATA-1268452970-60.hdf')
print(fig4_fast_scat_data)
TimeSeries([-1.11151968e-18, -1.10197577e-18, -1.11573690e-18,
            ...,  4.89058867e-19,  5.03058980e-19,
             4.97052756e-19]
           unit: strain,
           t0: 1268452970.796997 s,
           dt: 6.103515625e-05 s,
           name: L1:DCS-CALIB_STRAIN_CLEAN_C01,
           channel: L1:DCS-CALIB_STRAIN_CLEAN_C01)

Figure 5

In [17]:
fig5_glitch_rate_file = h5py.File('fig5-scattering_glitch_rate.hdf5','r')

print(fig5_glitch_rate_file.keys())

fig5_l1_pre = fig5_glitch_rate_file['L1_pre'][:]
fig5_l1_post = fig5_glitch_rate_file['L1_post'][:]
fig5_h1_pre = fig5_glitch_rate_file['H1_pre'][:]
fig5_h1_post = fig5_glitch_rate_file['H1_post'][:]
fig5_labels_text = fig5_glitch_rate_file['labels'][:]

fig5_glitch_rate_file.close()
<KeysViewHDF5 ['H1_post', 'H1_pre', 'L1_post', 'L1_pre', 'labels']>
In [18]:
fig5_strain_data = TimeSeries.read('fig5-STRAIN_DATA-1262389396-300.hdf')
print(fig5_strain_data)
TimeSeries([3.72785473e-19, 3.22423737e-19, 3.01529277e-19, ...,
            1.01456138e-18, 9.98156234e-19, 9.90192871e-19]
           unit: strain,
           t0: 1262389396.0 s,
           dt: 6.103515625e-05 s,
           name: L1:DCS-CALIB_STRAIN_CLEAN_C01,
           channel: L1:DCS-CALIB_STRAIN_CLEAN_C01)
In [19]:
fig5_fringe_file = h5py.File('fig5-fring_data.hdf','r')

print(fig5_fringe_file.keys())
print(fig5_fringe_file['fringe_data'].keys())

fig5_fringe_data = fig5_fringe_file['fringe_data/harmonic_1'][:]
fig5_fringe_times = fig5_fringe_file['fringe_data/times'][:]

fig5_fringe_file.close()

print(fig5_fringe_data)
print(fig5_fringe_times)
<KeysViewHDF5 ['fringe_data']>
<KeysViewHDF5 ['harmonic_1', 'harmonic_2', 'harmonic_3', 'harmonic_4', 'times']>
[16.737282  16.831556  16.925829  ...  1.5476313  1.3441371
  1.1406429]
[-30.         -29.99609375 -29.9921875  ...  29.98828125
  29.9921875   29.99609375]

Figure 6

In [20]:
fig6_blrms_file = h5py.File('fig6-blrms_data.hdf','r')

print(fig6_blrms_file.keys())
print(fig6_blrms_file['blrms'].keys())

fig6_blrms_data_CS = fig6_blrms_file['blrms/CS'][:]
fig6_blrms_times = fig6_blrms_file['blrms/times'][:]

fig6_blrms_file.close()

print(fig6_blrms_data_CS)
print(fig6_blrms_times)
<KeysViewHDF5 ['blrms']>
<KeysViewHDF5 ['CS', 'EX', 'EY', 'times']>
[0.17497517 0.18699779 0.16678189 0.16212057 0.23436825
 0.22491449 0.18729366 0.22232861 0.15692358 0.18915456
 0.22318698 0.18777767 0.18827003 0.21577639 0.19885134
 0.22421985 0.2510531  0.19453773 0.17841062 0.18170984
 0.16683591 0.18430894 0.17411582 0.23403684 0.22453829
 1.37318142 2.43631797 2.37916014 2.35366111 1.97069298
 1.00216144 0.85738771 0.88223178 0.79444653 0.80694266
 0.49470129 0.46687269 0.45315642 0.61760502 0.39198515
 0.57603314 0.48089375 0.68611134 0.62441857 0.55349393
 0.4213848  0.38513894 0.30930786 0.41005859 0.3912972
 0.23225472 0.32284697 0.30960257 0.31847675 0.32250012
 0.27081795 0.21855272 0.27247884 0.2874854  0.3373982
 0.18971277 0.27635576 0.2409201  0.23615752 0.21631645
 0.27204105 0.1942     0.24822876 0.28194067 0.29614641
 0.20420529 0.23892635 0.24181609 0.25946918 0.24197508
 0.22109548 0.22541164 0.17966778 0.26461605 0.19810369]
[ 0.   0.5  1.   1.5  2.   2.5  3.   3.5  4.   4.5  5.   5.5
  6.   6.5  7.   7.5  8.   8.5  9.   9.5 10.  10.5 11.  11.5
 12.  12.5 13.  13.5 14.  14.5 15.  15.5 16.  16.5 17.  17.5
 18.  18.5 19.  19.5 20.  20.5 21.  21.5 22.  22.5 23.  23.5
 24.  24.5 25.  25.5 26.  26.5 27.  27.5 28.  28.5 29.  29.5
 30.  30.5 31.  31.5 32.  32.5 33.  33.5 34.  34.5 35.  35.5
 36.  36.5 37.  37.5 38.  38.5 39.  39.5]
In [21]:
fig6_strain_data = TimeSeries.read('fig6-strain_data.hdf')
print(fig6_strain_data)
TimeSeries([-3.35540289e-19, -3.28767606e-19, -3.27300806e-19,
            ...,  4.46143649e-19,  4.16494668e-19,
             4.56752409e-19]
           unit: dimensionless,
           t0: 0.0 s,
           dt: 6.103515625e-05 s,
           name: L1:GDS-CALIB_STRAIN_CLEAN,
           channel: L1:GDS-CALIB_STRAIN_CLEAN)

Figure 7

In [22]:
fig7_coh_freqs,fig7_coh = numpy.loadtxt('fig7-mag-mag-HxLx.txt',unpack=True)
Nsegs=3433565
In [23]:
fig7_mag_coupling_files = [
    'fig7-H1_magnetic_coupling_20200114.txt',
    'fig7-H1_magnetic_coupling_20200128.txt',
    'fig7-H1_magnetic_coupling_20200204.txt',
    'fig7-H1_magnetic_coupling_20200218.txt',
    'fig7-H1_magnetic_coupling_20200303.txt',
    'fig7-H1_magnetic_coupling_20200324.txt'
    ]

fig7_dat = pandas.read_csv(fig7_mag_coupling_files[0])
fig7_measured_filter = fig7_dat['flag'] == 'Measured'
fig7_upper_limit_filter = fig7_dat['flag'] == 'Upper Limit'
fig7_measured_freqs_0 = fig7_dat['frequency'][fig7_measured_filter]
fig7_measured_vals_0 = numpy.abs(fig7_dat['factor'][fig7_measured_filter])
fig7_upper_limit_freqs_0 = fig7_dat['frequency'][fig7_upper_limit_filter]
fig7_upper_limit_vals_0 = numpy.abs(fig7_dat['factor'][fig7_upper_limit_filter])

Figure 8

In [24]:
fig8_trigger_file = 'fig8-H1-GDS-CALIB_STRAIN-ETMY-PCAL-TRIGS.xml.gz'
fig8_triggers = EventTable.read(fig8_trigger_file, tablename='sngl_burst',format='ligolw')

print(fig8_triggers)

fig8_triggers['time'] = fig8_triggers['peak_time'] + fig8_triggers['peak_time_ns']*1e-9
 amplitude  bandwidth central_freq ...   snr   start_time start_time_ns
----------- --------- ------------ ... ------- ---------- -------------
6.17723e-23 2649.6858    1374.4817 ... 5.50447 1176940254     165527105
3.18322e-22 101.03484     5673.367 ... 5.41437 1176940255     607909917
8.21361e-23 339.72943     1449.647 ... 5.27393 1176940255     978514909
8.35467e-23  565.8986    1339.4209 ...  5.3645 1176940258     431639909
1.05795e-22 4694.6987     2393.764 ... 8.42004 1176940259             0
3.87085e-23    1.6513     92.72502 ... 5.44982 1176940261     906250000
2.26843e-22  235.6438    3739.2388 ... 5.42565 1176940263     437500000
1.99979e-22  121.6282    3241.0256 ...  5.2598 1176940263     879394054
3.15776e-22 109.03583    5764.4443 ... 5.29668 1176940264     825195074
2.86452e-22  95.77849    5378.2095 ... 5.18726 1176940266     261718034
        ...       ...          ... ...     ...        ...           ...
2.52748e-22 134.90295    7030.0146 ... 5.45262 1176955478     720702886
   2.38e-22  915.2075    4283.5093 ... 5.27878 1176955482     893615007
1.92723e-23 4258.5645    5821.2007 ... 5.12049 1176955484     170897960
1.66766e-22  55.14446    3096.5042 ...  5.0556 1176955484     971678972
 2.6531e-22   46.6402     4931.385 ... 5.05926 1176955485     766601085
5.52634e-23  34.68612    469.62183 ...  5.6738 1176955488     117187023
2.77366e-22  122.8993     6901.114 ... 5.29741 1176955488     833496093
2.33333e-22  915.2075    4283.5093 ... 5.17527 1176955489     849121093
2.49465e-22 267.30798     4241.692 ... 5.13025 1176955490     156981945
6.26918e-23  10.07728    1065.4957 ... 5.05023 1176955492     226562023
2.52202e-22  42.43119    4486.3564 ... 5.09025 1176955493     958983898
Length = 7207 rows
In [25]:
fig8_oplev_data = TimeSeries.read('fig8-H1-SUS-ETMY_L3_OPLEV_SUM_OUT_DQ-1176946821-720.gwf',
                                 channel='H1:SUS-ETMY_L3_OPLEV_SUM_OUT_DQ')
print(fig8_oplev_data)

# BLRMS parameters
fig8_flower = 10
fig8_fupper = 50
fig8_step = 1
fig8_oplev_data_ = fig8_oplev_data.bandpass(fig8_flower, fig8_fupper, 
                                          fstop=[fig8_flower/2., fig8_fupper*1.5], 
                                          filtfilt=False, ftype='butter').rms(fig8_step)
TimeSeries([78921.836, 78922.26 , 78922.73 , ..., 78977.305,
            78977.95 , 78977.5  ]
           unit: NONE,
           t0: 1176946821.0 s,
           dt: 0.00390625 s,
           name: H1:SUS-ETMY_L3_OPLEV_SUM_OUT_DQ,
           channel: H1:SUS-ETMY_L3_OPLEV_SUM_OUT_DQ)
In [26]:
fig8_dq_segment_file = 'fig8-H1-DCH-ETMY_L3_OPLEV_BLRMS_GT65-1176946821-600.hdf5'

fig8_dq_segments = DataQualityFlag.read(fig8_dq_segment_file)

print(fig8_dq_segments)
<DataQualityFlag('H1:DCH-ETMY_L3_OPLEV_BLRMS_GT65:2',
                 known=[[1176946821 ... 1176947421)]
                 active=[[1176946842 ... 1176946845)
                         [1176946860 ... 1176946865)
                         [1176946869 ... 1176946871)
                       ...
                         [1176947388 ... 1176947390)
                         [1176947392 ... 1176947394)
                         [1176947395 ... 1176947397)]
                 description='ETMY oplev is causing low frequency glitches')>

Figure 9

In [27]:
fig9_histo_file = h5py.File('fig9-L1-HISTOGRAM-PYCBC-1239641067-693023.hdf','r')

print(fig9_histo_file.keys())

fig9_bins = fig9_histo_file["bins"][:]

fig9_raw_tot = fig9_histo_file["raw_hist_no_dq"][:]
fig9_raw_rem = fig9_histo_file["raw_hist_cat2"][:]

fig9_frac_tot = fig9_histo_file["norm_hist_no_dq"][:]
fig9_frac_rem = fig9_histo_file["norm_hist_cat2"][:]

fig9_histo_file.close()

print(fig9_bins)
print(fig9_raw_tot)
print(fig9_raw_rem)
print(fig9_frac_tot)
print(fig9_frac_rem)
<KeysViewHDF5 ['bins', 'norm_hist_cat2', 'norm_hist_no_dq', 'raw_hist_cat2', 'raw_hist_no_dq']>
[ 6.    6.25  6.5   6.75  7.    7.25  7.5   7.75  8.    8.25
  8.5   8.75  9.    9.25  9.5   9.75 10.   10.25 10.5  10.75
 11.   11.25 11.5  11.75 12.   12.25 12.5  12.75 13.  ]
[1.96918e+05 5.81310e+04 1.82880e+04 6.29200e+03 2.73000e+03
 1.20100e+03 7.06000e+02 4.07000e+02 2.43000e+02 1.73000e+02
 1.13000e+02 6.30000e+01 3.90000e+01 2.50000e+01 2.10000e+01
 1.20000e+01 1.20000e+01 6.00000e+00 7.00000e+00 0.00000e+00
 2.00000e+00 1.00000e+00 1.00000e+00 1.00000e+00 0.00000e+00
 1.00000e+00 1.00000e+00 0.00000e+00]
[1.60976e+05 4.23840e+04 1.15950e+04 3.33300e+03 1.22000e+03
 5.00000e+02 3.13000e+02 2.02000e+02 1.30000e+02 1.07000e+02
 7.80000e+01 5.00000e+01 2.90000e+01 2.10000e+01 1.70000e+01
 1.20000e+01 1.10000e+01 5.00000e+00 7.00000e+00 0.00000e+00
 2.00000e+00 1.00000e+00 1.00000e+00 1.00000e+00 0.00000e+00
 1.00000e+00 1.00000e+00 0.00000e+00]
[1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 0. 1.
 1. 1. 1. 0. 1. 1. 0.]
[0.81747733 0.72911183 0.63402231 0.52972028 0.44688645
 0.41631973 0.44334278 0.4963145  0.53497942 0.61849711
 0.69026549 0.79365079 0.74358974 0.84       0.80952381
 1.         0.91666667 0.83333333 1.         0.
 1.         1.         1.         1.         0.
 1.         1.         0.        ]

Figure 10

In [28]:
fig10_vt_file = h5py.File('fig10-vt_ratio_data.hdf','r')

print(fig10_vt_file.keys())
print(fig10_vt_file['ifar100yr'].keys())
print(fig10_vt_file['time_loss_error'].keys())

fig10_ifar100yr = fig10_vt_file['ifar100yr/vt_ratio'][:]
fig10_ifar100yr_error = fig10_vt_file['ifar100yr/vt_ratio_error'][:]

fig10_ifar1yr = fig10_vt_file['ifar1yr/vt_ratio'][:]
fig10_ifar1yr_error = fig10_vt_file['ifar1yr/vt_ratio_error'][:]

fig10_time_error_lower = fig10_vt_file['time_loss_error/error_lower_bound'][:]
fig10_time_error_upper = fig10_vt_file['time_loss_error/error_upper_bound'][:]

fig10_vt_file.close()

print(fig10_ifar100yr)
print(fig10_ifar100yr_error)
print(fig10_time_error_lower)
print(fig10_time_error_upper)
<KeysViewHDF5 ['ifar100yr', 'ifar1yr', 'time_loss_error']>
<KeysViewHDF5 ['vt_ratio', 'vt_ratio_error']>
<KeysViewHDF5 ['error_lower_bound', 'error_upper_bound']>
[0.99978834 0.9814571  1.01122614 1.02346369 1.05806997
 1.06537645]
[2.35897670e-05 4.16156184e-04 1.05557496e-03 1.05203405e-03
 5.38152098e-03 1.01015934e-02]
[0.99454064 0.99527711 0.99576412 0.99624833 0.99665129
 0.99658601]
[0.98910556 0.98740414 0.98567587 0.98346004 0.98024575
 0.97876009]

Figure 11

In [29]:
fig11_glitch_time = 1253878751.9375
fig11_template_dur = 88.73
fig11_opt_snr_val = 29.53
In [30]:
fig11_snr_ts = TimeSeries.read('fig11-SNR_TS.txt')
print(fig11_snr_ts)

fig11_snr_gated_ts =  TimeSeries.read('fig11-SNR_TS.txt')
print(fig11_snr_gated_ts)
TimeSeries([15.21157697, 13.21000557, 12.46676135, 11.30124764,
            10.10373115, 10.05235143,  8.44875331,  6.93251826,
             5.84768301,  4.15441937,  1.85682429,  1.93995969,
             1.93461168,  1.91374363,  2.06753482,  2.07528143,
             1.98189858,  1.74673594,  2.30445678,  5.24691978,
             7.39402167,  9.04366129, 10.13724333, 11.41612699,
            12.44899424, 13.35749789, 13.56517546, 14.30429438,
            16.1760405 , 15.94636199, 17.27524601, 18.55560242,
            17.18794743, 19.05031168]
           unit: dimensionless,
           t0: 1253878651.9375 s,
           dt: 10.0 s,
           name: None,
           channel: None)
TimeSeries([15.21157697, 13.21000557, 12.46676135, 11.30124764,
            10.10373115, 10.05235143,  8.44875331,  6.93251826,
             5.84768301,  4.15441937,  1.85682429,  1.93995969,
             1.93461168,  1.91374363,  2.06753482,  2.07528143,
             1.98189858,  1.74673594,  2.30445678,  5.24691978,
             7.39402167,  9.04366129, 10.13724333, 11.41612699,
            12.44899424, 13.35749789, 13.56517546, 14.30429438,
            16.1760405 , 15.94636199, 17.27524601, 18.55560242,
            17.18794743, 19.05031168]
           unit: dimensionless,
           t0: 1253878651.9375 s,
           dt: 10.0 s,
           name: None,
           channel: None)

Figure 12

In [31]:
fig12_strain_data = TimeSeries.read('fig12-S191110af_data.gwf',
                           channel='H1:DCS-CALIB_STRAIN_CLEAN_C01')
print(fig12_strain_data)
TimeSeries([-6.80888264e-20, -8.04767800e-20, -6.20688101e-20,
            ...,  3.32691315e-20,  4.39275982e-20,
             3.09780070e-20]
           unit: strain,
           t0: 1257462390.0 s,
           dt: 6.103515625e-05 s,
           name: H1:DCS-CALIB_STRAIN_CLEAN_C01,
           channel: H1:DCS-CALIB_STRAIN_CLEAN_C01)
In [32]:
fig12_omc_data = TimeSeries.read('fig12-S191110af_data.gwf',
                           channel='H1:OMC-PZT1_MON_AC_OUT_DQ')
print(fig12_omc_data)
TimeSeries([-0.00282792, -0.00188237,  0.00075957, ...,
            -0.0017821 ,  0.00079835, -0.00066444]
           unit: ct,
           t0: 1257462390.0 s,
           dt: 6.103515625e-05 s,
           name: H1:OMC-PZT1_MON_AC_OUT_DQ,
           channel: H1:OMC-PZT1_MON_AC_OUT_DQ)

Figure 13

In [33]:
# these data files are very large

fig13_data_h1 = numpy.load('fig13-spec_10.00_2000.00_H1_7200sSFT_O3_C01_C01gated_and_C01cleangated.npz')

# Only first 20 data point are loaded in this 
# example notebook due to the large size.
# Figure in paper uses the full dataset.
fig13_freqs_h1 = fig13_data_h1['freq'][:20]
fig13_asd_c01_h1 = fig13_data_h1['h1_ampwt'][:20]
fig13_asd_c01_gate_h1 = fig13_data_h1['h1_ampwt_gated'][:20]
fig13_asd_c01_clean_gate_h1 = fig13_data_h1['h1_ampwt_clean_gated'][:20]

print(fig13_freqs_h1)
print(fig13_asd_c01_h1)
print(fig13_asd_c01_gate_h1)
print(fig13_asd_c01_clean_gate_h1)
[10.         10.00013889 10.00027778 10.00041667 10.00055556
 10.00069444 10.00083333 10.00097222 10.00111111 10.00125
 10.00138889 10.00152778 10.00166667 10.00180556 10.00194444
 10.00208333 10.00222222 10.00236111 10.0025     10.00263889]
[3.04239e-20 3.09113e-20 3.08319e-20 3.03124e-20 3.06149e-20
 3.11059e-20 3.07456e-20 3.12366e-20 3.10172e-20 3.11319e-20
 3.06334e-20 3.15991e-20 3.07444e-20 3.05282e-20 3.11769e-20
 3.10352e-20 3.05304e-20 3.09738e-20 3.08553e-20 3.07753e-20]
[3.02092e-20 3.06139e-20 3.05640e-20 3.01116e-20 3.04685e-20
 3.08430e-20 3.04404e-20 3.10149e-20 3.06893e-20 3.09216e-20
 3.03305e-20 3.12212e-20 3.05335e-20 3.02366e-20 3.08685e-20
 3.06802e-20 3.01882e-20 3.06211e-20 3.05988e-20 3.05711e-20]
[3.02097e-20 3.06130e-20 3.05635e-20 3.01129e-20 3.04698e-20
 3.08440e-20 3.04416e-20 3.10168e-20 3.06876e-20 3.09222e-20
 3.03328e-20 3.12214e-20 3.05342e-20 3.02345e-20 3.08699e-20
 3.06795e-20 3.01874e-20 3.06224e-20 3.05999e-20 3.05696e-20]
In [34]:
# these data files are very large

fig13_data_l1 = numpy.load('fig13-spec_10.00_2000.00_L1_7200sSFT_O3_C01_C01gated_and_C01cleangated.npz')

# Only first 20 data point are loaded in this 
# example notebook due to the large size.
# Figure in paper uses the full dataset.
fig13_freqs_l1 = fig13_data_l1['freq'][:20]
fig13_asd_c01_l1 = fig13_data_l1['l1_ampwt'][:20]
fig13_asd_c01_gate_l1 = fig13_data_l1['l1_ampwt_gated'][:20]
fig13_asd_c01_clean_gate_l1 = fig13_data_l1['l1_ampwt_clean_gated'][:20]

print(fig13_freqs_l1)
print(fig13_asd_c01_l1)
print(fig13_asd_c01_gate_l1)
print(fig13_asd_c01_clean_gate_l1)
[10.         10.00013889 10.00027778 10.00041667 10.00055556
 10.00069444 10.00083333 10.00097222 10.00111111 10.00125
 10.00138889 10.00152778 10.00166667 10.00180556 10.00194444
 10.00208333 10.00222222 10.00236111 10.0025     10.00263889]
[2.05745e-20 2.07615e-20 2.06481e-20 2.04985e-20 2.09535e-20
 2.04837e-20 2.10825e-20 2.06797e-20 2.10468e-20 2.12648e-20
 2.09811e-20 2.10405e-20 2.09434e-20 2.11745e-20 2.09931e-20
 2.09216e-20 2.09445e-20 2.10029e-20 2.11746e-20 2.13620e-20]
[2.03988e-20 2.06970e-20 2.06300e-20 2.05028e-20 2.10185e-20
 2.03478e-20 2.09058e-20 2.06078e-20 2.09465e-20 2.12413e-20
 2.10134e-20 2.10361e-20 2.08824e-20 2.12711e-20 2.09770e-20
 2.07566e-20 2.07963e-20 2.09974e-20 2.11368e-20 2.12217e-20]
[2.03979e-20 2.06989e-20 2.06313e-20 2.05087e-20 2.10214e-20
 2.03473e-20 2.08994e-20 2.06144e-20 2.09385e-20 2.12457e-20
 2.10120e-20 2.10256e-20 2.08867e-20 2.12776e-20 2.09804e-20
 2.07591e-20 2.07956e-20 2.10032e-20 2.11397e-20 2.12280e-20]

Figure 14

In [35]:
fig14_freqs,fig14_coherence = numpy.loadtxt('fig14-HL_32Hz_Coherence.dat',unpack=True)
In [36]:
#notches
fig14_data_gate=dict(f=fig14_freqs,Coh=fig14_coherence,NSeg=1064670)

# stochastic notch list
# https://git.ligo.org/stochastic/stochasticdetchar/-/blob/master/O3/notchlists/HL/notchlist_HL_0.03125_O3B_v10.txt
fig14_freqsToRemove =[60.0,120.0,180.0,240.0,300.0,360.0,420.0,480.0,540.0,
                600.0,660.0,720.0,780.0,840.0,900.0,960.0,1020.0,1080.0,
                1140.0,1200.0,1260.0,1320.0,1380.0,1440.0,1500.0,1560.0,
                1620.0,1680.0,500.0,1000.0,1497.5,17.09375,17.59375,410.3125,
                1083.6875,331.90625,434.90625,1083.09375,265.5625,848.9375,
                575.15625,108.84375,1390.40625,52.8125,145.34375,1220.40625,
                189.96875,763.84375,26.34375,31.4375,37.71875,12.4375,
                1991.09375,2991.09375,234.5625,890.125,33.1875,32.0,48.0,
                50.0,20.125,20.78125,21.90625,22.34375,27.46875,27.71875,
                35.71875,40.90625,40.9375,60.5,61.0,61.5,62.5,63.0,63.5,
                25.0,394.6875,1153.09375,31.5,32.5,33.5,34.0,30.0,40.0,100.0,
                53.40625,33.5,40.0,31.5,32.5,30.0,100.0,436.53125,20.21875,
                20.25,20.34375,174.5625,258.46875,276.6875,409.9375]

fig14_nBinsToRemove =[7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,
                7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0,1281.0,2561.0,
                2721.0,33.0,33.0,33.0,33.0,33.0,33.0,33.0,3.0,7.0,5.0,1.0,35.0,
                1.0,9.0,9.0,11.0,5.0,1.0,1.0,7.0,1.0,13.0,21.0,3.0,7.0,1.0,7.0,65.0,5.0,
                5.0,5.0,5.0,5.0,5.0,5.0,5.0,5.0,5.0,5.0,5.0,5.0,5.0,5.0,5.0,5.0,5.0,17.0,
                5.0,5.0,5.0,5.0,5.0,5.0,5.0,5.0,5.0,5.0,5.0,5.0,5.0,5.0,5.0,1.0,1.0,1.0,
                1.0,1.0,1.0,1.0]

fig14_deltaF=0.03125
fig14_notches=[]

for f,n in zip(fig14_freqsToRemove,fig14_nBinsToRemove):
    fig14_notches.extend([x for x in numpy.arange(f-(n-1)*fig14_deltaF/2,f+(n+1)*fig14_deltaF/2,fig14_deltaF)])
    
fig14_notches=numpy.sort(numpy.unique(fig14_notches))
fig14_notch_filter=[x not in fig14_notches for x in fig14_data_gate['f']]

# set up bins for histogram
fig14_bins = numpy.linspace(1e-7,1e-4,1000)

# only look at frequency band used in stochastic search
fig14_f_filter = numpy.logical_and(fig14_data_gate['f']>=20,fig14_data_gate['f']<=1726)
fig14_counts,fig14_edges = numpy.histogram(fig14_data_gate['Coh'][fig14_f_filter],bins=fig14_bins)

# apply notch list
fig14_f_filter = numpy.logical_and(fig14_f_filter,fig14_notch_filter)
fig14_counts_notched,edges=numpy.histogram(fig14_data_gate['Coh'][fig14_f_filter],bins=fig14_bins)

Figure 15

In [37]:
fig15_coherence_file = 'fig15-L1-SQZ-OMC_TRANS_RF3_Q_NORM_DQ_data.mat'

fig15_data = scipy.io.loadmat(fig15_coherence_file)

fig15_freqs = numpy.array(fig15_data['freqs'])[0]
fig15_coh = numpy.array(fig15_data['coh'])[0]

print(fig15_freqs)
print(fig15_coh)
[0.00000000e+00 9.76562500e-04 1.95312500e-03 ... 1.02399805e+03
 1.02399902e+03 1.02400000e+03]
[0.00017748 0.0010839  0.00174422 ... 0.00314024 0.00021706
 0.00104434]
In [ ]: