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

Imviz: Add a different radial profile approach #1097

Merged
merged 2 commits into from
Feb 22, 2022

Conversation

javerbukh
Copy link
Contributor

@javerbukh javerbukh commented Feb 21, 2022

Description

This pull request is to address the need to add more plot options to the simple aperture photometry plugin in Imviz.

Partially fixes #1049 although a new ticket needs to be made to implement curve of growth. (The rest of #1049 will be part of #1048 anyway.)

Checklist for package maintainer(s)

This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.

  • Are two approvals required? Branch protection rule does not check for the second approval. If a second approval is not necessary, please apply the trivial label.
  • Do the proposed changes actually accomplish desired goals? Also manually run the affected example notebooks, if necessary.
  • Do the proposed changes follow the STScI Style Guides?
  • Are tests added/updated as required? If so, do they follow the STScI Style Guides?
  • Are docs added/updated as required? If so, do they follow the STScI Style Guides?
  • Did the CI pass? If not, are the failures related?
  • Is a change log needed? If yes, is it added to CHANGES.rst?
  • Is a milestone set? Milestone is only currently required for PRs related to Imviz MVP.
  • After merge, any internal documentations need updating (e.g., JIRA, Innerspace)?

@codecov
Copy link

codecov bot commented Feb 21, 2022

Codecov Report

Merging #1097 (c412991) into main (29cd47f) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1097      +/-   ##
==========================================
+ Coverage   75.99%   76.03%   +0.04%     
==========================================
  Files          82       82              
  Lines        6290     6301      +11     
==========================================
+ Hits         4780     4791      +11     
  Misses       1510     1510              
Impacted Files Coverage Δ
...imviz/plugins/aper_phot_simple/aper_phot_simple.py 94.61% <100.00%> (+0.27%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 29cd47f...c412991. Read the comment docs.

@javerbukh javerbukh changed the title Add a different radial profile approach Imviz: Add a different radial profile approach Feb 21, 2022
@pllim pllim added this to the 2.3 milestone Feb 21, 2022
@pllim
Copy link
Contributor

pllim commented Feb 21, 2022

Since radial profile is actually not a released feature (#1030), we don't need a change log here.

Curve of growth is being discussed at astropy/photutils#1298 .

@pllim pllim added no-changelog-entry-needed changelog bot directive performance Performance related labels Feb 21, 2022

# Radial Profile
elif self.current_plot_type == "Radial Profile":
flux = np.bincount(list(radial_r), radial_img)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the casting to list necessary here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surprisingly yes! This line throws an error without it, something about a typeerror between 64 bit and 32 bit numbers.

Copy link
Contributor

@pllim pllim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I am definitely in favor of this PR since you have shown the performance boost by calculating the radial profile this way.

This code is from imexam, right? If so, you need to copy the imexam license to licenses/IMEXAM_LICENSE.rst here. Also please indicate clearly in the code where appropriate that the algorithm is from imexam and don't forget "see licenses/IMEXAM_LICENSE.rst" in that comment.

@pllim pllim added the trivial Only needs one approval instead of two label Feb 22, 2022
@pllim
Copy link
Contributor

pllim commented Feb 22, 2022

I applied my review directly as a second commit. The plot now looks like this:

Screenshot 2022-02-22 150015

I don't think this needs a second approval since Jesse already presented this to POs/devs earlier this week and received positive feedback already. I will merge when CI passes. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
imviz no-changelog-entry-needed changelog bot directive performance Performance related trivial Only needs one approval instead of two
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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