Skip to content

astrozot/VirtualObservatorySAMP.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VirtualObservatorySAMP

Dev

This package provides a Julia implementation of the Simple Application Messaging Protocol (SAMP), a messaging protocol that enables astronomy software tools to interoperate and communicate (see also Taylor et al. 2015).

Currently, the package implements only the non-callable client interface: this allows one to send synchronous message to SAMP-aware applications such as SAOImage DS9, TOPCAT, Aladin Sky Atlas and similar.

The package can also connect using a WEB hub provided, for example, by Aladin lite.

Example

Open TOPCAT and, then, SAOImage DS9 on your local computer.

Then type the following commands on the Julia REPL:

julia> using VirtualObservatorySAMP

julia> hub = SAMPHub();

julia> client = register(hub, "Test"; 
       description="Simple test of VirtualObservatorySAMP.jl", version=v"1.0.0");

julia> ds9 = first(getSubscribedClients(client, "ds9.get"))
"c2"

julia> getMetadata(client, ds9)
Dict{Any, Any} with 9 entries:
  "samp.icon.url"          => "http://ds9.si.edu/sun.png"
  "author.name"            => "William Joye"
  "author.affiliation"     => "Smithsonian Astrophysical Observatory"
  "ds9.version"            => "8.6"
  "home.page"              => "http://ds9.si.edu/"
  "samp.description.text"  => "SAOImageDS9 is an astronomical visualization application"
  "samp.documentation.url" => "http://ds9.si.edu/doc/ref/index.html"
  "samp.name"              => "ds9"
  "author.email"           => "[email protected]"

julia> callAndWait(client, ds9, "ds9.get"; cmd="version")
VirtualObservatorySAMP.SAMPSuccess{Dict{Any, Any}}(Dict{Any, Any}("value" => "ds9 8.6"))

julia> notify(client, ds9, "image.load.fits"; 
       url="https://fits.gsfc.nasa.gov/samples/UITfuv2582gc.fits", name="Astro UIT")

About

Pure-Julia implementation of the Simple Application Messaging Protocol (SAMP)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages