Skip to content

[FEAT] Imviz: add fwhm to the aperture photometry plugin #1048

@eteq

Description

@eteq

Blocked by:

Description

Currently the aperture photometry plugin measures the flux, centering, etc, but does not give a "quick-and-dirty" measure of the width. In many applications this is what you really want because it provides information about the size of the PSF, whether the object in question is a star or not, etc. While there are plenty of fancier ways to do this, there is a strong culture (and precedent from the iraf imexam tool) understanding that sometimes you just want "the FWHM".

So to that end I suggest adding a FWHM measured using a purely numerical approach (i.e., not an explicit model fit):

  1. Start with a center and a maximum radius (or in jdaviz this can just be the subset pixels themselves and their pixel coordinates)
  2. For each pixel compute the distance from the center to the pixel
  3. Order the pixels by distance, and compute the cumsum at each pixel.
  4. Treat the largest pixel (not necessarily the outermost, since pixel values can be negative) as the "max".
  5. Starting from the inner-most pixel, move out until the first pixel that is >= half of the "max" (there's lots of more robust ways to do that, but this is the simplest one to start with), and multiply that pixel's distance by 2 to get the FWHM in pixels
  6. (optional in first pass implementation) do the same as the above but have the pixels in sky coordinate units/separations instead of pixels.

Caveat: we really should implement the core algorithm in photutils and call that from jdaviz. But depending on ordering of releases in photutils that might or might not be a bit annoying. Probably depends mostly on the timing of implementation though, as long as everntually it's in photutils.

Additional context

This was recently brought up out-of-band by @janerigby as sort of a "one last missing piece" for standard quick-look use cases of this plugin. @janerigby may want to comment more on the above.

🐱

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions