Miriade

ViSiON

Visibility Service for Observing Nights

The method vision is intended to people who wants to prepare their observing nights of Solar system objects, at a given epoch and for a given geographic location. Example: what is the visibility, at Cerro Paranal (IAU code 309) of planet Mars, asteroid (107) Camilla, comet 67P, star HIP 87937, globular cluster M 70, and the Small Magellanic Cloud (SMC) on 1st September 2020?

💡 The answer in PDF or VOTable format.

HTTP Request

The Miriade vision service can be accessed using the Miriade query forms. If you are a software/solutions developer, you might want to include the Miriade vision service into your application. This can be done by using the Web service method or by using the following HTTP request:
https://ssp.imcce.fr/webservices/miriade/api/vision.php?[parameters]
where [parameters] is a list of parameters separated by the character &. The allowed parameters are:
ParameterDefinitionLimits or value
-name=<string> Comma separated list of designation of solar system bodies Default: Mars, Jupiter and Saturn
-ep=<date> Requested starting epoch (at 12h) JD | Y-m-d, Default: now
-nbd=<integer> The number of date of computation 1 ≤ nbd < 366, Default: 1
-step=<integer> The step between two dates of computation Default: 1, Unit: days
-observer=<string> Code or geographic coordinates of the observer's location Default: 007 (Paris, France)
-cuts=<string> String which defines the cuts of visibility Default: see doc
-sort=<string> String which defines the column used to sort entries Default: right ascension
-mime=<string> Mime type of the results votable | html | pdf
-from=<string> Word which definite the name of the caller application, or which describes the request (optional) Any short string
(no space character)

The output parameters are described in the following section, and are available in VOTable (default), HTML, or PDF format (see examples). The parameters with a default value are optionnal, and they can be omitted (just left blank the value, e.g. ...&-mime=&...). The other input parameters are mandatory.

Web service

The Miriade Web service provides methods based on SOAP and HTTP POST verb which allow one to interact between its own application and the Miriade service. Here is the useful information to invoke the Miriade vision method:
Web Service URI:
https://ssp.imcce.fr/webservices/miriade/miriade.php
Namespace:
https://ssp.imcce.fr/webservices/miriade
WSDL:
https://ssp.imcce.fr/webservices/miriade/miriade.php?wsdl
SOAP header:
name of the SOAP header element: clientID
SOAP header's content: array('from' => 'YourName', 'hostip'=>'', 'lang'=>'en|fr')
Method:
vision (inputArray)
The input parameter of the method is an array which must contained the following parameters:
VariableTypeUnitsLimits or valuesDefaultComment
name String - <prefix>:<name> - Comma separated list of designation of solar system bodies
epoch string JD | y-m-d -1000 to +1000 years
from J2000
now Requested starting epoch (at 12h)
nbd integer - 1 .. 366 1 The number of dates of computation
step integer days - 1 The step between two dates of computation
observer string - Earth location Paris (007) Code or geographic coordinates of the observer's location
cuts string - see doc default String which defines the cuts of visibility
sort string - see doc ra String which defines the column used to sort entries
mime string - votable | html | PDF votable Mime type of the results

The output of the method is an object containing the following attributes:

'flag'
the status of the response: flag=1 means ok; flag=0 or flag=-1 mean that an error occured
'status'
the HTTP status-code of the response (e.g. 400: bad request, 422: Unprocessable Entity, 500: internal error)
'ticket'
the Unix timestamp of the response which can be useful to stamp the request
'result'
a string containing the result of the request, as a PDF or a VOTable document.
Depending on the selected mime type, the output is formatted as:
votable
the data are written in the IVOA standard VOTable format
html
the data are transformed from VOTable to HTML by XSLT processing (Miriade XSL style sheet)
pdf
the data are returned as a PDF document (application/pdf)

Query examples

Examples: click on the following links to get the visibility now of Ceres, Mars and Jupiter at La Silla observatory (ESO, Chile), with:

Output results

The output result of the vision method is composed of a table and two figures per date of computation. The meaning of the displayed quantities is given in the following table. For each target, the values are reported at the time of the highest elevation.

QuantityDesciptionUnit
Target Target designation -
mV Apparent magnitude mag
φ Apparent diameter arcsec
D Duration of visibility window h:m
Alt Elevation above the horizon deg
Az Azimuth angle deg
RA Right Ascension h:m:s
DEC Declination d:m:s
Rate Apparent non-sidereal motion arcsec/h
λG Galactic longitude deg
βG Galactic latitude deg
r Range to observer au
Heliocentric distance au
α Solar phase angle
SEO Solar elongation deg
MEO Moon elongation deg

 

Example of figures provided by ViSiON

How to consume

You have two ways to use the Miriade web service: by writting a client to send requests to the Miriade server and to receive and analyze the response, or by using a command line interface and a data transfert program such as curl or wget. For that, just execute one of the following commands in a console:
$> curl "<URL>"
or
$> wget "<URL>"
where <URL> is described in section HTTP request.

In order to help you to invoke the Miriade web service, we provide some clients written in differents languages. Here are some detailed explanations to write a client with PHP and SOAP which invokes the vision method:

1/ Provide the input parameters which are mandatory for the service:

// Client's ID: provide the name of your project or organisation or yourself
$from = 'MyName';
// Input parameters
$param = array('name' => 'p:4,a:107,c:67P,u:HIP_87937,u:M_70,e:13.15-72.80=SMC"',
               'epoch' => 2455886.5,
               'nbd' => 1,
               'step' => 1,
               'observer' => 809,
               'cuts' => '',
               'sort' => '',
               'mime' => 'pdf'
);

2/ Define the SOAP options, the namespace and the WSDL URI of Miriade web service:

// Enables or disables the WSDL caching feature
ini_set('soap.wsdl_cache_enabled', 1);
// Miriade namespace
$namespace = 'https://ssp.imcce.fr/webservices/miriade';
// Miriade WSDL
$uriwsdl = $namespace.'/miriade.wsdl';

3/ Create a SoapClient object in WSDL mode, set the SOAP header, then call the method and catch exceptions:

try {
   // Constructs the client
   $client = new SoapClient($uriwsdl, array('exceptions'=>1));
   // SOAP header
   $header = array('from'=>$from, 'hostip'=>'', 'lang'=>'en');
   $client->__setSoapHeaders(array(new SOAPHeader($namespace, 'clientID', $header)));  
   // Call the resolver method
   $response = $client->__soapCall('vision',array($param));
   // Display the results
   if ($param['mime'] == 'pdf') {
      header("HTTP/1.0 ".$response->status);
      header("Content-Type: application/pdf");
      echo file_get_contents($response->result);
   } else {
      header("HTTP/1.0 ".$response->status);
      header("Content-Type: text/xml;content=x-votable");
      echo $response->result;
   }
} 
catch (SoapFault $fault) 
{
   trigger_error("SOAP Fault: {$fault->getTraceAsString()} (faultcode: {$fault->faultcode}, 
                               faultstring: {$fault->faultstring})", E_USER_ERROR);
}