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

Update lombscargle.py #828

Merged
merged 5 commits into from
Sep 11, 2024
Merged

Conversation

hamzaallen
Copy link
Contributor

Define two functions that calculate the rms and rms error of the spectrum over a specific range of frequencies.

Relevant Issue(s)/PR(s)

Provide an overview of the implemented solution or the fix and elaborate on the modifications.

Is there a new dependency introduced by your contribution? If so, please specify.

Any other comments?

@pep8speaks
Copy link

pep8speaks commented Jul 2, 2024

Hello @hamzaallen! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2024-09-11 10:19:02 UTC

Copy link
Member

@matteobachetti matteobachetti left a comment

Choose a reason for hiding this comment

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

Thanks @hamzaallen! A very useful addition to Stingray!

To verify that the code works, it would be good to have one or more tests added to test_lombscargle.py.
In test_powerspectrum.py we have a few tests for the equivalent function in Powerspectrum and AveragedPowerspectrum, you can use those as templates.

Also, compute_rms does not have a docstring and we require all user-facing methods to be properly documented




def compute_rms(self, min_freq, max_freq, poisson_noise_level=None):

Copy link
Member

Choose a reason for hiding this comment

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

Please add a docstring to the function

Define two functions that calculate the rms and rms error of the spectrum over a specific range of frequencies.
@matteobachetti matteobachetti added this pull request to the merge queue Sep 11, 2024
Merged via the queue into StingraySoftware:main with commit 0baee86 Sep 11, 2024
15 checks passed
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