Comments (18)
Eric refactored a bunch of stuff. You might want to see his commit changes for clues.
from stginga.
Actually its not what I was afraid of; actual functionality change. Seems more that some layout default, such as stretch, for ImageViewCanvas, has changed. Not critical.
from stginga.
@stscieisenhamer, I'm trying MultiImage
. I can draw a region and it creates an image in the lower bar, but I cannot figure out how to add a new image. Can I add new cutouts from a single image?
Edit: I'm beginning to grok this. Switch to another image in the channel to add a new stamp. I take it that it is not possible to add multiple stamps per same image?
from stginga.
If you drag another image into the channel, it should add automatically. Or if other images are in the channel already, just rotate to them using the arrow keys.
And no, there is only one cutout.
from stginga.
Cool. Is there a limit on the number of stamps?
from stginga.
And MIPick
just works as another way to set the region?
from stginga.
Anyway, stamps seem to work for me. What kind of problem are you seeing?
from stginga.
No: no limit, except for hardware
Yes: MIPick is just another way to choose the region, combining the stats of Pick while fixing on a sky region instead of a pixel region. Sometimes this gets confused when an image has no overlapping sky. Haven't dealt with that yet.
And the problem of this issue is just a visual. At some commit which I forget, previously the stamps would center and fill the HBox. Then as more were added, the HBox would evenly divide, each filling an equal area.
Now, the first one only takes the left 1/4 of the space. As more add, the remaining quarters are filled. Then, as more are added, the evenly divided behavior takes over.
I started investigating: has something to do with an object changing from HBox to a native Qt.Widget, but I didn't get too far.
from stginga.
I see what you are saying. You can probably fix that with the right "expand" options set on the horizontal container widget in your build_gui()
method. To me it doesn't look bad now.
Couple of notes, FWIW:
-
I notice now that once the row gets filled there is no way to get to the new stamps except by resizing the top level window (which is limited by screen size). Might be good to embed the container in a
ScrollArea
--then scroll bars would appear automatically when it filled up and overflowed. -
I think this kind of plugin could certainly work across channels as well. In that case it probably would be better as a global plugin. I notice that if I add a new channel and start a second
MultiDim
in that then it's difficult to tell anyway which images belong to which channel. Another possible configuration would be one stamp for each channel, and a stamp would update as you stepped through images in that channel. That probably fits better with the idea behind @hcferguson's workflow (as I understand it). -
I can imagine that it might be convenient to have a keystroke (and button in the GUI) to add a stamp. That way you don't always automatically get a new stamp when you visit a new image. This could be a preference, maybe?
-
Might be nice to have a little "X" button or at least a right-click context menu to close stamps that you are done with.
Looks like a very useful plugin!
from stginga.
Excellent suggestions! And, I see a path to success....
The desire was to have all stamps shown so that as you view the main image, you can see what that same region is in the other images. How this was to work with the multi images per channel and multiple channels was unclear. However, @ejeschke suggestion #3 gave the needed hint. A possible workflow is then:
- MultiImage becomes a global plugin, and is started at any point
- To add an image, an explicit keystroke is needed.
- Where the image comes from is irrelevant
- To cycle through the images, a different set of keystrokes, or overload of the arrow keys, will cycle through the JUST the images added to MultiDim, as long as that plugin has focus. Again, the cycling would cross channels if necessary.
- As in #4 above, images would be removed.
- The image in the main viewer does not actually have to be part of the stamps. <- Need to think about that.
from stginga.
As @ejeschke stated to me before, the same image can be loaded into different channels. How do you plan to handle duplicates?
from stginga.
@pllim, would that be a problem? If the stamps are added manually, and are maintained on a per-image basis, then if the user decides to open two different stamps for the same image then that's a kind of user error, IMO, no matter how you navigated to the images (in one channel or two, etc.).
from stginga.
I could see a potential benefit of having the same image in two different stamps with a different colormap. I actually used this kind of thing in ds9 blinking between images doing supernova searches. When looking at potential candidates, it was useful to have both a heavy stretch and a log stretch handy.
from stginga.
Okay. Just want to make sure we covered this feature.
from stginga.
OK. Sounds like a plan. I'll be making separate issues to do the implementation, since this discussion went off-the-rails-with-respect-to-the-issue.
With-respect-to-the-issue, I'm closing. Not really a functional nor usability issue. Will revisit after functionality changes.
from stginga.
TL;DR: postage stamps fixed in latest ginga, please see MultiImage
edits I posted to @pllim's ginga-dev box folder; all other STScI plugins I was able to test look ok, but please test and LMK
longer explanation: The latest ginga in master completes a unification of the widget-specific code (such as GingaQt
and GingaGtk
, etc). Almost all platform-specific widget code now has been pushed all the way down into the Widgets.py
wrappers. This doesn't much effect the plugins (as they were almost all already working with wrapped versions) except in instances where you want to make a call directly against the Qt API (say)--in such cases you need to extract the widget with get_widget()
. I only found a couple of spots in MultiImage
where this was happening--you can see the trivial changes I made to get it working with the latest. And--bonus--the postage stamps are working again as I think you expect!
from stginga.
@ejeschke , I made your edited version into a PR (see #50). @stscieisenhamer , what do you think?
from stginga.
Fixed by #50. Thanks, @ejeschke !
from stginga.
Related Issues (20)
- Add CITATION HOT 2
- Infrastructure updates notice from Astropy Project
- Port CI to GitHub Actions
- Get rid of astropy-helpers submodule
- Use setuptools-scm for version numbering
- Update JWST DQ flags for DQInspect HOT 1
- Zenodo
- Instrument FGS missing from Data Quality Inspection HOT 4
- Automatic PyPI publication enabled HOT 1
- MNT: VisibleDeprecationWarning Creating an ndarray from ragged nested sequences (numpy 1.19) HOT 1
- Finish 1.2 release HOT 1
- Update utils.scale_image to mask/ignore bad pixels HOT 30
- MNT: Bump Python minversion to 3.7
- MNT: Use argparse in entry point function HOT 1
- How correct is scale_wcs? HOT 6
- MNT: New release to go with Ginga 3.2
- TST: Handle warnings
- BadPixCorr plugin might be incompatible with Ginga v4 HOT 9
- Add more description of how to use a plug-in to the docs HOT 2
- numpy 2.0 support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stginga.