Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set random seeds for fake noise in make_skymap example #4883

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

titodalcanton
Copy link
Contributor

This modifies one of the examples of pycbc_make_skymap to make it clear that random seeds for fake noise must be set explicitly.

Standard information about the request

This is a documentation enhancement.

This change affects one of the examples of pycbc_make_skymap.

Motivation

When simulating noise on multiple detectors via --fake-strain, it is important to set different random seeds in different detectors, otherwise you will get the same noise realization in all detectors, which is usually not how you want to simulate noise!

The example of pycbc_make_skymap that uses simulated noise was not setting the seed explicitly, therefore implicitly using the same seed for all detectors. The resulting skymap looks correct visually, but this can lead to weird results when doing large simulations and checking the results statistically.

Contents

In light of the issue described above, this PR adds explicit seeds to the example.

Links to any issues or associated PRs

N/A

Testing performed

Ran the example before and after this change and plotted the resulting SNR timeseries. Before, I get this:

image

After, I get this:

image

Note the pattern of the noise fluctuations away from the central SNR peaks.

Additional notes

Thanks to Nicolas and Clara for noticing this.

  • The author of this pull request confirms they will adhere to the code of conduct

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