simonsobs / LAT_MFLike

Multifrequency Likelihood for SO Large Aperture Telescope
https://lat-mflike.readthedocs.io
Other
4 stars 12 forks source link

Refactor for SoLikeT #86

Closed cmbant closed 2 months ago

cmbant commented 3 months ago

Currently there are two different versions of MFLike (on separate git repos), SOLikeT and this, which is confusing and hard to maintain. This attempts to merge the two, with the objective of deleting the version in SOLikeT so we don't have any code duplication.

Basically it splits of BandpowerForeground as a separate Theory, allowing the foreground model to be swapped in and out, and the foreground and calibration/systematic parameters to be sampled separately. At the moment it doesn't split into a separate bandpower theory as in the current SOLikeT, and here TheoryForge obolished by replacing with the foreground model or merging into mflike.

pspipe_utils can now use BandpowerForeground instead of TheoryForge as in https://github.com/simonsobs/pspipe_utils/pull/53.

codecov-commenter commented 3 months ago

Codecov Report

Attention: Patch coverage is 84.96732% with 46 lines in your changes missing coverage. Please review.

Please upload report for BASE (master@660e0fa). Learn more about missing BASE report.

Files Patch % Lines
mflike/mflike.py 77.77% 26 Missing :warning:
mflike/foreground.py 89.24% 20 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/simonsobs/LAT_MFLike/pull/86/graphs/tree.svg?width=650&height=150&src=pr&token=qrrVcbNCs5&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=simonsobs)](https://app.codecov.io/gh/simonsobs/LAT_MFLike/pull/86?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=simonsobs) ```diff @@ Coverage Diff @@ ## master #86 +/- ## ========================================= Coverage ? 85.24% ========================================= Files ? 3 Lines ? 454 Branches ? 0 ========================================= Hits ? 387 Misses ? 67 Partials ? 0 ``` | [Files](https://app.codecov.io/gh/simonsobs/LAT_MFLike/pull/86?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=simonsobs) | Coverage Δ | | |---|---|---| | [mflike/\_\_init\_\_.py](https://app.codecov.io/gh/simonsobs/LAT_MFLike/pull/86?src=pr&el=tree&filepath=mflike%2F__init__.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=simonsobs#diff-bWZsaWtlL19faW5pdF9fLnB5) | `71.42% <100.00%> (ø)` | | | [mflike/foreground.py](https://app.codecov.io/gh/simonsobs/LAT_MFLike/pull/86?src=pr&el=tree&filepath=mflike%2Fforeground.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=simonsobs#diff-bWZsaWtlL2ZvcmVncm91bmQucHk=) | `89.24% <89.24%> (ø)` | | | [mflike/mflike.py](https://app.codecov.io/gh/simonsobs/LAT_MFLike/pull/86?src=pr&el=tree&filepath=mflike%2Fmflike.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=simonsobs#diff-bWZsaWtlL21mbGlrZS5weQ==) | `82.75% <77.77%> (ø)` | |
cmbant commented 2 months ago

Agree on logp. I try to avoid comparing sequences that might be an np.ndarray, because bool(ndarray) raises an exception if the array is not empty, hence explicit comparisons to None