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

Weak lensing DC2 updates #1067

Merged
merged 17 commits into from
Aug 26, 2024
Merged

Weak lensing DC2 updates #1067

merged 17 commits into from
Aug 26, 2024

Conversation

timwhite0
Copy link
Collaborator

  • Updated load_image_and_catalog and generate_cached_data. More efficient splitting of cached .pt files, and also more similar to the parent DC2 class than it was before.
  • New baseline shear estimator that uses conv2d to compute a weighted average of ellipticities from neighboring tiles. The previous approach, which was to estimate shear in each tile by taking the average of ellipticities in that tile, can be recovered by setting the size of the kernel in conv2d to 1. After a bit of exploration, it seems like a kernel size of 5 or 7 provides the best approximation of shear. This likely has implications for the "optimal" receptive field of our lensing encoder.
  • Renamed and reorganized some notebooks and other files.
  • Updated catalog so that it only includes ~3.4 million galaxies with r-band flux ≥ 200 (r-band mag ≤ ~26). Previously our catalog contained ~10-11 million galaxies with r-band flux ≥ 50. With the new catalog, average ellipticity is not quite as good an estimator of shear as it was before, and definitely not as good as it was when we were (erroneously) including all ~128 million CosmoDC2 galaxies. See the bottom of ellipticity.ipynb for an example.

@timwhite0 timwhite0 requested a review from jeff-regier August 26, 2024 14:28
Copy link
Contributor

@jeff-regier jeff-regier left a comment

Choose a reason for hiding this comment

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

Looks good. Please try to remove the duplicated code before merging.

Copy link

codecov bot commented Aug 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.25%. Comparing base (e536606) to head (bcf827f).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1067      +/-   ##
==========================================
+ Coverage   81.23%   81.25%   +0.01%     
==========================================
  Files          23       23              
  Lines        3049     3051       +2     
==========================================
+ Hits         2477     2479       +2     
  Misses        572      572              
Flag Coverage Δ
unittests 81.25% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@jeff-regier jeff-regier merged commit bd96328 into master Aug 26, 2024
3 checks passed
@jeff-regier jeff-regier deleted the tw/weak_lensing branch August 26, 2024 17:03
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.

2 participants