lsst / rubin_sim

Scheduler, survey strategy analysis, and other simulation tools for Rubin Observatory.
https://rubin-sim.lsst.io
GNU General Public License v3.0
41 stars 37 forks source link

Simple metrics for density uniformity #397

Open ixkael opened 6 months ago

ixkael commented 6 months ago

This PR has three simple new metrics:

They come together in a sigma8 tomography metric which is demonstrated here: https://github.com/ixkael/ObsStrat/blob/meanz_uniformity_maf/code/meanz_uniformity/sigma8tomography_demo.ipynb

Annoyingly I didn't have time to figure out how to properly code this in a nice metric. This is partly because I couldn't think of an elegant way to avoid multiple calls to other existing metrics (including the new LinearMultibandModelMetric). For example the average depth is needed, and I wasn't sure how to avoid calling the ExgalM5 twice. The other problem is the need to use the depth maps N times (with N the number of redshift bins considered, here 5). Again I couldn't think of a nice way to run the metrics in a nested way in time for this deadline. But I hope the demo notebook illustrates things clearly enough, and I am happy to assist in any way I can.

rhiannonlynne commented 6 months ago

I'll try to have a look at the notebook tomorrow, and see if I can say anything helpful!

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 6.38298% with 132 lines in your changes are missing coverage. Please review.

Project coverage is 60.16%. Comparing base (78851ce) to head (7b51a43). Report is 113 commits behind head on main.

:exclamation: Current head 7b51a43 differs from pull request most recent head 76313fb. Consider uploading reports for the commit 76313fb to get more accurate results

Files Patch % Lines
rubin_sim/maf/metrics/uniformity_metrics.py 0.00% 83 Missing :warning:
rubin_sim/maf/metrics/summary_metrics.py 14.03% 48 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #397 +/- ## ========================================== + Coverage 55.25% 60.16% +4.90% ========================================== Files 305 296 -9 Lines 29681 28278 -1403 Branches 4285 4022 -263 ========================================== + Hits 16400 17013 +613 + Misses 12338 10267 -2071 - Partials 943 998 +55 ```

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

rhiannonlynne commented 6 months ago

Some nitpicks feedback (docstrings, line length, black, all's, breaking things into new files) implemented in a PR on the fork - https://github.com/ixkael/rubin_sim/pull/1

rhiannonlynne commented 6 months ago

It would still be good to add test coverage.