Skip to content

Update measurements for stats - #215

Merged
rmjarvis merged 2 commits into
mainfrom
stat_measurements
Nov 12, 2026
Merged

rmjarvis merged 2 commits into
mainfrom
stat_measurements

Conversation

@rmjarvis

@rmjarvis rmjarvis commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

This PR fixes two thing related to the diagnostic measurements used for stats:

  1. The wmom size/shape measurement using ngmix doesn't include a centroid fit as part of the measurement like hsm does. The other two ngmix measurement algorithms also do actually -- gauss and am. But wmom sets the weight function at the given center. This currently is the star position from the input catalog. So when doing stats, after Piff has adjusted the centers to give the best match to the profile, this ended up with biased size and shape measurements. This PR fixes that to use the final fitted position when doing measurements rather than keeping the original position.
  2. The ShapeCatalog output stats intentionally keeps all the stars, including outliers. They are flagged, so users can decided what they want to do with them, depending on whether those measurements are interesting or not for their use case. But most other stats showing diagnostic plots really should not be using the flagged outliers. This PR adds an option to the measureShapes function to specify whether to include or not the flagged objects. It defaults to False, so most classes don't include the flagged objects, and ShapeCatalog sets it to true.

@FedericoBerlfein FedericoBerlfein left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Everything looks good. I have tried running the branch myself and it works well.

@rmjarvis
rmjarvis merged commit 280064f into main Nov 12, 2026
9 of 10 checks passed
@rmjarvis
rmjarvis deleted the stat_measurements branch November 12, 2026 17:38
@rmjarvis rmjarvis added this to the Version 1.8 milestone Dec 3, 2026
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