Replies: 3 comments 5 replies
-
@cfigura, there are a couple of answers to this, depending on whether you mean "from another process" (perhaps running in a terminal) or whether you can add code to run in the ginga process. For the former, you probably want to have a look at the "RC" (Remote Control) plugin for Ginga. There is some documentation on its use in the docstring in the module. This plugin can also be a good guide for writing your own custom remote control protocol using some other IPC that you prefer. For the latter scenario, if you are able to take your code (e.g. something running in the terminal) and run it from Python, then you might consider writing your own Ginga plugin. It is not that hard and we would be happy to provide guidance. There is a chapter on it in the readthedocs documentation, and of course, lots of examples in the ginga source code plugins directory. If you are worried about blocking the event loop, you might be able to use something like Python's multiprocessing module to run your code as a subprocess. |
Beta Was this translation helpful? Give feedback.
-
Mahalo nui, thank you so much for your help! It sounds as if what you're doing at Subaru is very much like what we're using DS9 for at Gemini, and what I'm interested in using Ginga for. I've been playing around with the RC plugin with some success (I can load an image!) but the canvas routines are not available. While I can grab a handle on the canvas for "Image": The fact that I'm not seeing even the 'clear' method suggests to me that I'm doing something wrong here. What am I missing? |
Beta Was this translation helpful? Give feedback.
-
@cfigura, any late morning or afternoon would be fine. I will attempt to contact you offline. |
Beta Was this translation helpful? Give feedback.
-
Aloha!
I'm new to Ginga, but I'm investigating it as a possible replacement for our use of SAOImage DS9 in a number of applications.
I have a couple questions that I've been unable to find the answers to, so please bear with me.
We've got a couple of applications currently that are interactive in the terminal, but use a ds9 display instance for display and interaction. Both our application and the DS9 event loops run simultaneously, so that the image view can be modified either from DS9 or from our application.
Is this kind of behaviour possible with Ginga? I've been experimenting both with the ReferenceViewer and with the CanvasView. The ReferenceViewer capabilities are exactly what I'm looking for, but i have not been able to find any documentation on accessing the viewer functions from outside its event loop.
CanvasView, on the other hand, looks to be capable of this, but apparently I would need to build the viewer from the ground up.
I've been looking at the ReferenceViewer code, and have some ideas how one might brute-force this, but I'm wondering if there's something more elegant.
So, to summarise, my questions:
Mahalo nui, I appreciate any help anyone can provide.
Beta Was this translation helpful? Give feedback.
All reactions