{'fraction_non_alphanumeric': 0.02186071891412591, 'fraction_numerical': 0.012345679012345678, 'mean_word_length': 4.535774966962432, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Parameter Estimation and Model Selection of Gravitational Wave Signals Contaminated by Transient Detector Noise Glitches

The number of astrophysical sources detected by Advanced LIGO and Virgo is expected to increase as the detectors approach their design sensitivity. Gravitational wave detectors are also sensitive to transient noise sources created by the environment and the detector, known as `glitches'. As the rate of astrophysical sources increases, the probability that a signal will occur at the same time as a glitch also increases. This has occurred previously in the gravitational wave binary neutron star detection GW170817. In the case of GW170817, the glitch in the Livingston detector was easy to identify, and much shorter than the total duration of the signal, making it possible for the glitch to be removed. In this paper, we examine the effect of glitches on the measurement of signal parameters and Bayes factors used for model selection for much more difficult cases, where it may not be possible to determine that the glitch is present or to remove it. We include binary black holes similar to current detections, sine Gaussian bursts, and core-collapse supernovae. We find that the worst effects occur when the glitch is coincident with the signal maximum, and the signal to noise ratio (SNR) of the glitch is larger than the signal SNR. We have shown that for accurate parameter estimation of future gravitational wave signals it will be essential to develop further methods to either remove or reduce the effect of the glitches.


Introduction
The Advanced LIGO (aLIGO) [1] and Virgo (AdVirgo) [2] gravitational wave detectors have made the first direct detections of gravitational waves from binary neutron stars (BNS) and binary black holes (BBH) [3,4,5,6,7,8]. When the advanced detectors begin their third observing run the number of detections of binary sources is expected to increase [9]. The detectors may also detect gravitational waves from other transient sources, such as, core-collapse supernovae (CCSNe) [10], gravitational wave orphan memory [11], cosmic strings [12], or a totally unknown astrophysical source.
Estimating parameters of gravitational wave detections is essential for understanding the physics of the source. For binary sources, the parameters include the mass, spin, sky position, distance and inclination. Estimating the sky position and distance allows electromagnetic follow up of the gravitational wave signal. This resulted in the first confident joint electromagnetic and gravitational wave detection from GW170817 and GRB170817A [8,13]. Measuring the mass and spin of a population of binary sources can help us understand binary formation [14,15,16,17,18,19,20]. For a detection of a CCSN signal, parameter estimation and model selection could tell us about the rotation of the proto-neutron star [21,22,23], the equation of state [24], turbulent features such as convection and the standing accretion shock instability (SASI) [25], and the explosion mechanism of the source [26,27].
Detecting gravitational wave sources is difficult due to the non-stationary and non-Gaussian nature of the detector noise. Improvements to the detector noise have been made in previous studies by improving measurements of the power spectral density (PSD) [28,29]. The data contains short duration transient noise artefacts, called glitches, that can reduce the duty cycle of the instruments and limit the sensitivity of gravitational wave searches. Previous studies have implemented methods to reject glitches by analysing data coherently and incoherently and comparing the results [30].
During the first aLIGO Observing Run (O1), 10 6 glitches above a signal to noise ratio (SNR) 6 were observed in 51.5 days of data [31]. The high rate of glitches means that there is a high probability that future gravitational wave detections may occur at the same time as a glitch. This has already occurred during the detection of the BNS signal GW170817 [8]. To prevent errors in the analysis of the signal, two different methods were used to remove the glitch from the data. The first method, known as gating, applied an inverse Tukey window to zero out the data around the time of the glitch [32]. The second method, which was applied before parameter estimation of the signal, involved subtracting the waveform of the glitch that was reconstructed with sine Gaussian wavelets [30]. However, these methods have currently not been tested on a wider range of signals and glitches.
Subtracting the glitch from the GW170817 detection was possible because it could be determined easily in this case that both a signal and glitch were present. This is partly due to the fact that binary signals have a well understood characteristic chirp shape and the signal had a loud SNR. For other types of short duration gravitational wave signals, where the shape is less understood or completely unknown, it may be more difficult to determine if part of the reconstructed gravitational waveform is due to a glitch. The aLIGO detectors contain thousands of instrument and environmental monitors that produce data called auxiliary channels, which are not sensitive to gravitational waves and can be used to veto glitches in the detectors. The glitch had a very large amplitude and was visible in auxiliary channels of aLIGO data that are not sensitive to gravitational wave detections. The auxiliary channels allowed us to determine that the GW170817 glitch was produced by a saturation in the digital-to-analog converter of the feedback signal controlling the position of the test masses [8]. However, certain glitch types occur only in data that is sensitive to gravitational waves, which would make it much more difficult to determine if the glitch is part of the signal or a noise artefact. In the case of GW170817, the glitch was much shorter in duration than the length of the signal, therefore, gating could be applied without completely removing the signal from one detector. In future detections, if a glitch contaminates a shorter duration signal, such as a high mass BBH or a short duration burst, it may not be possible to gate the glitch without removing the entire gravitational wave signal.
In this study, we aim to determine the effects of different types of aLIGO glitches on the estimated parameters of multiple types of gravitational wave signals that are too short in duration for gating to be applied. We select glitches from the first aLIGO Observing Run (O1), which were still present during the second Observing Run (O2), and have a high probability of still occurring in future observing runs. We use short duration BBH signals, as they are the most common source for ground based detectors, and sine Gaussian signals to examine the effects on short duration burst sources. The signal morphology of a gravitational wave burst is not understood well enough to produce a matched filter template bank due to computational expense or unknown astrophysics. Therefore, it is not possible to have a signal model that will be an exact match for most potential future burst gravitational wave detections, and typically a sine Gaussian signal model is used [33,34]. As we know that for any burst gravitational wave signal there will be a mis-match between the signal and model, we use a third signal type to examine the effects of glitches when there is a mis-match between the signal and model. For this third type of signal we use supernova signals analysed with a sine Gaussian signal model.
In Section 2, we describe the parameter estimation and model selection tools used in this study. In Section 3, we outline the analysis and provide a description of the glitches and gravitational wave signals. The results are described in detail in Section 4 for BBH signals, Section 5 for sine Gaussian burst signals, and Section 6 for supernova signals with a mis-match between the signal and model template. A discussion is given in Section 7.

Parameter Estimation
Bayesian data analysis tools are used for parameter estimation and model selection of gravitational wave signals. In this study, we use the parameter estimation software library LALInference [35]. For a given model M , data d, and set of parameters θ, Bayes theorem is given by where p(θ|M ) is the prior that represents what is known about the parameters before any analysis of the data, and p(d|θ, M ) is the likelihood. An odds ratio can be calculated to distinguish between two different models as where M i and M j are the two competing models. If each model has the same prior then the odds ratio is equivalent to the Bayes factor given as where p(d|M i ) is the evidence for model M i , and p(d|M j ) is the evidence for model M j . In our case, model M i is the data contains noise and a signal, and model M j is that the data contains only noise. The evidence is given by the likelihood multiplied by the prior integrated over all parameter values Gravitational wave signals typically have a high number of parameters that make the integral computationally challenging. In this study, the evidence integral is solved using nested sampling [36]. The posterior probability density functions for each parameter are found by marginalizing over all but one or two of the parameters. The likelihood is given by where S n is the noise power spectral density (PSD), t is the duration of data analysed, h is the Fourier transform of the gravitational wave signal andd is the discrete Fourier transform of d. For multiple gravitational wave detectors the likelihood becomes The signal model used for parameter estimation and model selection depends on the type of gravitational wave signal that is being analyzed. For BBH signals, we use IMRPhenomPv2 waveforms, a standard phenomenological precessing waveform family [37,38,39]. Running LALInference with an IMRPhenomPv2 signal model produces a signal vs. noise Bayes factor and posterior distributions on several signal parameters. The parameters typically include the chirp mass given by, where m 1 and m 2 are the component masses, as well as the mass ratio, the spin parameters, the distance, the inclination and the sky position of the source. The Bayes factors are important as they can be used as a search statistic [40]. The mass is important for population studies [17,20]. The distance can aid in finding counterparts to the source [41], it can be used to measure the Hubble constant [42], and it can help to determine if the properties of populations of sources vary with distance.
For the analysis of burst signals with LALInference a sine Gaussian signal model is used, as the exact waveform of gravitational wave burst signals is unknown [33,43]. The sine Gaussian signal model is defined as, where τ is the signal duration given by τ = Q/ √ 2πf 0 , f 0 is the central frequency, Q is the quality factor, t 0 is the GPS time at the centre of the sine Gaussian, and h 0 = hrss/ √ τ , where hrss is the root sum squared amplitude of the transient. The burst version of LALInference can produce posterior distributions for Q, f 0 , hrss, and the sky position of the source, as well as signal vs. noise Bayes factors. In burst searches, the Bayes factors are used as a search statistic when combined with a trigger generator [43]. As there is currently no complete set of astrophysical signal models for the majority of burst signals, it is currently not possible to directly measure parameters such as the mass of the source. However, for a burst source such as a supernovae, measurements of the frequency, duration, and hrss will allow us to make comparisons with values predicted in simulation studies [25], which may allow us to learn about the astrophysics of the source.

Analysis
To determine how well we can measure source parameters when glitches are present, we use data taken during O1. Simulated gravitational wave signals are added to both the Livingston (L1) detector and the Hanford (H1) detector O1 data at increasing time offsets from three different types of glitches. We use glitches that occur in the L1 detector only at the same time as good quality data in the Hanford H1 detector and data from both detectors is analysed. All of the glitches are identified using glitch classification techniques [44,45,46]. We inject the signals directly on top of the glitches, 0.1 s away from the glitches, and 0.2 s away from the glitches. We do not include the AdVirgo detector, as we use glitches which occurred when the AdVirgo detector was offline for upgrades.

Glitches
In this study, we select three of the most common glitches that occur in the aLIGO detectors. The three different glitch types are known as blips, whistles and scattered light. A spectrogram of each glitch type is shown in Figure 1. We select 50 glitches of each type from the L1 aLIGO detector that occur at the same time as good quality data in the aLIGO H1 detector. All the glitches used in this study have an SNR that is between 10 and 20. These values are used as they allow the glitches to be large enough that they can be detected, but not so large that they will be instantly 'vetoed' as not being real gravitational wave signals. Glitches created from light scattering in the detector are often long duration and low frequency. Scattered light glitches occur when a small fraction of the laser beam light is scattered by imperfections in the mirrors of the detectors and then recombines with the main beam. The 50 scattered light glitches considered in this study have frequencies less than 40 Hz and average duration's of ∼ 2 s.
The blip glitch is the most common type of glitch that occurs in both of the aLIGO detectors. Therefore, it is possible that this type of glitch will overlap with an astrophysical gravitational wave signal in the future. Their peak frequency is at a few hundred Hz, which is the most sensitive frequency range of the advanced gravitational wave detectors. This results in blip glitches limiting the background sensitivity of searches for astrophysical transient sources. They appear as a short duration (∼ 0.1 ms) spike in the gravitational wave time series and can occasionally look chirpy in a spectrogram. The source of blip glitches is currently unknown, and is an active area of investigation [47]. The blip glitches are not present in any of the auxiliary channels, making it very difficult to gain clues about their origin.
The whistle glitches, sometimes called radio frequency beat notes, have a much longer duration and a higher frequency than the blip glitches. They often appear to have a 'v' or 'w' shape in a spectrogram. Some explanation of the origin of the whistle glitches is given in Ref. [47], but they have not yet been eliminated from the detector data. The 50 whistles considered in this study have an average duration of ∼ 0.7 s, and an average peak frequency of ∼ 800 Hz.

Gravitational Wave Signals
An example of the three different short duration gravitational wave signals used in this study are shown in Figure 2. We inject all of the signals exactly on top of glitches, 0.1 s away from the glitches, and 0.2 s away from the glitches. All of the signals in this paper have an SNR less than 35.
The first type of signal is BBH systems with chirp masses in the range 24 − 31 M , and distances in the range 139-700 Mpc. The signals are distributed uniformly on the sky. All of the spins of the signals are set to zero as we do not consider spin parameters in this study. We calculate signal vs. noise log Bayes factors, and we examine the effect the glitches have on the chirp mass and distance posteriors. Sine Gaussian Figure 2. The waveforms of the three short duration gravitational wave signals considered in this study. From left to right: a binary black hole, a supernova signal simulated from a 15M progenitor star [48], and a sine Gaussian with a frequency of 200 Hz.
To represent an unknown burst signal, we use sine Gaussian signals. The signals have a frequency of 200 Hz, a Q of 5, and a hrss of 8.8 × 10 −23 , and are distributed uniformly on the sky. We calculate the signal vs. noise log Bayes factors, and we examine the effect the glitches have on the frequency and hrss posterior distributions.
To examine if the effect of glitches is worse when there is a mis-match between the signal and the model, we use one supernova signal simulated with a 15 M progenitor star, referred to as model L15 in [48]. The signals have a duration of 1.2 s with all of the detectable parts of the signal within 0.6 s. The signals have a broad frequency range with a peak at ∼ 100 Hz. The signals are injected at distances of 1 kpc and 0.5 kpc at the position of the center of the Galaxy. As for the sine Gaussian signals, we calculate the signal vs. noise log Bayes factors with the sine Gaussian signal model, and we examine the effect the glitches have on the duration and hrss posterior distributions. We vary the difference in SNR between all of the different signals and glitches.
All of the signals used in this study have a large enough SNR that we expect they would be detected by the searches. The blip glitches limit the sensitivity of gravitational wave searches as they produce large tails in the estimation of the gravitational wave background. However, an individual blip glitch overlapping with a signal should not prevent the signal from being detected by the search, as it is currently not possible to produce a veto for data containing blip glitches. Data containing whistle glitches and scattered light can be vetoed as these glitch types appear in instrument and environment monitors surrounding the detector. However, the loudest background events in searches are checked carefully by the LIGO team to ensure a real signal is not rejected. So it is expect that the signals used in this study that overlap with whistles and scattered light may have some delay in their detection, as was the case for GW170817. However, in the case of GW170817, even with the L1 data initially being vetoed as bad quality, the signal was still detected quickly enough for a detection of the signals electromagnetic counterpart.

Binary black hole results
As the log Bayes factors can be used as a detection statistic and are important for model selection, first we calculate the log Bayes factors for all of the signals at all time offsets from the glitches. The results are shown in Figure 3. When the signal in the data matches the signal model, the log Bayes factors are expected to be proportional to the square of the SNR values. When the BBH signal is exactly on top of the glitch, the glitch that has the biggest effect on the results is the blip glitches. The blip glitches increase the value of the log Bayes factors, which could artificially increase the confidence in a detection, or make the signal model look more probable than it should be. A very small number (∼ 3) of the scattered light glitches resulted in a small increase in the log Bayes factors. The whistle glitches do not have any effect on the log Bayes factors. When the glitch is 0.1 s away from the signal, the blip glitches still have a large effect on the log Bayes factors, but the number of glitches that increase the log Bayes factors is around half the number that effected the signals when the signal was directly on top of the glitch. When the glitch is 0.2 s away from the signal, none of the glitches have a strong effect on the the log Bayes factors.
The parameter estimation results for the BBH signals are summarized in Figure 4. We look at the difference between the peak of the posterior distributions and the true  values, and the width of the 90% confidence intervals of the posterior distributions for the distance and chirp mass parameters. When the signal is directly on top of the glitch, the blip glitches have the largest effect on the difference between the injected value and the posterior peak. A small number of scattered light and whistle glitches make the chirp mass posterior distributions wider, therefore increasing the error on the measured parameters. The blip glitches artificially increase the amplitudes of the signals making the distances appear to be smaller than the actual value, and they make the posterior widths much smaller than expected, which makes the error on the distance much smaller than it should be. The distance values have larger posterior widths at larger distances, as signals at larger distances have a smaller SNR. When the signal is 0.1 s away from the glitch, we see the same effects as when the signal is directly on top of the glitch, but for only half as many glitches and signals as in the previous case. The blip glitches increase the difference between the peak of the posteriors and the true parameter values, and the longer duration whistle glitches and scattered light increase the errors on the chirp mass measurements. When the signal is 0.2 s away from the glitch, the glitches no longer have a large effect on the measured chirp mass and distance. The glitch and BBH signal SNR values are shown in Figure 4. At all distances, the worst effects are found when the SNR of the glitch is larger than the SNR of the signals.

Example BBH posteriors
In this subsection, we show in more detail the results from one of the artificial BBH signals that was badly affected by the glitch. The signal has a chirp mass of 29.4 M , is at a distance of 355 Mpc, and has a network SNR of 11.9. It is injected on top of a scattered light glitch with an SNR of 19.4. In Figure 5,

Sine Gaussian burst results
In this section, we describe the results for sine Gaussian burst signals injected on top of glitches and recovered with a sine Gaussian signal model. The log Bayes factors, at all time offsets, are shown in Figure 6. As for the BBH results, when the signal is injected directly on top of the glitch the blip glitches create a large increase in the log Bayes factors for the signals with an SNR larger than 10. When the signal network SNR is less than 10, there is an increase in the Bayes factors of the signals injected on top of the whistle and scattered light glitches. When the signal is 0.1 s and 0.2 s away from the glitch, only one blip glitch creates an increase in the log Bayes factor. As for the BBH signals, the glitches have a greater effect on the signal if the glitch SNR is larger than the signal SNR. The parameter estimation results for the sine Gaussian signals recovered with a sine Gaussian signal model are shown in Figure 7. When the signal is injected directly on top of the glitch, we find that the whistle glitches have a large effect on the peak of the frequency posteriors. As they are much higher frequency than the signals, the posterior peaks are much higher than the injected values. The blip glitches effected both the posterior peak frequency value and the posterior width, making the error on the frequency parameter larger. The blip glitches make the log(h rss ) values larger than the injected values.
When the signal is 0.1 s away from the glitch, the blip glitches no longer have any effect on the measured parameters. One whistle glitch creates a large increase in the width of the posterior, and 7 whistle glitches make the posterior peak frequency value much larger than the true value. When the signal is 0.2 s away from the glitch, 4 of the whistle glitches make the frequency values higher than the true value. None of the glitches had a large effect on the log(h rss ) values when the signal was 0.1 s or 0.2 s away from the glitch.

Example sine Gaussian posteriors
In this subsection, we show in more details the results of one of the sine Gaussian signals that was badly affected by a glitch. The signal has a frequency of 200 Hz and has a network SNR of 9.7. It is injected on top of a scattered light glitch with an SNR of 19.9. In Figure 8,

Supernova results
In this section, we determine how glitches effect parameter estimation results when there is a mis-match between the signal and the signal model. The injected signals are supernova waveforms, and the signal model is a sine Gaussian. The log Bayes factors, at the three time offsets considered, are shown in Figure 9. The mis-match between the signal and model makes the Bayes factors lower than the results for the last two signal types. At all three time offsets considered, the scattered light and whistle glitches increase the log Bayes factors when the SNR of the signal is less than 12. When the signal is directly on top of the glitch, all of the blip glitches create a large increase in the log Bayes factors at all signal SNR values. When the signal is 0.1 s or 0.2 s away from the glitch, only one blip glitch increases the log Bayes factor. This is the blip glitch that has the largest SNR. The parameter estimation results for the supernova signals are summarized in Figure 10. Unlike the results for the other signals, which did not see much effects from the glitches when they are 0.2 s away from the signal, the supernova results with a mis-match in the template are still effected even when the glitch is 0.2 s away from the signal. When the signals are directly on top of the glitch, we find that the scattered light glitches make the duration parameter larger than the true value. At 0.2 s away from the signal, the scattered light glitches still increase the difference between the true duration and the posterior peak, but the posterior width is smaller than when the signal is directly on top of the glitch. We find that all glitch types increase the measured log(h rss ) of the supernova signals. The effect is reduced, but still present when the signal is at larger time offsets from the glitch.

Example supernova posteriors
In this subsection, we show in more details the results of one of the supernova signals that was badly affected by a glitch. The example duration and log hrss posteriors are shown in Figure 11. The signal is injected on top of a scattered light glitch. The signal network SNR is 12.9, and the glitch SNR is 19.4. In this case, the peak of the posterior distribution for the duration parameter is at a smaller value than expected when the signal is directly on top of the glitch. As the time offset between the signal and glitch becomes larger, the posterior distribution becomes closer to the true value. When the signal is directly on top of the glitch, the measured log hrss posterior distribution is peaked at a larger value than the true value. As the offset between the glitch and the signal becomes larger, the peak of the log hrss and duration posteriors becomes closer to the true value.

Discussion
As gravitational wave detectors become more sensitive, the probability that a detection will overlap with a glitch in one or more of the detectors will increase. Previously when this has occurred it was possible to remove the glitch from the data before any analysis of the signal. This may be more difficult in the future if the signal is short duration, or we don't know exactly what the signal should look like. Therefore, it is important to understand how glitches can effect the results of future detections. In this study, we examine the effects of three different types of glitches on the log Bayes factors and estimated parameters of BBH, sine Gaussian and supernova signals at multiple different time offsets from the glitches. Further to this, we examine if the glitches create larger errors when there is a mis-match between the signal and the model. We examine cases where the signal is too short duration for the glitch to be removed, and we include glitches that do not occur in auxiliary channels of data, therefore making it difficult to determine the glitch is present. When the signal and model match, we find that glitches create the largest errors when the signal SNR is smaller than the glitch SNR, and the time offset between signal and glitch is less than 0.1 s. We find the effect of glitches on the measured signal parameters is worse when there is a mis-match between the signal and model.
We have shown that for accurate measurements of gravitational wave signals it will be essential in the future to develop further methods to either remove or reduce the effect of the glitches. The gating used for GW170817 is not possible for the signals considered here that are directly on top of the glitches, as their length is either similar to, or smaller than, the glitches considered. Gating glitches near to signals can have negative effects on measurements of the power spectral density (PSD) that is required for the analysis of the signals. Reconstructing the glitch and signal simultaneously may reduce the errors in the parameter measurements of the signals.
Currently it is possible to produce Bayes factors that tell you if the data being analysed contains a signal or a glitch by comparing the results when the data from multiple detectors is analysed coherently and incoherently [49]. However, there is currently no method to determine a Bayes factor for there being both a signal and glitch at the same time. This is particularly important for signals with unknown waveforms that occur at the same time as glitches that only appear in auxiliary channels of data that are sensitive to gravitational waves, and will be an important area for future development.