astropy:docs

SAMP (Simple Application Messaging Protocol (astropy.vo.samp)

Introduction

astropy.vo.samp is an IVOA SAMP (Simple Application Messaging Protocol) messaging system implementation in Python. It provides classes to easily:

  1. instantiate one or multiple Hubs;
  2. interface an application or script to a running Hub;
  3. create and manage a SAMP client.

astropy.vo.samp provides also a stand-alone program samp_hub capable to instantiate a persistent hub.

SAMP is a protocol that is used by a number of other tools such as TOPCAT, SAO Ds9, and Aladin, which means that it is possible to send and receive data to and from these tools. The astropy.vo.samp package also supports the ‘web profile’ for SAMP, which means that it can be used to communicate with web SAMP clients. See the sampjs library examples for more details.

The following classes are available in astropy.vo.samp:

Reference/API

astropy.vo.samp Module

This subpackage provides classes to communicate with other applications via the Simple Application Messaging Protocal (SAMP).

Before integration into Astropy it was known as SAMPy, and was developed by Luigi Paioro (INAF - Istituto Nazionale di Astrofisica).

Classes

Conf Configuration parameters for astropy.vo.samp.
SAMPClient(hub[, name, description, ...]) Utility class which provides facilities to create and manage a SAMP compliant XML-RPC server that acts as SAMP callable client application.
SAMPClientError SAMP Client exceptions.
SAMPHubError SAMP Hub exception.
SAMPHubProxy() Proxy class to simplify the client interaction with a SAMP hub (via the standard profile).
SAMPHubServer([secret, addr, port, ...]) SAMP Hub Server.
SAMPIntegratedClient([name, description, ...]) A Simple SAMP client.
SAMPMsgReplierWrapper(cli) Function decorator that allows to automatically grab errors and returned maps (if any) from a function bound to a SAMP call (or notify).
SAMPProxyError(faultCode, faultString, **extra) SAMP Proxy Hub exception
SAMPWarning SAMP-specific Astropy warning class
WebProfileDialog A base class to make writing Web Profile GUI consent dialogs easier.

Class Inheritance Diagram

digraph inheritanceec53744177 { rankdir=LR; size="8.0, 12.0"; "AstropyUserWarning" [style="setlinewidth(0.5)",URL="../../api/astropy.utils.exceptions.AstropyUserWarning.html#astropy.utils.exceptions.AstropyUserWarning",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",tooltip="The primary warning class for Astropy.",height=0.25,shape=box,fontsize=10]; "AstropyWarning" -> "AstropyUserWarning" [arrowsize=0.5,style="setlinewidth(0.5)"]; "AstropyWarning" [style="setlinewidth(0.5)",URL="../../api/astropy.utils.exceptions.AstropyWarning.html#astropy.utils.exceptions.AstropyWarning",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",tooltip="The base warning class from which all Astropy warnings should inherit.",height=0.25,shape=box,fontsize=10]; "Conf" [style="setlinewidth(0.5)",URL="../../api/astropy.vo.samp.Conf.html#astropy.vo.samp.Conf",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",tooltip="Configuration parameters for `astropy.vo.samp`.",height=0.25,shape=box,fontsize=10]; "ConfigNamespace" -> "Conf" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ConfigNamespace" [style="setlinewidth(0.5)",URL="../../api/astropy.config.ConfigNamespace.html#astropy.config.ConfigNamespace",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",tooltip="A namespace of configuration items. Each subpackage with",height=0.25,shape=box,fontsize=10]; "Error" [style="setlinewidth(0.5)",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",tooltip="Base class for client errors.",height=0.25,shape=box,fontsize=10]; "Fault" [style="setlinewidth(0.5)",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",tooltip="Indicates an XML-RPC fault package.",height=0.25,shape=box,fontsize=10]; "Error" -> "Fault" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SAMPClient" [style="setlinewidth(0.5)",URL="../../api/astropy.vo.samp.SAMPClient.html#astropy.vo.samp.SAMPClient",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",tooltip="Utility class which provides facilities to create and manage a SAMP",height=0.25,shape=box,fontsize=10]; "SAMPClientError" [style="setlinewidth(0.5)",URL="../../api/astropy.vo.samp.SAMPClientError.html#astropy.vo.samp.SAMPClientError",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",tooltip="SAMP Client exceptions.",height=0.25,shape=box,fontsize=10]; "SAMPHubError" [style="setlinewidth(0.5)",URL="../../api/astropy.vo.samp.SAMPHubError.html#astropy.vo.samp.SAMPHubError",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",tooltip="SAMP Hub exception.",height=0.25,shape=box,fontsize=10]; "SAMPHubProxy" [style="setlinewidth(0.5)",URL="../../api/astropy.vo.samp.SAMPHubProxy.html#astropy.vo.samp.SAMPHubProxy",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",tooltip="Proxy class to simplify the client interaction with a SAMP hub (via the",height=0.25,shape=box,fontsize=10]; "SAMPHubServer" [style="setlinewidth(0.5)",URL="../../api/astropy.vo.samp.SAMPHubServer.html#astropy.vo.samp.SAMPHubServer",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",tooltip="SAMP Hub Server.",height=0.25,shape=box,fontsize=10]; "SAMPIntegratedClient" [style="setlinewidth(0.5)",URL="../../api/astropy.vo.samp.SAMPIntegratedClient.html#astropy.vo.samp.SAMPIntegratedClient",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",tooltip="A Simple SAMP client.",height=0.25,shape=box,fontsize=10]; "SAMPMsgReplierWrapper" [style="setlinewidth(0.5)",URL="../../api/astropy.vo.samp.SAMPMsgReplierWrapper.html#astropy.vo.samp.SAMPMsgReplierWrapper",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",tooltip="Function decorator that allows to automatically grab errors and returned",height=0.25,shape=box,fontsize=10]; "SAMPProxyError" [style="setlinewidth(0.5)",URL="../../api/astropy.vo.samp.SAMPProxyError.html#astropy.vo.samp.SAMPProxyError",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",tooltip="SAMP Proxy Hub exception",height=0.25,shape=box,fontsize=10]; "Fault" -> "SAMPProxyError" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SAMPWarning" [style="setlinewidth(0.5)",URL="../../api/astropy.vo.samp.SAMPWarning.html#astropy.vo.samp.SAMPWarning",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",tooltip="SAMP-specific Astropy warning class",height=0.25,shape=box,fontsize=10]; "AstropyUserWarning" -> "SAMPWarning" [arrowsize=0.5,style="setlinewidth(0.5)"]; "WebProfileDialog" [style="setlinewidth(0.5)",URL="../../api/astropy.vo.samp.WebProfileDialog.html#astropy.vo.samp.WebProfileDialog",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",tooltip="A base class to make writing Web Profile GUI consent dialogs",height=0.25,shape=box,fontsize=10]; }

Acknowledgments

This code is adapted from the SAMPy package written by Luigi Paioro, who has granted the Astropy project permission to use the code under a BSD license.