INAF logo
TOCats − HiPS catalogues browser, V. 2.2 − Developed using DIF and Aladin Lite v3.6
Project
DB Table:
Upload
Drag & drop your MOS file here...   or
no file
or input GraceDB URL
Drag & drop your MOC file here...   or
no file
Drag & drop your REG file here...   or
no file
Drag & drop your CSV file here...   or
File format: [label/ID,] RA, Dec [,reg. radius][,...]

Loading...

Loading...
fetching: https://alaskybis.unistra.fr/MocServer/query?get=record&fmt=json&ID=*CDS%2FP%2FDSS2%2Fcolor*
fetching: https://alaskybis.unistra.fr/MocServer/query?get=record&fmt=json&ID=*CDS%2FP%2FDSS2%2Fcolor*
International Celestial Reference System
Copy to clipboard!
zoom out
zoom in
180.0°
×
15.83°
Open the overlays menu
Want to know what is a specific object ?
Use the Simbad pointer tool!
Display the coordinate grid
Some general settings for the
coordinate grid, the reticle or tools to enable
Change the view projection
Full-screen
Base image layer quick selection





ASKAP
ROSAT eRASS1
Objects density map
External Tools
Ref. Cat.
Options



Toggle columns
[ IdLabelRADecMagNobjsHPXidSep ]
Id Label RA Dec Mag Nobjs HPXid Sep
Click to copy URL to clipboard

Direct access to catalogue

Please refer to the section below for details about direct access to TOCats!
Cone Search: open
Click to copy URL to clipboard
Note: radius in degrees; add &conv_fldnames to get the converted table field names
Example of TOCats access from TOPCAT and STILTS (file extension sensitive, e.g. use .tex to get a LaTeX table). You can use any VO-enabled tool to access TOCats.
TOPCAT tip: VO → Cone search → Cone URL: ... RA: ... Dec: ... Radius: ...
STILTS tip: stilts cone serviceurl=...
To get the JSON structure of the shown summary table above:

Database query used
...used query here...

TOCats programmatic access reference
In addition to the web interface, TOCats can be queried from any application using our HTTP services.
Data from catalogue queries are returned in VOTable format unless the &json or &tsv or &csv or &html selector is present in the URL.
Additionally:
  • Get the list of available base (parent) catalogues, with number of objects:

    https://cats.oas.inaf.it/list (or catslist | catalogues | catalogs | basecats)

  • Get the number of objects in a catalogue:

    https://cats.oas.inaf.it/catalogue_name/?n_objects (or n_objs)

  • Get the number of objects in a circular region (coordinates in any notation, radius in degrees):

    https://cats.oas.inaf.it/catalogue_name/region_coords_and_size?n_objects

  • Get the objects in a circular region (coordinates in any notation, radius in degrees):

    https://cats.oas.inaf.it/catalogue_name/radius=X&ra=Y&dec=Z


    Note: add &conv_fldnames if you want to convert of the table field names to standard names (when they are available in the metadata table).

Examples

Query using cURL

Note: you can also use wget, but curl is preferable.
curl -o mycat.vot 'https://cats.oas.inaf.it/gaiadr3/radius=0.1&ra=253.816&dec=-42.192&limit=100'
curl -o mycat.csv 'https://cats.oas.inaf.it/gaiadr3/radius=0.1&ra=253.816&dec=-42.192&limit=100&csv'

curl -H "Accept: application/json" -H "Content-Type: application/json" \
     -o mycat.json \
     -X GET "https://cats.oas.inaf.it/gaiadr3/radius=0.1&ra=253.816&dec=-42.192&limit=100&json"
or (better for use in a script - note the use of the -d option!)
curl -G https://cats.oas.inaf.it/gaiadr3/ \
  -o mycat.vot \
  -d radius=0.1 -d ra=253.816 -d dec=-42.192 -d limit=100

A simple Python script

#!/usr/bin/env python
# Python 2 using "urllib"
#
import urllib, json
url = "https://cats.oas.inaf.it/gaiadr3/radius=0.1&ra=253.816&dec=-42.192&limit=100&json"
response = urllib.urlopen(url)
output = json.loads(response.read())
print output
#!/usr/bin/env python
# Python 3 using "urllib"
#
from urllib.request import urlopen
url = "https://cats.oas.inaf.it/gaiadr3/radius=0.1&ra=253.816&dec=-42.192&limit=100&json"
response = urlopen(url)
print(response.read())
#!/usr/bin/env python
# Python 3 using "requests"
#
import requests
url = "https://cats.oas.inaf.it/gaiadr3/radius=0.1&ra=253.816&dec=-42.192&limit=100&json"
response = requests.get(url)
print(response.json())

# HTML output
#
url = "https://cats.oas.inaf.it/gaiadr3/radius=0.1&ra=253.816&dec=-42.192&limit=100&html"
response = requests.get(url)
print(response.text)

A simple Julia script

# Eventually first run `import Pkg; Pkg.add("HTTP")`
using HTTP
r = HTTP.get("https://cats.oas.inaf.it/gaiadr3/radius=0.1&ra=253.816&dec=-42.192&limit=100&json")
println(String(r.body))

A simple PHP script

1. Simplest ( requesting json)
echo file_get_contents("https://cats.oas.inaf.it/gaiadr3/radius=0.1&ra=253.816&dec=-42.192&limit=100&json");
2. Same request but using cURL functions
#!/usr/bin/env php
<?php
$ch = curl_init();
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_URL,
    'https://cats.oas.inaf.it/gaiadr3/radius=0.1&ra=253.816&dec=-42.192&limit=100&json'
);
$json = curl_exec( $ch );
echo $json;
curl_close( $ch );
?>
3. cURL programmatic, returning VOTable (default)
#!/usr/bin/env php
<?php
$url = 'https://cats.oas.inaf.it';
$cat = 'gaiadr3';

$qry = http_build_query(array(
   'radius' => '0.1',
   'ra'     => '253.816',
   'dec'    => '-42.192',
   'limit'  => '100'
));

$ch = curl_init();
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_URL, "$url/$cat/$qry" );
$vot = curl_exec( $ch );
echo $vot;
curl_close( $ch );
?>
L. Nicastro 2017 − 2025