Skip to content

Adding inject_glitch feature and example#1063

Open
narolaharsh wants to merge 11 commits intobilby-dev:mainfrom
narolaharsh:inject_glitch
Open

Adding inject_glitch feature and example#1063
narolaharsh wants to merge 11 commits intobilby-dev:mainfrom
narolaharsh:inject_glitch

Conversation

@narolaharsh
Copy link
Copy Markdown

The feature could be of use for various glitch-mitigation or effect of glithces on PE related simulations. Any feedback on furhter developement, relevance of the feature for Bilby welcome.

Specifically, adding the following method to the interferometer object. It injects a glitch at a user-specified SNR and user-specified onset time to the interferometer. A glitch waveform generator is not needed; an arbitrary timeseries can be rolled, scaled, and injected to the detector.

def inject_glitch(self, glitch_parameters=None, glitch_time_domain_strain=None,
                      glitch_sample_times=None, glitch_waveform_generator=None):
        """ Inject a glitch into the interferometer data.

        Parameters
        ==========
        glitch_parameters: dict
            Dictionary of glitch parameters.
            Must contain ``onset_time`` (the GPS time at which the glitch peak should occur).
            Must contain ``snr``. The glitch will be rescaled in such a
            way that it's optimal SNR matches to this value.
             Other parameters passed to glitch_waveform_generator.
        glitch_time_domain_strain: numpy.array, optional
        glitch_sample_times: numpy.array
        glitch_waveform_generator: bilby.gw.WaveformGenerator optional
        ...
        """

Also adding an example script in the usual sub-directory.

Comments from Colm on the previous PR (closed due to incorrect source branch).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant