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

feature-flagged wireframe for cubeviz spec extraction plan #2676

Merged
merged 3 commits into from
Jan 26, 2024

Conversation

kecnry
Copy link
Member

@kecnry kecnry commented Jan 25, 2024

Description

This pull request implements the basic UI framework for planned spectral extraction work in cubeviz, including:

  • background subtraction
  • live-previews
  • sub-pixel support
  • wavelength dependent (cone) support for apertures and background

All of these are currently behind "feature-flags" so do not show for the user if/when merged into main. As each individual feature is completed, we can remove the feature flag.

Changes that this makes to main now:

  • adds section headers (aperture & extraction) and selects which is active according to mouseover
  • updates styling for action subsection in specviz2d spectral extraction
  • moves function dropdown to bottom of plugin (in extraction section)

Without feature flags (ie. how users will see this now):

Screen.Recording.2024-01-25.at.3.44.14.PM.mov

With feature flags (plan for the future of spectral extraction, but non-functional):

spex = cubeviz.plugins['Spectral Extraction']
spex._obj.dev_cone_support = True
spex._obj.dev_bg_support = True
spex._obj.dev_subpixel_support = True
Screen.Recording.2024-01-25.at.3.45.00.PM.mov

Change log entry

  • Is a change log needed? If yes, is it added to CHANGES.rst? If you want to avoid merge conflicts,
    list the proposed change log here for review and add to CHANGES.rst before merge. If no, maintainer
    should add a no-changelog-entry-needed label.

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 milestone set? Set this to bugfix milestone if this is a bug fix and needs to be released ASAP; otherwise, set this to the next major release milestone.
  • After merge, any internal documentations need updating (e.g., JIRA, Innerspace)?

@kecnry kecnry added this to the 3.9 milestone Jan 25, 2024
@github-actions github-actions bot added cubeviz plugin Label for plugins common to multiple configurations specviz2d labels Jan 25, 2024
@kecnry kecnry force-pushed the cube-spec-extract-wireframe branch from 648917f to 3aad943 Compare January 25, 2024 20:48
@kecnry kecnry force-pushed the cube-spec-extract-wireframe branch from 3aad943 to 711bc79 Compare January 25, 2024 21:21
Copy link

codecov bot commented Jan 25, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (9414cd8) 90.85% compared to head (711bc79) 90.84%.
Report is 1 commits behind head on main.

Files Patch % Lines
...plugins/spectral_extraction/spectral_extraction.py 79.31% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2676      +/-   ##
==========================================
- Coverage   90.85%   90.84%   -0.02%     
==========================================
  Files         162      162              
  Lines       21126    21152      +26     
==========================================
+ Hits        19195    19215      +20     
- Misses       1931     1937       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@javerbukh javerbukh left a comment

Choose a reason for hiding this comment

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

Works as expected and the hidden features give me a good idea of how to build #2679 on top of this. Lets get this merged so we can get the entire spectral extraction effort done and go through it with a fine-tooth comb afterward.

Copy link
Contributor

@bmorris3 bmorris3 left a comment

Choose a reason for hiding this comment

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

Looks good. Sorry to be a pedant in the comments.

bg_scale_factor = Float(1).tag(sync=True)
bg_wavelength_dependent = Bool(False).tag(sync=True)

subpixel = Bool(False).tag(sync=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

Reminder: let's change references to subpixel to something which is not the name of one of the three aperture masking methods ({exact, subpixel, center}). It's clunky but accurate to call these "aperture masking methods."

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll leave this up to #2679 to modify (with no objections if we do in fact go with three methods instead of just two).

if self.dev_bg_support:
expose += ['background', 'bg_wavelength_dependent']
if self.dev_subpixel_support:
expose += ['subpixel']
Copy link
Contributor

Choose a reason for hiding this comment

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

(Replace me please 🙏)

</j-tooltip>
<v-switch
v-model="wavelength_dependent"
label="Wavelength dependent"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we label this "Conical (wavelength dependent)"?

Copy link
Member Author

Choose a reason for hiding this comment

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

Let's run this by POs and can also update in any of the follow-up works... technically it won't look like a cone in frequency-space or if there are gaps in wavelength... but I agree that the terminology may still be more descriptive at first glance to a user.

Copy link
Member Author

Choose a reason for hiding this comment

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

(@javerbukh - feel free to change this as part of #2679 as well)

<v-switch
v-model="subpixel"
label="Subpixel"
hint="Extract spectrum using a subpixel aperture in place of the subset mask"
Copy link
Contributor

Choose a reason for hiding this comment

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

(Replace this subpixel please 🙏)

@kecnry kecnry merged commit c5b0c98 into spacetelescope:main Jan 26, 2024
17 of 19 checks passed
@kecnry kecnry deleted the cube-spec-extract-wireframe branch January 26, 2024 20:55
gibsongreen pushed a commit to gibsongreen/jdaviz that referenced this pull request Feb 12, 2024
…scope#2676)

* feature-flagged wireframe for cubeviz spec extraction plan
* changelog entry
* fix original mark visibility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cubeviz plugin Label for plugins common to multiple configurations Ready for final review specviz2d
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants