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

Simple metrics for density uniformity #397

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open

Simple metrics for density uniformity #397

wants to merge 39 commits into from

Conversation

ixkael
Copy link

@ixkael ixkael commented Mar 15, 2024

This PR has three simple new metrics:

  • a sky fraction metric (more flexible than existing ones)
  • and edit to the totalpowermetric to include a remove_monopole
  • a new metric for linear combination of depth fluctuations

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.

Copy link
Member

@rhiannonlynne rhiannonlynne left a comment

Choose a reason for hiding this comment

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

Some questions about the FskyMetric.
remove_monopole looks good.

rubin_sim/maf/metrics/summary_metrics.py Outdated Show resolved Hide resolved
@rhiannonlynne
Copy link
Member

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

Copy link

codecov bot commented Mar 29, 2024

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.

❗ 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 ⚠️
rubin_sim/maf/metrics/summary_metrics.py 14.03% 48 Missing and 1 partial ⚠️
Additional details and impacted files
@@            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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rhiannonlynne
Copy link
Member

Some nitpicks feedback (docstrings, line length, black, all's, breaking things into new files) implemented in a PR on the fork - ixkael#1

@rhiannonlynne
Copy link
Member

It would still be good to add test coverage.

"""
Run as summary metric on NestedRIZExptimeExgalM5Metric.

This metric StaticProbesFoMEmulatorMetric
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like this needs to be expanded? Something like:

This metric uses maps of the combined RIZ exposure time and i-band depth maps (with a consistent set of area cuts) to identify potential reductions in cosmological constraining power due to substantial large-scale power in non-uniform coadds at a particular data release. The RIZ exposure time map is used to identify whether there are residual rolling features. If not, the metric returns 1. If there are such features, then the region is segmented into similar-depth regions and the one with the largest cosmological constraining power is presumed to be used for science. In that case, the metric returns the 3x2pt FoM (StaticProbesFoMEmulatorMetric, quantifying weak lensing and large-scale structure constraining power) for the largest of those regions, divided by that for the full region if it had been usable.

Copy link
Author

Choose a reason for hiding this comment

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

Thank you for catching this gap Rachel! I committed and push this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants