bilby-dev / bilby

A unified framework for stochastic sampling packages and gravitational-wave inference in Python.
https://bilby-dev.github.io/bilby/
MIT License
60 stars 71 forks source link

Systematic errors of sidereal time in time marginalization #666

Open bilby-bot opened 3 years ago

bilby-bot commented 3 years ago

In GitLab by @git.ligo:soichiro.morisaki on Nov 7, 2021, 23:07

For a PE run with time marginalization, geocent_time is fixed to the start time of data (See this line). This means the sidereal time is calculated at that time rather than the coalescence time of signal. It leads to systematic errors of ~2pi * duration / (24 * 60 * 60) in right ascension.

This could be an issue for BNS, whose duration is long. Below is the p-p plot for BNS signals, which are observed by [H1, L1, V1], whose maximum luminosity distance is 100Mpc, and whose median SNR is ~25.

p-p-plot

The bad p-p plot for right ascension is fixed after the right ascension is incremented by the expected systematic error as follows:

correction = 2. * np.pi * duration / (24. * 60. * 60.)
samples["ra"] = np.fmod(samples["ra"] + correction, 2. * np.pi)

The plot attached below compares the p-p plots of right ascension before and after this correction.

ra_corrected

I should also note that the p-p runs were done with the ROQ likelihood in my local environment, into which I have implemented time marginalization. Since its implementation is almost same as that for GravitationalWaveTransient, I think the same thing happens for GravitationalWaveTransient.

bilby-bot commented 2 years ago

In GitLab by @git.ligo:colm.talbot on Apr 6, 2022, 21:02

@git.ligo:soichiro.morisaki can you describe what you did to correct the results for the second plot here? If it's a post-processing thing, it would be good to have that documented until the code is fixed.

bilby-bot commented 2 years ago

In GitLab by @git.ligo:soichiro.morisaki on Apr 7, 2022, 05:34

@git.ligo:colm.talbot Sure, I have added the codes to correct right ascension samples. It is just a simple post-processing of adding constant to each sample.

bilby-bot commented 2 years ago

In GitLab by @git.ligo:gregory.ashton on Sep 29, 2022, 10:46

@git.ligo:soichiro.morisaki has there been any progress on this. Did you MR resolve the issue?

bilby-bot commented 2 years ago

In GitLab by @git.ligo:soichiro.morisaki on Oct 7, 2022, 08:44

@git.ligo:gregory.ashton Sorry for the late response. No, it has not been resolved for the standard likelihood, while it is not an issue for ROQ as I implemented time marginalization with a reference time being the center of time prior.

bilby-bot commented 1 year ago

In GitLab by @git.ligo:colm.talbot on May 23, 2023, 18:37

mentioned in issue avi.vajpeyi/pbilby_o4_review#1