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

Adding the option to choose preferred domain #4916

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

kkacanja
Copy link
Contributor

Incorporated the option to set a preferred domain for waveform generation. This is useful for waveform models that are available in both frequency domain and time domain. Previously it automatically chose the frequency domain.

Example Usage:

[static-params]
preferred-domain = td

The options are td for time domain, fd for frequency domain, and none for default

Copy link
Contributor

@cdcapano cdcapano left a comment

Choose a reason for hiding this comment

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

Thanks for doing this. I have just a few code-related requests.

pycbc/inference/models/gaussian_noise.py Outdated Show resolved Hide resolved
pycbc/waveform/generator.py Outdated Show resolved Hide resolved
pycbc/waveform/generator.py Outdated Show resolved Hide resolved
pycbc/waveform/generator.py Outdated Show resolved Hide resolved
pycbc/waveform/generator.py Outdated Show resolved Hide resolved
pycbc/waveform/generator.py Outdated Show resolved Hide resolved
Copy link
Contributor

@cdcapano cdcapano left a comment

Choose a reason for hiding this comment

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

Sorry, more change requests. Also, please address the 79-character limits that code climate flagged.

pycbc/inference/models/gaussian_noise.py Outdated Show resolved Hide resolved
pycbc/waveform/generator.py Outdated Show resolved Hide resolved
pycbc/waveform/generator.py Outdated Show resolved Hide resolved
@kkacanja
Copy link
Contributor Author

kkacanja commented Nov 8, 2024

Sorry, more change requests. Also, please address the 79-character limits that code climate flagged.
You initially made the comment for
raise ValueError(f"{approximant} is a frequency-domain model.")
to have a more informative error message. The message above is 75 characters long. Do you want me to revert back to this to limit it to 79 characters or keep the more informative error message?

Copy link
Contributor

@cdcapano cdcapano left a comment

Choose a reason for hiding this comment

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

I have a few more style requests; see below. Otherwise looks good, so I'm approving. Please make those changes then feel free to merge.

pycbc/waveform/generator.py Outdated Show resolved Hide resolved
pycbc/waveform/generator.py Outdated Show resolved Hide resolved
pycbc/waveform/generator.py Show resolved Hide resolved
pycbc/waveform/generator.py Outdated Show resolved Hide resolved
@kkacanja kkacanja requested a review from ahnitz November 15, 2024 19:50
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.

3 participants