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

Add note about ApertureStats centroids #2014

Merged
merged 1 commit into from
Feb 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions photutils/aperture/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,15 @@ class ApertureStats:
`~regions.Region` objects are converted to `Aperture` objects using
the :func:`region_to_aperture` function.

The returned statistics are measured for the pixels within the
input aperture at its input position. This class does not change
the position of the input aperture. This class returns the centroid
value of the pixels within the input aperture, but the input
aperture is not recentered at the measured centroid position
when making the measurements. If desired, you can create a new
`Aperture` object using the measured centroid and then re-run
`~photutils.aperture.ApertureStats`.

Most source properties are calculated using the "center"
aperture-mask method, which gives aperture weights of 0 or 1. This
avoids the need to compute weighted statistics --- the ``data``
Expand Down