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

Merged
merged 5 commits into from
Nov 18, 2024

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?

@kkacanja kkacanja requested a review from cdcapano November 11, 2024 13:42
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
@ahnitz ahnitz merged commit acecd23 into gwastro:master Nov 18, 2024
29 checks passed
prayush pushed a commit to prayush/pycbc that referenced this pull request Nov 21, 2024
* Adding the option to choose preferred domain

* Updated logic

* Syntax fix

* Fixed imports

* Stylistic changes

---------

Co-authored-by: kkacanja <[email protected]>
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