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

Question about aperture size #138

Open
temuller opened this issue Apr 25, 2022 · 0 comments
Open

Question about aperture size #138

temuller opened this issue Apr 25, 2022 · 0 comments

Comments

@temuller
Copy link

Hi, I am trying to understand something about the size aperture used for aperture photometry. I extract the objects in my image with sep.extract() and then estimate the kron radius with:

kronrad, krflag = sep.kron_radius(data_sub, objects['x'], objects['y'], 
                                  objects['a'], objects['b'], objects['theta'], 6.0)

To estimate the aperture flux, I use:

flux, fluxerr, flag = sep.sum_ellipse(data_sub, objects['x'], objects['y'], 
                                      objects['a'], objects['b'], objects['theta'], 2.5*kronrad,
                                      subpix=1, gain=1.0)

Where the 2.5 is the usual scale of the kron radius, I believe. If I understand this correctly, the actual ellipse size used for the aperture flux would have parameters 2.5*kronrad*objects['a'] and 2.5*kronrad*objects['b'], right? So, if I want to plot the actual ellipse size used I would need to use the following:

fig, ax = plt.subplots(figsize=(8, 8))
ax.imshow(data_sub, interpolation='nearest', cmap='gray',
               vmin=m-s, vmax=m+s, origin='lower')

# plot an ellipse for each object
for i in range(len(objects)):
    e = Ellipse(xy=(objects['x'][i], objects['y'][i]),
                width=2.5*kronrad*objects['a'][i],
                height=2.5*kronrad*objects['b'][i],
                angle=objects['theta'][i] * 180. / np.pi)
    e.set_facecolor('none')
    e.set_edgecolor('red')
    ax.add_artist(e)
plt.show()

I basically want to know if the aperture size used to calculate the flux of a galaxy actually surrounds the entire galaxy.

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