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 bad pixel monitor plots #1202

Conversation

bhilbert4
Copy link
Collaborator

Remove bokeh templating from the bad pixel monitor plots, and make some tweaks to make them more useful and faster to load.

I'm trying to make these a little more interactive than the plots from the dark monitor. In this case, the figure/plot creation will be called as the final step of the bad pixel monitor itself (or it can be called separately at any time). The output will be a separate html file for each instrument. Then when a user requests the bad pixel monitor page, it simply loads the html file.

Bokeh creates and saves the html file itself. There is then a bit of editing to place the relevant lines from that file into our jinja template. The bokeh lines can end up being quite long since they contain all of the plotted points and hover tools. So we sacrifice some speed there compared to the dark monitor plots, which are simply png files that are loaded and displayed. But in return for that we get more interesting/useful plots.

@bhilbert4 bhilbert4 self-assigned this Feb 23, 2023
@bhilbert4 bhilbert4 linked an issue Feb 23, 2023 that may be closed by this pull request
@bhilbert4 bhilbert4 linked an issue Feb 28, 2023 that may be closed by this pull request
@bhilbert4
Copy link
Collaborator Author

In order for this to work on the servers, we'll need to install the packages described in #1200. This is done on the test server and I didn't see any problems.

@bhilbert4 bhilbert4 changed the title [WIP]: Improve bad pixel monitor plots Improve bad pixel monitor plots Mar 7, 2023
@bhilbert4
Copy link
Collaborator Author

@mfixstsci this is ready for review.

Copy link
Collaborator

@mfixstsci mfixstsci left a comment

Choose a reason for hiding this comment

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

Thanks for submitting this @bhilbert4 just a couple of comments here.

jwql/utils/constants.py Show resolved Hide resolved
jwql/utils/utils.py Outdated Show resolved Hide resolved
jwql/website/apps/jwql/monitor_views.py Show resolved Hide resolved
@mfixstsci
Copy link
Collaborator

@bhilbert4 thanks for the responses, I am going to wait for the branch to rebase and then will merge the changes.

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.

bokeh.io.export_png may fail on server Strip bokeh templating out of dark and bad pixel montiors
2 participants