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

make sure FD white_noise has the same length as asd #4878

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

Conversation

WuShichao
Copy link
Contributor

@WuShichao WuShichao commented Sep 12, 2024

Standard information about the request

This is a: bug fix

This change affects: noise generation, inference

This change will: avoid noise generation bug in some corner LISA PE examples

Motivation

I encountered the len not match issue in some LISA tests, not all of them:

2024-09-12T22:22:28.777+00:00 INFO : Making colored noise
2024-09-12T22:22:30.494+00:00 INFO : len(psd): 2211906
2024-09-12T22:22:30.649+00:00 INFO : len(asd): 2211906
2024-09-12T22:22:31.943+00:00 INFO : int(wn_dur * sample_rate) // 2 + 1: 2211906
2024-09-12T22:22:31.944+00:00 INFO : len(white_noise): 2211907

Contents

Force resize the FD white_noise.

Links to any issues or associated PRs

Testing performed

Additional notes

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

white_noise = white_noise.to_frequencyseries()
white_noise.resize(len(asd))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is exactly what we want to do here. Maybe the fix should be in the function just above. We definitely can't just resize the freuqency-domain object, but that distorts the sample rate (perhaps only slightly if the vector is long, but still not quite right).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the problem this is trying to solve. This function takes start_time, end_time and sample_rate, which completely specifies the noise (and so we shouldn't do this).

But if this is a problem, it implies an issue above, as we do do a psd.resize previously to make things match.

Can you give an example of a failure?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

3 participants