planetarypy / pystamps

Python PDS image thumnbail browser.
BSD 3-Clause "New" or "Revised" License
1 stars 2 forks source link

Jupyter Widget #10

Open percurnicus opened 7 years ago

percurnicus commented 7 years ago

It would be awesome if there was a Jupyter Widget version of the gui so people can do their image selection directly in the Jupyter Notebook. I imagine the use would be something like:

widget = pystamps.jwidget()
widget.show()
# Select some images within the widget in the notebook
for image in widget.selected_images:
    do_something(image)

I haven't really thought about how best to name everything but that is the basic outline. This widget would mainly serve as a convenience for launching similar widgets for pdsview and pdsspect (yet to be created). However I think it would be best to start with this widget because it is the simplest of them all. Next should be pdsspect because that widget can actually do analysis and would be used the most. If a user wants to just look at an image they can use matplotlib so pdsview should take lowest priority.


Jupyter widgets will allow people to do their analysis in a notebook and it seems publishing that publishing notebooks may start to be a common thing (see LIGO), at least in the astronomy community. I love the idea of publishing notebooks as a the paper itself or as companion to a paper and allowing people to do their analysis within the notebook in a very explicit way would be awesome. I won't be able to start on this issue until late November or early December but if someone wants to get started feel free to assign the issue to yourself! The Model-View-Controller structure is already in place and hopefully it would be as simple as just creating jupyter widget views using the existing Model and Controller but I don't really know since I've never made a jupyter widget before. The model and controller may have to be adjusted to accommodate both a jupyter widget and a gui (essentially let's try to not have two MVCs/repeating code in the project).

percurnicus commented 7 years ago

See this tutorial on creating a jupyter widget if you have never made on before