Opened 18 years ago
Last modified 18 years ago
#1104 assigned enhancement
Thresholding when PSF is supplied
| Reported by: | Paul Price | Owned by: | eugene |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | psphot | Version: | unspecified |
| Severity: | minor | Keywords: | |
| Cc: |
Description
When a PSF is supplied, the first (bright) round of thresholding (using PEAKS_NSIGMA_LIMIT) should be unnecessary (since we don't need to choose PSF stars), and the program should immediately proceed to the second (faint) round of thresholding (with PEAKS_NSIGMA_LIMIT_2). Currently, the program will apply the bright threshold and die if there are no sources above this limit without proceeding to the faint threshold. The result is that even if PEAKS_NSIGMA_LIMIT_2 is set absurdly low and a PSF is supplied, the program may fail with an error that it couldn't find any (bright) sources on the image.
I also wonder if finding no sources should be an error. In the general scheme of things, it usually is (e.g., I can't do astrometry when there's no stars), but psphot should simply report no stars, rather than failing with an error since there are times when no sources is exactly right (e.g., subtracted or blank images).

I agree on both of these, with the modification that there should be the possibility to perform the bright analysis even if the psf is supplied: the bright analysis includes non-linear fitting and extended source subtraction which the second stage does not. so, it will take a modest amount of re-organization of the psphotReadout.c code, but is not really difficult to do.
The error conditions also generally need a bit more work: there are other cases where psphot should exit gracefully, and not with an error.