spacetelescope / drizzlepac

AstroDrizzle for HST images.
https://drizzlepac.readthedocs.io
BSD 3-Clause "New" or "Revised" License
50 stars 39 forks source link

SVM: Fix the units of Bck and MSkyAp2 in the Segmentation Catalog #1177

Open stscijgbot-hstdp opened 2 years ago

stscijgbot-hstdp commented 2 years ago

Issue HLA-648 was created on JIRA by Michele De La Pena:

Rick and Steve report the units of Bck (background at the centroid of the source) and MSkyAp2 (mode statistic for the background) do not appear to be correct.

stscijgbot-hstdp commented 2 years ago

Comment by Michele De La Pena on JIRA:

The most time-consuming part of this ticket was tracking down the units.

  The MSkyAp2 is the mode statistic for the background computed for a circular annulus centered on the position of interest with an inner radius of 0.25" and an outer radius of 0.50 ".  The "width" of the annulus is configurable, and the statistic represented by MSkyAp2 is also configurable (e.g., median, mean, mode).  The source apertures are circular and are 0.05" and 0.15 ".  The mode = 3.0 median - 2.0 mean.  It appears your second possibility is the actual measurement, except the units are not ABMAG.  It seems the units are electrons/s/pixelsˆ2 (as far as I can tell).   Bck: While I never actually see where the background value per unit area is computed, I agree the units must be per unit area.  This is certainly implied in the description.  I believe the units are electrons/s/pixelsˆ2.  (Question out to Larry on this.  Brain hurts.)

stscijgbot-hstdp commented 2 years ago

Comment by Michele De La Pena on JIRA:

Update

Rick says MSkyAp2 units should be electrons/s/pixel because pixel is already a unit of area.  The code has been changed to be this.  (I will note there are a number of measurements in the catalogs which claim to be per pixelˆ2 according to the Photutils documentation.)

Larry says this about the units of Bck:

For “background_at_centroid” (from the older SourceProperties), the units are the same as the units on the input “background” image, so in this case it would electrons/s.  It’s not not computed per area.

Rick does not agree with this.

Hmm, not convinced by that.  I think it must be per pixel.  If you add up the background values over a region, do you get the total background counts in that region?  Then it is per pixel.

Currently, the units of Bck are still electrons/s in the catalogs.