-
-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reproduce IRAF's phot task 'merr' value with aperture_photometry #629
Comments
To get IRAF's The code lives over at https://github.com/spacetelescope/wfc3_photometry/blob/master/photometry_tools/photometry_tools.py. An example is in the docstring, but for your posted code I think it should be something like: from photometry_tools import iraf_style_photometry
photometry_tbl = iraf_style_photometry(
apertures, annulus_apertures, hdu_data,
error_array=None, bg_method='mean') # median and mode are also valid options This should get you errors more in line with what IRAF would produce. There are a few small caveats, but generally it seems the magnitudes agree to ~0.01 mags on average (1%) and the errors agree to ~.001 mag (the fainter stars are worse, though I think this is more an IRAF limitation). |
Thank you very much for your answer @Vb2341. One small note: your |
@Gabriel-p No problem! The reason I didn't really think about it was mainly because I was developing these tools for HST photometry, where our images are already typically in electrons rather than DN. I can easily add it as a parameter, but I'm not sure if I'll have to apply the gain factor anywhere else. If the image is in DN, then I think it should just be the error, but I could be wrong. I suppose if the results don't match DAOPHOT afterwards, then the answer will come out of there. I'll add the epadu to the Edit: It's added: spacetelescope/wfc3_photometry@4cdd941 |
Thanks again @Vb2341! I'll check this out, compare with IRAF, and report back. If the results are close enough, I'll close the issue. |
The
phot
task performs aperture photometry, returning (among many other things) the magnitude and magnitude uncertainty for each star. This uncertainty is calledmerr
and is obtained as:where
with
How can I reproduce this value using the
aperture_sum_err
returned byaperture_photometry()
(shown here)?This is what I have so far, but I'm not sure what to use for
bkg_error
.The text was updated successfully, but these errors were encountered: