photutils icon indicating copy to clipboard operation
photutils copied to clipboard

Extract FWHM estimate from psf_model?

Open Gabriel-p opened this issue 7 years ago • 5 comments

The DAOPhotPSFPhotometry description says:

aperture_radius : float The radius (in units of pixels) used to compute initial estimates for the fluxes of sources. If None, one FWHM will be used if it can be determined from the psf_model.

Does this mean that one could extract the estimated FWHM for all sources in an image from psf_model? If so, how would that work?

(Is this the right place to be asking these questions? Should I start making them somewhere else?)

Gabriel-p avatar Oct 05 '16 19:10 Gabriel-p

Hi @Gabriel-p,

Currently, DAOPhotPSFPhotometry expects that the user knows a priori the fwhm (or sigma) to initialize psf_model. psf_model usually is an astropy Fittable2DModel like [IntegratedGaussianPRF].(http://photutils.readthedocs.io/en/latest/api/photutils.IntegratedGaussianPRF.html)

I'm pretty sure this place is appropriate for asking questions, keep them coming :) (I don't know if I answered your question though, let me know!)

mirca avatar Oct 07 '16 22:10 mirca

Thanks @mirca!

Couldn't the sigma be left as a parameter to fit somehow?


This questions derives from this one. I'm trying to come up with a way to estimate the FWHM using the tools available in this package (and astropy)

Gabriel-p avatar Oct 08 '16 16:10 Gabriel-p

@Gabriel-p sigma could be left as a parameter to be fitted. However, the results on the fitted sigma wouldn't show up in the output table of DAOPhotPSFPhotometry because the output table is hardwired to contain only the centroids and fluxes. I might change this behavior in #427

mirca avatar Oct 09 '16 17:10 mirca

To clarify/update on this last comment: this functionality overlaps with #464 - @mirca's #427 got merged without this because we wanted it in soon, but indeed it should be possible to fit sigma as you say here.

@Gabriel-p - The one caveat is that you almost never want to do this. For most PSF models, the scale parameter is known to become biased when S/N is very low. So the typical PSF workflow is that you derive the PSF model from bright stars, assuming that the PSF shape is independent of the star's flux (because it's all the same optics...), rather than independently fitting the shape for every star. So the current "primary" workflow planned is that you first produce a psf model (there will be functions/classes to do this down the road, but they're not ready yet), and then you use that model with all the parameters except for the centers/flux fixed.

That said, there is a slightly different use case that this machinery is also meant for: model-fitting photometry. That is, maybe your field has some stars and some galaxies, and for the galaxies you want a more flexible model that accounts for shape. In that case you certainly do want this functionality (hence #464)

eteq avatar Nov 10 '16 21:11 eteq

Oh, and this also overlaps with #412 - hopefully at some point the document refernced there will discuss all of this so that you can find out without having to ask in the issue tracker ;)

eteq avatar Nov 10 '16 21:11 eteq