eteq / nb-astroimage-api

An experimental API for notebook-based astronomical image viewers
2 stars 1 forks source link

Original comment from @gpdf #2

Open eteq opened 5 years ago

eteq commented 5 years ago

Comment from @gpdf in https://gist.github.com/eteq/bb625148969db51b2b03b71e92ca5231

I wonder if we really want to insist that this is a "widget". It would be useful, I think, for it to work > just as well for sending data/controls to an out-of-notebook display (e.g., DS9).

I think I would prefer "export" to "save" for the "Save out the current image view to an on-disk image." functionality, unless it's literally meant to be a file format that preserves all of the state of the viewer. I can't tell exactly what was meant by saving the current "view".

I am a bit concerned about the definition of the zoom level in terms of "physical pixels"; this seems less well defined in the current era of "Retina"-type displays where the O/S or browser's notion of a pixel may not be the same as the actual screen pixel. I would also suggest adding some way to say things like "zoom to fit" and "zoom to region" (x/y or skycoord) via the API, perhaps by keyword. "Zoom to region", in particular, has already been something that has been shown to be desired by users in the context of the comparable backend-independent LSST API. (The use case is putting up an image and the catalog of objects detected on that image, and then allowing a user to browse through that list of objects and zoom in to the region of the image on which that object was measured - its "footprint", in LSST-speak.)

Aside from those individual comments, it looks like an appropriate API. I'll look at it with the Firefly development team in some more detail soon.

mwcraig commented 5 years ago

FWIW, I think a non-interactive version makes sense....I was thinking more along the lines of matplotlib than ds9, but this API is a lot more convenient than what is generally available currently for displaying images in notebooks non-interactively.