Release 3.1.3: SkyView, DS9, Aladin and SAMP

For some while we’ve supported the Virtual Observatory Simple Application Messaging Protocol (SAMP) for SkyView when you are using the jar file. The idea is that you can run a command like:

java -jar skyview.jar position=3c273 survey=dss samp=true

and any SAMP-aware application will be notified about the new image. Such tools include Aladin and the popular DS9 image viewer (and many others). Using SAMP you can pop an image directly into these interfaces. However we weren’t including the SAMP library so you needed to add this into the Java class path to get this to work.

Another thing you had to worry about is that SAMP needs a running SAMP hub. The way SAMP works is that all of the coordinated tasks talk to a single hub task which relays messages as appropriate. Some tools, e.g., Aladin, start up a hub for you so that you don’t need to worry about this, but others, including DS9 do not.

We’ve added the full JSAMP 1.2 JAR (developed by Mark Taylor at Bristol University) inside the SkyView jar to version 3.1.3 of SkyView. That’s pretty much the only change to this version. This not only makes it easier to use the capability — you don’t need to link an outside JAR — it also includes the code for a SAMP hub, so you can use the SkyView jar to start one up for you.

So to push images to Aladin — or any task that starts its own hub — just start Aladin (or other task) and then run SkyView requests.

E.g.,

java -jar Aladin.jar &

java -jar skyview.jar position=3c273 survey=dss
java -jar skvyiew.jar position=3c274 survey=dss
...

To send data to DS9, we add a command to start up a hub using the JSAMP code included in the SkyView jar:

java -cp skyview.jar org.astrogrid.samp.hub.Hub &
ds9 &

java -jar skyview.jar position=3c273 survey=dss
java -jar skvyiew.jar position=3c274 survey=dss
...

In both cases the generated images should magically appear in the viewing applications.

In our examples we’ve run the commands in sequence in the same shell, but you can use different windows if you prefer, but they must all be running on the same machine. You should start the Hub before you start DS9. It’s OK to use the second approach with tasks that run their own hub. Hubs’ initialization code checks to see if a hub is already running and they won’t start up if one is found.

This entry was posted in Announce, releases and tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>