photutils
photutils copied to clipboard
Signal value in evaluated griddedPSFModel is dependent upon oversampling factor
While working with some griddedPSFModels yesterday, I noticed that the total signal in the evaluated PSF seems to be dependent upon the oversampling factor of the data within the model.
In the example I'm working with, I have a griddedPSFModel where the individual PSFs in the model each have total signal values very close to 1.0. But when I evaluate the model and specify flux=1
, the resulting PSF has a total signal of about 0.039. This happens to be lower than the total signal in the individual model PSFs by a factor of 25, which is the square of the oversampling factor in the library. When I evaluate the model and set flux=25
, the signal in the resulting PSF matches up well with that in the input PSFs.
I see the same behavior using a second library that is oversampled by a factor of 3. In that case the signal in the evaluated PSF is a factor of 9 lower than in the input PSFs. Is this behavior expected?
This notebook shows my example calculations: https://gist.github.com/bhilbert4/c2fbce2097fefd2cb07ec6dbc7e7d412
Currently, that is the expected behavior. Jay Anderson's oversampled ePSFs sum to oversampling**2
and the photutils
ePSF machinery emulates Jay's work. So, GriddedPSFModel
expects that the input oversampled PSFs are normalized to oversampling**2
. This should be better documented. Also, I'm thinking about adding a normalization check that perhaps issues a warning if the PSFs aren't normalized in the way photutils expects them.
FYI - WebbPSF PR https://github.com/spacetelescope/webbpsf/pull/311 updates the behavior of the create psf grid function in WebbPSF to output models that are consistent with the normalization as expected by photutils.GriddedPSFModel
. (i.e. we added the normalization to oversampling**2
).
I think since no change is needed in photutils, this issue can be closed, unless @larrybradley you want to add in the normalization check/warning mentioned just above.