Updated band requirement for velocity dispersion notebook and modified light2mass.py and test_light2mass.py to reflect changes#338
Conversation
… light2mass code and tests
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
thank you very much @mia-lamontagne ! There is an error in the tests (click on the CI / build and scroll up), hope you can address that |
|
@mia-lamontagne the tests are still failing. Did you execute the tests locally first before committing? It can save you hassle and wait time |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #338 +/- ##
==========================================
+ Coverage 97.93% 98.11% +0.17%
==========================================
Files 154 94 -60
Lines 10479 6141 -4338
==========================================
- Hits 10263 6025 -4238
+ Misses 216 116 -100
🚀 New features to boost your workflow:
|
sibirrer
left a comment
There was a problem hiding this comment.
Thank you @mia-lamontagne ! One more minor change and then it's ready to merge :)
| raise KeyError("The module currently supports only elliptical galaxies.") | ||
|
|
||
| if "g" not in bands or "r" not in bands or "i" not in bands: | ||
| raise ValueError( |
There was a problem hiding this comment.
can you also make a test without one of the required bands to raise this error? We are basically done but worth testing this as well :)
|
Hi @mia-lamontagne , thank you very much for this PR! There is a minor suggestion from @sibirrer which you can address. Then, the PR will be ready to merge! Thank you! |
Modified get_deflector_velocity_dispersion.ipynb to run with only the three LSST bands (g, r, i) as these are the only available in the cosmo_DC2.fits catalog.
Updated get_velocity_dispersion() in light2mass.py to support both full 5-band LSST photometry and reduced 3-band input. When only g, r, and i bands are available, the function now substitutes the missing u band with g and the z band with i, ensuring compatibility with LSST_to_SDSS().
Added additional tests to test_light2mass.py to reflect the new 3-band case. While error thresholds remain the same for the 3-band "weak-lensing" case, a greater error threshold of 10% was used in the "spectroscopic" case to reflect expected greater deviation from accepted value.