spacetelescope / imexam

imexam is a python tool for simple image examination, and plotting, with similar functionality to IRAF's imexamine
http://imexam.readthedocs.io
BSD 3-Clause "New" or "Revised" License
74 stars 45 forks source link

When given an HDUList provide option to open all image extensions #172

Open sosey opened 5 years ago

sosey commented 5 years ago

see #170

This could be a little tricky. The ds9 viewer already has a hook for opening up all fits MEF extensions with load_mef_as_multi, as well as one for cubes load_mef_as_cube. For the ginga HTML5 viewer, I think I'd need to run a separate server and multiple tabs or windows, one for each extension. I don't believe there's a way to split the single viewer. It might be easier in this case to create separate control objects, each one connected to a different ginga html5 viewer. The user could loop this themselves already.

bsipocz commented 5 years ago

It's probably water under the bridge, but as a novice user, API wise I would have found it cleaner if load_fits() had kwargs for loading all extensions of a multi extension fits. I simply looked past load_mef_as_cube and load_mef_as_multi when looking for this functionality as in my mind fits files are almost always multi extension anyway :)

sosey commented 5 years ago

Good feedback. I think I original had those names as they correspond to the DS9 functions whch are named similar, and require sending different calls. It's a function not supported by ginga, but perhaps changing the names and considering the API again before the 1.0 is a good idea.

bsipocz commented 5 years ago

are named similar, and require sending different calls

Oh, indeed, yet it was the abbreviation that tricked me (while it's trivial now, after the fact). But before you consider any name/API change it would be probably a good exercise to check on this question with more users. (e.g. task them at a workshop to open up a multi extension fits/HDUList given the current API)

sosey commented 5 years ago

certainly. My plan is to get the python 3 version out first. Then do a serious look at the package and new possible viewers and see if the API should change in away. This will of course rely on some input from users :)