Skip to content

Conversation

@pcuste1
Copy link
Collaborator

@pcuste1 pcuste1 commented Oct 9, 2025

Description

This PR addresses two bugs that have been found related to the orientation plugin

  1. Sets the value of self.rotation_angle with the orientation plugin when a new orientation is set. This wasn't being done before, and thus aida was unable to determine the orientation of imviz properly.
  2. Whenever aida creates a new orientation, it first reverts back to Default Orientation to ensure that the least number of updates is needed for the new orientation. This adds a slight lag to adding new orientations for orientations < 4 but significantly reduces lag when any more orientations are created.

Note: still outstanding is the issue of setting self.rotation_angle when the orientation is changed to an existing orientation. That will need to be addressed in a separate PR once a root cause is determined

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?
  • If new remote data is added that uses MAST, is the URI added to the cache-download.yml workflow?
  • 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 imviz plugin Label for plugins common to multiple configurations labels Oct 9, 2025
orientation._obj.orientation.selected = label
else:
orientation.rotation_angle = rotation_angle
orientation._obj.orientation.selected = "Default orientation"
Copy link
Member

Choose a reason for hiding this comment

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

would it be possible to just grab the default orientation when creating the new WCS-only layer and rotating on top of that without actually changing the selection? That would avoid the need for the viewer to "flash" between.

@codecov
Copy link

codecov bot commented Oct 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.78%. Comparing base (5a8dcac) to head (f5c3b89).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3834   +/-   ##
=======================================
  Coverage   86.77%   86.78%           
=======================================
  Files         184      184           
  Lines       25146    25147    +1     
=======================================
+ Hits        21821    21823    +2     
+ Misses       3325     3324    -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

imviz plugin Label for plugins common to multiple configurations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants