ejeschke / ginga

The Ginga astronomical FITS file viewer
BSD 3-Clause "New" or "Revised" License
121 stars 77 forks source link

Pick: EE calculation fails if the object is too close to the corner of the pick region #940

Open ejeschke opened 3 years ago

ejeschke commented 3 years ago

It seems that the ensquared energy calculation in Pick fails with the message:

(plot_ee) | Error making EE plot: At least one EE function must be provided

if the object is close to the edge of the pick region.

Not sure yet, but I guess this is because the cutout for EE is being done from the cutout for the pick, instead of from the full image.

pllim commented 3 years ago

Yes, I only use the cutout image. Wasn't sure if I need to pass the whole image around. I figured when someone wants to measure EE, they would click on the star they want to measure anyway. 🤷

ejeschke commented 3 years ago

@pllim, I think this is a simple fix, as I did something similar for the fwhm, IIRC. I will submit a simple PR for the fix.

pllim commented 3 years ago

Sounds good to me. Thank you!