ejeschke / ginga

The Ginga astronomical FITS file viewer
BSD 3-Clause "New" or "Revised" License
121 stars 77 forks source link

SAMP integration #25

Closed RayPlante closed 10 years ago

RayPlante commented 11 years ago

Adding SAMP support will allow ginga to receive directives from other applications (either in a web browser or on the desktop) to load particular datasets.

RayPlante commented 11 years ago

The common application MTypes are documented here: http://wiki.ivoa.net/twiki/bin/view/IVOA/SampMTypes

The key ones of interest to Ginga would be:

Others that might be of interest would be:

This is in addition to the administrative MTypes defined in the SAMP standard (v1.3, section 6.4.2).

RayPlante commented 11 years ago

JSAMP is the Java-based hub that supports web samp; find it at http://software.astrogrid.org/p/jsamp/1.3-2/.

ejeschke commented 11 years ago

This is a great idea, Ray. I've included a new alpha-quality SAMP plugin in the latest commit. It is based on the SAMPy module (https://pypi.python.org/pypi/sampy/) which, judging by this message (https://github.com/astropy/astropy/pull/972) may eventually find it's way into astropy, which would be very nice.

If you install sampy (or put it in your PYTHONPATH somewhere), you can try the new module by running ginga with the --modules=SAMP option. There is currently no gui for this global plugin. At the moment, it only really supports the image.load.fits message type, but I've included some boilerplate code for registering for the others you mentioned. I've tested it with the web-based VAO Data Discovery tool, using Aladin as the hub. Although SAMPy looks like it should support the web-enabled hub integration, it didn't seem like the hub was receiving any messages from the data discovery tool, even when I ran it in verbose debugging mode.

RayPlante commented 11 years ago

Excellent--I'll try it. I will see if I can figure out what's going on with SAMPy and web-samp messages.

ejeschke commented 10 years ago

The SAMP plugin is now based on the version of SAMPy that was merged into AstroPy. Ginga could probably stand to have better support for some of the other messages, but it seems to work find for loading FITS files anyway.

ejeschke commented 10 years ago

The plugin could use some more testing and support for other SAMP messages.