LSSTDESC / lsstdesc-diffsky

Library for differentiable generation of synthetic skies for LSST DESC
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Refactor get_diffsky_sed_info function #64

Closed aphearin closed 8 months ago

aphearin commented 8 months ago

This PR refactors the get_diffsky_sed_info function so that it accepts mah_params, ms_params, and q_params rather than a precomputed gal_sfr_table. This change makes it more straightforward to use this same function as the convenience function that our users will use to compute photometry for diffsky galaxies.

Note that the cosmology argument of get_diffsky_sed_info is now a 5-parameter array rather than 4 (the new final parameter is fb=Ob0/Om0).

I have also changed the order of some of the arguments so that this function's inputs more closely mirrors the way that the calc_rest_sed_galpop function is called.

The unit-testing for the get_diffsky_sed_info has been updated according to this new calling signature. I have also attempted to appropriately change the call to get_diffsky_sed_info within write_mock_to_disk, but we have no unit-tests for write_mock_to_disk and so the best test will be for @evevkovacs to rerun the pipeline with the updated code.

codecov[bot] commented 8 months ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (f09c28b) 54.67% compared to head (2d1cb0f) 55.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #64 +/- ## ========================================== + Coverage 54.67% 55.00% +0.32% ========================================== Files 59 59 Lines 4115 4147 +32 ========================================== + Hits 2250 2281 +31 - Misses 1865 1866 +1 ``` | [Files](https://app.codecov.io/gh/LSSTDESC/lsstdesc-diffsky/pull/64?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LSSTDESC) | Coverage Δ | | |---|---|---| | [...sstdesc\_diffsky/photometry/photometry\_lc\_interp.py](https://app.codecov.io/gh/LSSTDESC/lsstdesc-diffsky/pull/64?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LSSTDESC#diff-bHNzdGRlc2NfZGlmZnNreS9waG90b21ldHJ5L3Bob3RvbWV0cnlfbGNfaW50ZXJwLnB5) | `100.00% <100.00%> (ø)` | | | [...fsky/photometry/tests/test\_photometry\_lc\_interp.py](https://app.codecov.io/gh/LSSTDESC/lsstdesc-diffsky/pull/64?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LSSTDESC#diff-bHNzdGRlc2NfZGlmZnNreS9waG90b21ldHJ5L3Rlc3RzL3Rlc3RfcGhvdG9tZXRyeV9sY19pbnRlcnAucHk=) | `100.00% <100.00%> (ø)` | | | [lsstdesc\_diffsky/write\_mock\_to\_disk.py](https://app.codecov.io/gh/LSSTDESC/lsstdesc-diffsky/pull/64?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LSSTDESC#diff-bHNzdGRlc2NfZGlmZnNreS93cml0ZV9tb2NrX3RvX2Rpc2sucHk=) | `11.28% <33.33%> (-0.02%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.