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

Use Jdaviz for quick look analysis #139

Open
Ajb2307 opened this issue Aug 4, 2023 · 13 comments
Open

Use Jdaviz for quick look analysis #139

Ajb2307 opened this issue Aug 4, 2023 · 13 comments
Assignees
Labels
enhancement New feature or request low priority Not a current requirement

Comments

@Ajb2307
Copy link

Ajb2307 commented Aug 4, 2023

The Bokeh spectra viewer could be replaced with the JDAViz viewer. This may be beneficial since JDAViz is much more interactive.

@kelle kelle changed the title Boken to JDAViz Bokeh to JDAViz Aug 11, 2023
@kelle kelle added the enhancement New feature or request label Aug 15, 2023
@kelle
Copy link
Contributor

kelle commented Aug 15, 2023

@kelle kelle added the low priority Not a current requirement label Aug 15, 2023
@pllim
Copy link

pllim commented Aug 17, 2023

Hello and thank you for your interest! Jdaviz is developed by STScI. Please contact STScI Help Desk if you have further concerns or questions.

https://jwsthelp.stsci.edu

@Will-Cooper Will-Cooper self-assigned this Sep 12, 2023
@kelle kelle changed the title Bokeh to JDAViz Use Jdaviz for quick look analysis Oct 6, 2023
@kelle
Copy link
Contributor

kelle commented Oct 6, 2023

We explored this at .Astro12 with @dr-rodriguez , @bmorris, and @havok2063. We think it's possible and a good idea to integrate jdaviz into the SIMPLE website! The idea would be to have a link on each result page which would launch a separate specviz window with all of the spectra for that source loaded. (This would not replace bokeh, but rather provide an option to do more with jdaviz.)

I started a jdaviz-sandbox branch to mess around in.

Dependencies:

  • solara
  • jdaviz
  • jupyterlab - need jupyterlab, not jupyter

(More later...)

@dr-rodriguez
Copy link
Collaborator

Some extra notes:

Running solara requires a python file with some specifications (see kelle#1)
Long term we should look at what it takes to have a second application (solara) running alongside the flask website on Reclaim Cloud.
We would need to do some extensive testing to make sure things work as expected.

Some key issues to sort out:

  • How to run solara in Reclaim Cloud
  • How to send the target information to load:
    • Do we update the python file solara is loading?
    • Do we create a new python file?
  • How do we invoke solara from the flask application?

@kelle
Copy link
Contributor

kelle commented Jan 17, 2024

Chatted with @bmorris3 today and we discussed the option of adding a button which launches a jupyter notebook and loads the spectra and jdaviz rather than trying to embed jdaviz into the website. (Brett, please correct me if I'm misunderstanding what the launch button does.)

@dr-rodriguez , thoughts?

@dr-rodriguez
Copy link
Collaborator

I have no objections to that approach and it'll probably be easier that way than trying to integrate to our existing interface (or change it with the extra requirements).

@kelle
Copy link
Contributor

kelle commented Jan 17, 2024

Do you know how to do it?

@dr-rodriguez
Copy link
Collaborator

I don't, but I imagine the questions above from #139 (comment) would be relevant, particularly if we decide to stick with the solara prototype we were able to do at dotAstro

@Will-Cooper
Copy link
Member

Launching it from a UI button should be okay to do, I'm more worried about the load times and the server being overloaded. It already struggles if having to load more than a few results pages co-currently.

@bmorris3
Copy link

bmorris3 commented Jan 18, 2024

@dr-rodriguez To clarify @kelle's comment: my pitch for a workaround to avoid running jdaviz on your server is:

- write a template jupyter notebook that contains the few jdaviz calls necessary to visualize SIMPLE spectra
- write a script on your server that fills in the template notebook with a list of URLs for the spectra that the user wants to download and visualize on their machine
- the visualize button on your webpage will download the notebook with URLs filled in, and the user can use jdaviz locally

Benefits to this approach:
- less expensive on the server
- less maintenance burden

  • the local jdaviz use-case is officially supported by STScI

We already do this on MAST. If you view a data product via jdaviz@MAST, you can click a button in the upper right which says: Open Data In, and download such a Jupyter notebook. Try it here!

@Will-Cooper
Copy link
Member

Ah yes, that makes sense, sounds like a good plan!

@dr-rodriguez
Copy link
Collaborator

So it's less that we offer a visualization and more that we provide a downloadable notebook? I guess that's fine, but it seems to defeat the purpose of the website interface.
In fact, why even bother creating a template? Just have the notebook read the database file and have the user run a cell that specifies their target name. They'll have to have the database file and all the relevant software, but that's only a little bit more to ask since they'll still need the packages to run jdaviz to begin with.

@bmorris3
Copy link

We discussed this as a very simple and very attainable fallback to the webapp, if less desirable. If the webapp approach takes too much work or is too flaky, this will be easier and will work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority Not a current requirement
Projects
None yet
Development

No branches or pull requests

6 participants