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

Add tests for theory components Bandpass and Foreground #119

Merged
merged 8 commits into from
May 5, 2023

Conversation

mgerbino
Copy link
Collaborator

@mgerbino mgerbino commented Mar 2, 2023

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Mar 2, 2023

Codecov Report

Merging #119 (0f86b25) into master (e390ed1) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #119   +/-   ##
=======================================
  Coverage   73.12%   73.12%           
=======================================
  Files          30       30           
  Lines        1935     1935           
=======================================
  Hits         1415     1415           
  Misses        520      520           

@mgerbino mgerbino marked this pull request as ready for review March 3, 2023 09:05
@mgerbino mgerbino requested a review from itrharrison March 3, 2023 09:05
@itrharrison itrharrison changed the title Add tests and documentation for theory components Bandpass and Foreground Add tests for theory components Bandpass and Foreground Mar 3, 2023
@itrharrison itrharrison added tests Improvements to tests theory Related to cobaya Theories labels Mar 3, 2023
@itrharrison itrharrison added this to the v0.1 milestone Mar 3, 2023
@mgerbino
Copy link
Collaborator Author

mgerbino commented Mar 3, 2023

Since there is a potential conflict between this branch and the branch opened by @sgiardie to document MFLike, I suggest that we postpone adding documentation to BandPass and Foreground until MFLike is done.

Things changed with this PR and addressing #115:

  • added tests for BandPass and Foreground Theories
  • in bandpass.py, replaced casting np.float, now deprecated and no longer supported, with float

@mgerbino mgerbino linked an issue Mar 3, 2023 that may be closed by this pull request
Copy link
Collaborator

@itrharrison itrharrison left a comment

Choose a reason for hiding this comment

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

This looks good, at the moment the tests for the foregrounds form some re-implementation of various functions in the Theory class here in the tests and checking they give the same answer. This checks a lot of things well, as it seems unlikely mistakes would have occured in both implementations.

It would also be nice to have some physical sanity checks along the lines of ratios of spectra > or < 1 at different frequencies (for example), just to check that the spectra being calculated have the expected physical properties.

@itrharrison itrharrison dismissed their stale review May 5, 2023 10:55

On reflection I think my suggested test is one for fgspectra not us here.

Copy link
Collaborator

@itrharrison itrharrison left a comment

Choose a reason for hiding this comment

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

LGTM!

@itrharrison itrharrison merged commit 8d8ad73 into master May 5, 2023
mgerbino added a commit that referenced this pull request Oct 4, 2023
* added test files for bandpass theory class

* updated reqs

* checked style

* added tests for foreground theory component

---------

Co-authored-by: Martina Gerbino <bradamante@martina.local>
Co-authored-by: Ian Harrison <itrharrison@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Improvements to tests theory Related to cobaya Theories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tests and documentation to bias and foreground Theories
3 participants