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

Aperture area not trivial/exposed #64

Open
juliotux opened this issue Aug 21, 2018 · 1 comment
Open

Aperture area not trivial/exposed #64

juliotux opened this issue Aug 21, 2018 · 1 comment

Comments

@juliotux
Copy link
Contributor

This is a little suggestion to think, not a bug.

Only calculate the area of the aperture for valid pixels. This means that, if some pixels in the image are masked or out of the image, the real aperture area used by SEP is different than the calculated from the radius. This calculated area is also not exposed to user. Is there any way that this value can be exposed to user?

Problems: if we include area1 variable in the return of the sep.sum_* functions, we change the API, that is very bad.

Workaround: obtain the sum (without background extraction) of a image filled with ones.

@kbarbary
Copy link
Owner

It would be possible to return the area without breaking the API by adding a keyword argument return_area defaulting to False. Similar to numpy.unique() and it's return_counts keyword argument, for example.

I think I didn't do this originally because I didn't think many people would really have a use for the area. (The flags do already tell you if all or no pixels were masked) More often I think people might want a "correct masked" option. Related issue about masked pixels: #60

Good workaround.

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

2 participants