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

[FEAT] Imviz: add option for an integrated profile to the aperture photometry plugin #1049

Closed
eteq opened this issue Jan 25, 2022 · 7 comments · Fixed by #1097
Closed

[FEAT] Imviz: add option for an integrated profile to the aperture photometry plugin #1049

eteq opened this issue Jan 25, 2022 · 7 comments · Fixed by #1097
Labels
feature Feature request imviz

Comments

@eteq
Copy link
Contributor

eteq commented Jan 25, 2022

Description

The current aperture photometry plugin shows pixel values. This is sometimes exactly what the user wants, but other times they want the integrated flux profile (sometimes called the "curve of growth"). We should add an option to the aperture photometry plugin to do exactly that - i.e., it would toggle the plot between the current "pixel plot" behavior and an integrated profile.

The idea would be to basically have it plot exactly what the algorithm I describe in #1048 does, but actually plot the profile from steps 1-3 instead of using it to compute the FWHM. That has the convenient feature that the user could look at that plot and immediately see what the FWHM is (i.e., it's where the profile first crosses "half of the max"). Could even add a thin horizontal line at the half-max, although that might make the plot too busy (I leave it to the implementors discretion for the first pass at least).

Additional context

Brought up out-of-band in a discussion with @pontoppi, who may want to comment here if there's more to add than what I have above.

🐱

@eteq eteq added feature Feature request imviz labels Jan 25, 2022
@javerbukh
Copy link
Contributor

So given a test data set of

pic = np.array([[1, 1, 1, 1, 1],
               [1, 5, 5, 5, 1],
               [1, 5, 10, 5, 1],
               [1, 5, 5, 5, 1],
               [1, 1, 1, 1, 1]])

And using the imexam radial profile method that @pllim linked to, I get the following plot. Is that what is being asked for here?
image (2)

@pllim
Copy link
Contributor

pllim commented Feb 16, 2022

Looks about right! 👏

@pllim
Copy link
Contributor

pllim commented Feb 16, 2022

Next, throw some np.nan in there and make sure it doesn't crash. 😬

@pllim
Copy link
Contributor

pllim commented Feb 16, 2022

You can also pass in an evaluated Gaussian2D model data and see if the plot makes sense.

@javerbukh
Copy link
Contributor

Before I knew what I was doing I did have some np.nan in there and it still worked! 😅 I'll give that a try next.

@pllim
Copy link
Contributor

pllim commented Feb 22, 2022

When I heard the user request during demo, I wasn't thinking "curve of growth" at all. I was thinking what @javerbukh implemented over at #1097 . Since you already have astropy/photutils#1298 open, "curve of growth" will naturally happen when we use it to tackle #1048 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request imviz
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants