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

Sonification plugin tweaks #3377

Merged
merged 16 commits into from
Jan 14, 2025

Conversation

james-trayford
Copy link
Contributor

Description

This pull request develops the Sonification functionality further

  • flux_viewer.update_listener_wls now takes a sequence of ranges rather than a min and max, to allow for composite selections with appropriate @observe keyword for spectral subselection
  • Handle composite regions appropriately - this is now treated as a single patched-together spectrum over the wavelenth range, enabling more sound frequency resolution over disconnected spectral regions.
  • Update some of the Sonify plug-in hints etc in the .vue file.
  • Default Equal Loudness Normalisation to True
  • Default maximum audio frequency to 1000 Hz
  • hide sample rate options from users
  • continuum subtraction fix for sonification

Fixes #

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. Bugfix milestone also needs an accompanying backport label.
  • After merge, any internal documentations need updating (e.g., JIRA, Innerspace)?

@github-actions github-actions bot added cubeviz plugin Label for plugins common to multiple configurations labels Jan 1, 2025
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.

I don't grok the algorithms but I left a general review. Hope this helps. Thanks.

@@ -3,7 +3,6 @@
import sys
import os
import time

Copy link
Contributor

Choose a reason for hiding this comment

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

No need to remove this blank line.

jdaviz/configs/cubeviz/plugins/viewers.py Outdated Show resolved Hide resolved
jdaviz/configs/cubeviz/plugins/viewers.py Outdated Show resolved Hide resolved
@pllim pllim added this to the 4.2 milestone Jan 2, 2025
@pllim

This comment was marked as resolved.

Copy link

codecov bot commented Jan 3, 2025

Codecov Report

Attention: Patch coverage is 40.74074% with 16 lines in your changes missing coverage. Please review.

Project coverage is 87.99%. Comparing base (2084d96) to head (510eded).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
jdaviz/configs/cubeviz/plugins/viewers.py 20.00% 8 Missing ⚠️
...configs/cubeviz/plugins/sonify_data/sonify_data.py 56.25% 7 Missing ⚠️
jdaviz/configs/cubeviz/plugins/cube_listener.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3377      +/-   ##
==========================================
- Coverage   88.01%   87.99%   -0.02%     
==========================================
  Files         127      127              
  Lines       19747    19758      +11     
==========================================
+ Hits        17381    17387       +6     
- Misses       2366     2371       +5     

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

CHANGES.rst Outdated Show resolved Hide resolved
Co-authored-by: P. L. Lim <[email protected]>
CHANGES.rst Outdated Show resolved Hide resolved
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.

I tried using a composite spectral subset and it seemed to work, although I will trust that you've tested that and confirmed it also. If that is the case then this is good to be merged! My only request (for either this PR or a follow up) is to use more descriptive variable names. The following names could be changed for clarities sake: lims, wl_unit, wl_bounds, wlens, eln, assidx, ssvidx, and pccut. Thanks again for getting composite subsets working!

Co-authored-by: Jesse Averbukh <[email protected]>
@pllim pllim added the Extra CI Run cron jobs in PR label Jan 13, 2025
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.

Code looks like code. Thanks!

Assuming CI is green, approving.

@pllim
Copy link
Contributor

pllim commented Jan 13, 2025

devdeps failures are unrelated. Merging. Thanks!

@pllim
Copy link
Contributor

pllim commented Jan 13, 2025

Oh wait... remote data job failed in Catalogs. Maybe a network hiccup. Lemme restart.

@pllim pllim merged commit a8554a2 into spacetelescope:main Jan 14, 2025
17 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cubeviz Extra CI Run cron jobs in PR plugin Label for plugins common to multiple configurations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants