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

Angle units in full-sphere projections #2279

Merged
merged 17 commits into from
May 19, 2022

Conversation

Carifio24
Copy link
Member

This PR adds support for using degrees in the four full-sphere projections (Aitoff, Hammer, Mollweide, and Lambert) in the scatter viewer. Tick mark formatting has also been adjusted to match the angle units being used (tick mark locations have been left unchanged). I split the full-sphere projection test (in the Qt scatter viewer tests) into two separate tests, one for each angle unit.

Since the RadianTransform ROI pre-transform originally only applied the transformation to the x component (as it was created with polar plots in mind), I added a coords parameter which allows specifying which coordinates are angular, as the full-sphere projections have two angular coordinates. This would cause a problem for older sessions that use a previous version of RadianTransform. To work around this, I've added a patch which will set coords to be ['x'] if it's missing (since this would be the appropriate value for polar plots).

@codecov
Copy link

codecov bot commented Feb 28, 2022

Codecov Report

Merging #2279 (4817497) into main (4b7c005) will decrease coverage by 0.06%.
The diff coverage is 73.77%.

❗ Current head 4817497 differs from pull request most recent head 5c64fe2. Consider uploading reports for the commit 5c64fe2 to get more accurate results

@@            Coverage Diff             @@
##             main    #2279      +/-   ##
==========================================
- Coverage   88.15%   88.09%   -0.07%     
==========================================
  Files         247      247              
  Lines       23327    23350      +23     
==========================================
+ Hits        20565    20571       +6     
- Misses       2762     2779      +17     
Impacted Files Coverage Δ
glue/core/roi_pretransforms.py 69.76% <12.50%> (-7.16%) ⬇️
glue/core/state.py 91.34% <14.28%> (-0.78%) ⬇️
glue/viewers/scatter/viewer.py 98.14% <71.42%> (-0.90%) ⬇️
glue/viewers/scatter/state.py 94.84% <90.00%> (+0.10%) ⬆️
glue/core/util.py 78.03% <100.00%> (+0.33%) ⬆️
glue/viewers/scatter/layer_artist.py 97.24% <100.00%> (+0.03%) ⬆️
glue/viewers/scatter/python_export.py 97.95% <100.00%> (+0.13%) ⬆️
glue/viewers/scatter/qt/options_widget.py 94.31% <100.00%> (+0.06%) ⬆️
glue/core/visual.py 81.13% <0.00%> (-6.26%) ⬇️
glue/utils/array.py 88.06% <0.00%> (-0.43%) ⬇️
... and 1 more

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 c6fda7b...5c64fe2. Read the comment docs.

Copy link
Member

@astrofrog astrofrog left a comment

Choose a reason for hiding this comment

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

This looks good but to check the CI failures this should be rebased once #2284 is merged.

@astrofrog
Copy link
Member

@Carifio24 could you add a changelog entry for a new 1.4.0 version in the changelog?

@Carifio24
Copy link
Member Author

@astrofrog Just added the changelog entry

@astrofrog
Copy link
Member

I've rebased to fix a conflict

@astrofrog astrofrog merged commit bc93828 into glue-viz:main May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants