Skip to content
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

flux computed in ellipses rotated by pi/2 instead of theta #351

Open
richellevc opened this issue Nov 14, 2022 · 0 comments
Open

flux computed in ellipses rotated by pi/2 instead of theta #351

richellevc opened this issue Nov 14, 2022 · 0 comments

Comments

@richellevc
Copy link

In photometry.py, line 90 to 94, the fluxes of the sources are computed in ellipses that are all rotated by pi/2.
See code snippet below:

# Calcuate the equivilent of flux_auto
flux, fluxerr, flag = sep.sum_ellipse(data, sources['x'], sources['y'],
                                      sources['a'], sources['b'],
                                      np.pi / 2.0, 2.5 * kronrad,
                                      subpix=1, err=error)

The same is passed to sep.sum_ellipse when computing background fluxes in the ellipses (line 141 to 144):

# Calculate the average background at each source
bkgflux, fluxerr, flag = sep.sum_ellipse(bkg.back(), sources['x'], sources['y'],
                                         sources['a'], sources['b'], np.pi / 2.0,
                                         2.5 * sources['kronrad'], subpix=1)

This might be a bug, as the ellipse parameters of the extracted sources are (a,b,theta), so each aperture is rotated by a different angle theta. If this is indeed a bug, suggested solutions would be:

# Calcuate the equivilent of flux_auto
flux, fluxerr, flag = sep.sum_ellipse(data, sources['x'], sources['y'],
                                      sources['a'], sources['b'],
                                      sources['theta'], 2.5 * kronrad,
                                      subpix=1, err=error)

# Calculate the average background at each source
bkgflux, fluxerr, flag = sep.sum_ellipse(bkg.back(), sources['x'], sources['y'],
                                         sources['a'], sources['b'], sources['theta'],
                                         2.5 * sources['kronrad'], subpix=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant