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

Improve explore image #1282

Merged
merged 17 commits into from
Jul 10, 2023

Conversation

melanieclarke
Copy link
Collaborator

A few new improvements for the explore image page:

  • configure zoom and figure size to make sure pixels stay square
  • move scale controls to client side for faster response
  • implement some useful default scale settings
  • move hover tool display to a separate div and add RA/Dec if applicable
  • add optional column and row plots alongside the image, showing a cross-section of the data at a clicked position in the image

@melanieclarke melanieclarke self-assigned this Jun 14, 2023
@melanieclarke melanieclarke linked an issue Jun 14, 2023 that may be closed by this pull request
@melanieclarke melanieclarke changed the title WIP: Improve explore image Improve explore image Jun 21, 2023
Copy link
Collaborator

@bhilbert4 bhilbert4 left a comment

Choose a reason for hiding this comment

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

This is great! I like the improved speed when rescaling and the new layout of the hover information. The line plots look great. Pre-computing them all can be slow, but defaulting to not showing the plots should keep loading time down for those who don't care about the plots.

One detail I'm on the fence about is forcing the pixels to stay square, just because it limits how you can zoom in on details a bit. I think in most cases it's nice. But just to show a case on a fairly extreme aperture: https://jwql-test.stsci.edu/NIRCam/jw02084001001_04103_00001-seg001_nrca1_rate/explore_image/
I found it a little difficult to zoom in on the sources I wanted in this case. But, there are very few NIRCam observations taken with this aperture. It might be that a little difficulty in looking at these data is ok in return for the convenience with all the other observations taken through apertures that are closer to square. And it might be that with a little practice, working with these extreme apertures is just as easy as with others.

I should also mention that my JS/html knowledge is limited enough that I'm not able to provide a very deep review. It all looks reasonable to me, and my functional testing on the test server shows that everything is behaving as expected though.

jwql/utils/interactive_preview_image.py Show resolved Hide resolved
jwql/utils/interactive_preview_image.py Show resolved Hide resolved
jwql/utils/interactive_preview_image.py Show resolved Hide resolved
jwql/website/apps/jwql/views.py Outdated Show resolved Hide resolved
jwql/utils/interactive_preview_image.py Outdated Show resolved Hide resolved
jwql/utils/interactive_preview_image.py Show resolved Hide resolved
@melanieclarke
Copy link
Collaborator Author

@bhilbert4 - Thanks for your comments! I'll address the specific threads above.

For the square pixels, I completely agree that it makes it harder to zoom to a rectangle, and I was quite surprised bokeh didn't have any better solution. I think it's necessary, though, to make sure images stay useful for analysis, especially for the subarray cases.

For comparison, here's a spectral image I look at a lot for testing. Compare the current version, which does not enforce square pixels to the test version that does. Once the pixels have gone oblong, the image becomes very difficult to interpret, and it can't be recovered from.

For what it's worth, for small subarrays, zooming via mouse scrolling seems to work better than zooming to a rectangle.

@bhilbert4
Copy link
Collaborator

I see what you mean about that oblong spectrum. It definitely makes sense to force square pixels in that case.

@bhilbert4
Copy link
Collaborator

From my perspective, this is ready to merge. @mfixstsci

@mfixstsci
Copy link
Collaborator

@bhilbert4 thank you for the review. I will go ahead and get it in!

@mfixstsci mfixstsci merged commit 6c98cb3 into spacetelescope:develop Jul 10, 2023
6 checks passed
@melanieclarke melanieclarke deleted the improve_explore_image branch July 21, 2023 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add row/column plots based on mouse position in Explore Image
3 participants