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

Accounting for energy overlap in cross spectral products #865

Merged
merged 10 commits into from
Dec 4, 2024

Conversation

matteobachetti
Copy link
Member

Solving a bug, and taking it as a starting point to resolve #864

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.07%. Comparing base (32d09c5) to head (560270e).
Report is 11 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #865   +/-   ##
=======================================
  Coverage   96.06%   96.07%           
=======================================
  Files          48       48           
  Lines        9714     9723    +9     
=======================================
+ Hits         9332     9341    +9     
  Misses        382      382           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@matteobachetti matteobachetti requested review from abigailStev, matteolucchini1 and eleonorav89 and removed request for abigailStev December 3, 2024 12:27
@matteobachetti matteobachetti changed the title common_ref is a bool, not a string Accounting for energy overlap in cross spectral products Dec 3, 2024
Copy link
Collaborator

@eleonorav89 eleonorav89 left a comment

Choose a reason for hiding this comment

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

I think it would be better to specify the formulas used to calculate the errors to guide the user. Regarding the reference or add a link, I leave the choice to you.

def _calculate_errors(self):
"""Calculate the errors on cross powers and lags.

Uses the formulas from Ingram 2019, MNRAS 489, 392. The attribute ``channels_overlap``
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could it be better to indicate the formulas (the ones Matteo Lucchini wrote in the PR) or is it too specific? Also, I remember that in one of the first implementation of Ingram's approach in Stingray, a link to the paper was provided, although here you already put the reference. I leave you the choice to put the link or leave the reference as it is.

Copy link
Member Author

Choose a reason for hiding this comment

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

The formulas are a little complicated, but I did expand the description and add a link to the paper in the original function and referred to that function here, hope it is more clear now

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes indeed it is clearer now, better this way. Thank you Matteo

@matteobachetti matteobachetti added this pull request to the merge queue Dec 4, 2024
Merged via the queue into main with commit ed434c3 Dec 4, 2024
17 checks passed
@matteobachetti matteobachetti deleted the fix_common_ref branch December 4, 2024 14:29
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.

Inconsistency with error formulae in AveragedCrossspectrum
2 participants