Recent modifications (11-jan-2014):
%OBJECT can be used to display the requested identifier. For queries by coordinates,
the distance from the requested center can be display with %DIST.
In the script mode, you can perform any kind of queries defined in a script file and get the result in ascii format. You can either define your own format for displaying the data or get the result in a votable, specifying the data fields you are interested in.
The scripting language accepts commands described below. You can define several formats and use them to display data. Votable definitions can be specified and used for output.
echo My first Simbad4 script format object form1 "%IDLIST(1) : %COO(D)" query id hd 1 query id hd 2 goto lab1 query id hd 3 query id hd 4 lab1: # three last queries query id hdx 997 query id hd 998 query id hd 999 format display
A few explanations:
The result comes as a pure ASCII data in the web page, with no embedded HTML, or can be directly received in a file.
Here is the output of the previous script:
::script:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: echo My first Simbad4 script format object form1 "%IDLIST(1) : %COO(D)" query id hd 1 query id hd 2 goto lab1 query id hd 3 query id hd 4 lab1: # three last queries query id hdx 997 query id hd 998 query id hd 999 format display ::console::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: C.D.S. - SIMBAD4 rel 0.97beta - 2006.06.27CEST19:04:55 first Simbad4 script object formats: form1: "%IDLIST(1) : %COO(D)" simbatch done ::error::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Error: the identifier 'hdx 997' could not be recognized for catalogs: hd: Henry Draper h: catalogue H ::data:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: BD+67 1599 : +67 50 24.013 BD+56 3142 : +57 46 13.224 BD+02 18 : +03 28 10.946 BD-03 18 : -02 11 52.789
The output file is divided in four parts:
The section separator is designed to be easily parsed to separate the sections, especially the data part, which can be further ingested in some other application. For instance in VO enabled applications, if it consist of a VOTable output.
For instance, the following perl script extracts the data part of a result file:
#!/usr/bin/perl while (<>) { if (/^::data::/) { $data = 1; next; } if ($data) { print; } }
votable vot1 { MAIN_ID RA(d) DEC(d) PMRA PMDEC ubv } votable open vot1 set radius 30m 12 30 +10 20 13 40 +11 21 15:00-10:10 radius=10m votable close
This script first defines a VOTable output, by specifying the data fields to put in the VOTable (in the example, the main identifier, right ascension and declination in decimal format, proper motions and ubv measurements). Then the VOTable definition is opened, making it active. A radius is defined (30 arcmin) to override the default value (10 arcmin), and finally several coordinate queries are defined. The last one has its own radius value, used only for thist query.
One may notice that the coordinates are written alone on a line, without the command keywords query coo. Whereas one can always write complete commands, the script is able to recognize automatically several kind of queries by analyzing their data part. Namely:
field | full command | command definition | short command | |
identifiers | query id identifier | any identifier. In fact, the script takes as an identifier anything that it cannot recognize explicitely | ngc 1400 1200 | |
around ident | query around identifier | query around an identifier by prefixing it with a '∼' char | ∼sirius | |
catalogue | query cat acronym | all objects from a catalogue | rot | |
coordinates | query coo ra dec | the right ascension and declination can be written alone | 12 30 +10 20 | |
bibcode | query bibcode bibcode | query a bibcode | 2005A | A...430..165F |
The output of this script is a votable, which can be ingested in any VO enabled application.
votable v1 { main_id, coordinates pmra , pmdec flux(B), flux(V) }
object | the format is for astronomical object display |
reference | the format is for displaying references |
format object f1 "%IDLIST(1) : "+ "%COO(D)\n===\n"+ "%BIBCODELIST"
These are the actual query commands. The asterisk before a query means that the command keyword query something can be ommited : the programme is able to guess which kind of data is submitted
wildcard | description | |
* | Any string of characters (including an empty one) | |
? | Any character (exactly one character) | |
[abc] | Exactly one character taken in the list. A list can also be defined by a range of characters: [A-Z] | |
[^0-9] | One character not in the list. |
> query id sirius > query id wildcard m [0-9] > rot 123
> query around hd 1 > query around m1 radius=1d > ~vega radius=20m
> query cat m > set limit 100 > rot
> query coo 12 30 +10 20 > 12:30:34.567 -20:17:15.45 radius=5s frame=FK4 equi=2006.7 epoch=B1950
> query bibcode wildcard 2006A&A* > 2005A&A.430.165F
> query bibobj 2005A&A.430.165F
...
The scripting language has instructions to define the output format of data. Specific formats are applied for astronomical objects and references through the commands
format object [name] "format-string" format reference [name] "format-string"
A format is immediately applied to the next commands when it is defined. The name allows to recall a previously defined format and making it active. If a script defines only one format, the name is not required.
The "format-string" contains a format definition similar to the C language format definitions. Its possibilities are described below.
A format string can be written on several lines as long as a line is ended by a '+' char (except the last line). Only the chars between double quotes participate to the format, allowing any kind of indentation. The first line must contain a first part of the format string.
Example:
format object f1 "%IDLIST(1) | "+ "%-27COO(A D) | "+ "%-15SP(S)"
A format-string consist of a mixture of text, including special characters like newline ('\n') and formatted data items represented by '%DATANAME' associated with several options and modifiers. The usage of modifiers differs somewhat from the C language ones.
Here are a few example, from very simple to more complicate:
Identifiers: PPM 11914 | SKY# 146 | BD+67 1599 TYC 4294-80-1 | GSC 04294-00080 | SAO 10963 AGKR 39 | IRAS 00025+6733 | HIP 422 HIC 422 | IRCO 2001 | HD 1 AG+67 4 | |The introduction text is followed by a newline char.
The complete syntax for a format data item is:
%<+|-><#><0><n.m>FIELD-NAME<(options)><[list-sub-format]>
+ | displays a positive sign if the field is a number | "%+10.3PM(A)" |
- | left justify the displayed field | "%IDLIST[%-20* %-20* %-20*\n]" |
# | displays the number of items if the field is a collection | "number of ids: %4#IDLIST, number of refs: %6#BIBCODELIST\n" |
0 | left fill a number with zeros | "number of ids: %04#IDLIST" |
n | represents, for any type of field, the total number of chars to reserve for its display | "%30IDLIST(1)" |
m | represents the number of decimal positions to display if the field is a decimal number | "coo: %12.8COO(d;A) %12.4COO(d;D)" |
FIELD-NAME | name of the field. The exhaustive list is described below. | %COO %PMRA |
options | several fields have specific options that must be written after the field name between parenthesis. See the details below with the list of fields | "%COO(d;AD) - %COO(B)" "%IDLIST(1)" |
list-sub-format | When the field correspond to a collection, this allows to bypass the default display of the whole collecton. Each element in the collection is applied to a next format entry %* until the whole collection is done. If the collection is larger thant the number of %* items, the sub-format is reexecuted from the beginning as many times as needed to process the whole data collection. | "%IDLIST[%-30* | %-30* | %-30*\n]" "%BIBCODELIST[%* %* %* %*\n]" |
%OTYPE | => | 'Star' |
%OTYPE(S) | => | 'Galaxy' |
%OTYPE(3) | => | 'G' |
%#OTYPELIST | => | '3' |
%OTYPELIST | => | '*,**,X' |
The option string must contain at least one of the object type display options:
%OTYPELIST(S) | => | 'Star,**,X' |
%OTYPELIST(3 - ) | => | '* - ** - X' |
%OTYPELIST(V\n) | => | 'Star |
double or multiple star | ||
X-ray source' |
ra dec (wavelength) quality-code [ellipse error] bibcode
%COO | => | '00 00 00.2158+01 05 20.432 (Vis) A [12.07 6.38 72] 1997A | A...323L..49P' |
formatting-options ';' element-list ';' frame ';' epoch ';' equinox
Any part can be ommited, provided a semi-colon separator separate also an empty part, if an ambiguity can be confusing.
Formatting options are:
Element list consist of:
Any other char than those above can be used to insert text. For instance, the default display (%COO) can be written:
"%COO(A D (W) Q [E] B)".
Frames are ICRS, FK5, FK4, GAL, SGAL or ECL.
Epoch must be prefixed by 'B' or 'J'. Both epoch and equinox
can be integer or decimal numbers expressing years.
Example:
%COO(:;A;FK5;J2000;2006) => '02:39:07.950'
%5.5DIST | => | 64.82121 |
pm-ra pm-dec quality-code [error ellipse] bibcode
%PM | => | '17.89 -14.16 A [2.25 2.11 130] 1997A | A...323L..49P' |
%PM(A|D|E) | => | '17.89 |-14.16 |2.25 2.11 130' |
parallax quality-code [error] bibcode
%PLX | => | '5.14 A [1.65] 1997A | A...323L..49P' |
%PLX(V [E] B) | => | '5.14 [1.65] 1997A | A...323L..49P' |
[v|z] radial-velocity-value (wavelength type) quality-code [error] bibcode
The value is displayed as it was entered in the database: either as
radial velocity ('v'), either as redshift ('z')
Example: %RV => 'z: -0.001004 (Vis) D [0.000023] 2002LEDA.........0P' 'v: 2.6 (Vis) D [0.5] 2004A&A...418..989N'
%RV(rv=V z=Z) | => | 'rv=-301 z=-0.001004' |
%#FLUXLIST | => | '2' |
%FLUXLIST | => | 'U 12.751 D 2006MNRAS.373...13C' |
'B 12.616 D 2006MNRAS.373...13C' | ||
'V 12.005 D 2006MNRAS.373...13C' | ||
'R 11.659 D 2006MNRAS.373...13C' | ||
'I 11.313 D 2006MNRAS.373...13C' | ||
'J 10.868 D 2006MNRAS.373...13C' | ||
'H 10.551 D 2006MNRAS.373...13C' | ||
'K 10.479 D 2006MNRAS.373...13C' |
%FLUXLIST(B,V,R,I) | => | 'B 12.616 D 2006MNRAS.373...13C' |
'V 12.005 D 2006MNRAS.373...13C' | ||
'R 11.659 D 2006MNRAS.373...13C' | ||
'I 11.313 D 2006MNRAS.373...13C' | ||
%FLUXLIST(B,V;N=F (Q) B) | => | 'B=12.616 (D),V=12.005 (D),' |
%FLUXLIST(B;F) | => | '12.616' |
%FLUXLIST(;N=F,) | => | 'U=12.751,B=12.616,V=12.005,R=11.659,I=11.313,J=10.868,H=10.551,K=10.479,' |
%FLUXLIST[%*(N=F (Q)), ] | => | 'U=12.751 (D), B=12.616 (D), V=12.005 (D), R=11.659 (D), I=11.313 (D), J=10.868 (D), H=10.551 (D), K=10.479 (D),' |
%FLUXLIST(U,B,V,R,I)[%*(F) ] | display the given flux values, separated by one space | |
%FLUXLIST(U,B,V,R,I)[%6.2*(F)] | display the given flux values with the given fixed format (6 chars, 2 decimals) | |
Two more complex outputs for the specified fluxes: | ||
%FLUXLIST(B,V)[mb=%*(F), mv+quality=%*(F+Q)] | => | 'mb=12.616, mv+quality=12.005+D' |
%FLUXLIST(U,B,V)[%*(N=F (B))] | display 'flux_name=value (bibcode)' |
%SP | => | 'F5 D ∼' |
%SP(S) | => | 'F7:Ib-IIv' |
%MT | => | 'Sb D ∼' |
%MT(M,Q) | => | 'Sb,D' |
large-axis small-axis angle (wavelength) type quality-code bibcode
%DIM | => | '186.2 61.65 35 (∼) ∼D ∼' |
%DIM(X Y Q) | => | '186.2 61.65 D' |
%OBJECT | => | 'hd22' |
%MAIN_ID | => | 'NAME VEGA' |
%#IDLIST | => | '9' |
%IDLIST | => | 'TYC 1-381-1' |
'HD 224700' | ||
'AG+00 2953' | ||
'BD+00 5077' | ||
'GSC 00001-00381' | ||
'HIC 1' | ||
'HIP 1' | ||
'PPM 143034' | ||
'SAO 128522' |
cat1|cat2...[|1]If the special pseudo-identifier '1' is written as last identifier in the list, then the first identifier in the object will be displayed if none is yet found. If '1' appears alone, then the first identifier (which is also the main identifier) will always be displayed.
cat1,cat2,...
%IDLIST(SA( - );*|HD|1) | => | 'HD 224700' (for HIP 1) |
'* tet02 Ori A - * 43 Ori - * tet02 Ori' (for * tet02 tau) |
%IDLIST[%-40* %-40* %-40*\n] | => | 'TYC 1-381-1 HD 224700 AG+00 2953' |
'BD+00 5077 GSC 00001-00381 HIC 1' | ||
'HIP 1 PPM 143034 SAO 128522' |
%IDLIST(A;LGG,NAME,NOGG)[%-25*(S) %-25*(S)\n] | => | 'LGG 430 NAME NGC 6868 GROUP' |
'LGG 430 NAME NGC 6868 GROUP' | ||
'NAME TEL GROUP NAME TEL CLUSTER' | ||
'NAME TELESCOPIUM CLUSTER NAME TELESCOPIUM GROUP' | ||
'NOGG H 932 NOGG P1 949' | ||
'NOGG P2 962' |
To help you choosing a separator never contained in any identifier, here is the list of all special characters which may exist in identifiers. A good separator should be a special character not contained in this list:
%#BIBCODELIST | => | '29' |
firstyear-lastyear/journal-list
Example: %#BIBCODELIST(2000-2006) => '5' %#BIBCODELIST(A&A,ApJ,MNRAS) => '9'
firstyear-lastyear
Example: %BIBCODELIST(N;1850-1970) => '4'
%BIBCODELIST | => | '2004AJ....128..330D' |
'2003A&A...412..447G' | ||
'2002A&A...393..897R' | ||
'2001A&A...367..521P' | ||
'2001A&A...370..524M' | ||
'1999A&A...349..521F' | ||
... |
firstyear-lastyear/journal-list;max#per_line
The year range and/or the journal list filters the bibcodes. The maximum
number of bibcodes/line is used for the presentation
Example: %BIBCODELIST(1970-2006/apj,aj;4) => '2004AJ....128..330D 1989AJ.....97..510M 1989ApJ...337..251C' '1975AJ.....80..698P'
firstyear-lastyear/journal-list;linesize;ref-format
The year range and/or the journal list filters the references. The linesize
defines the maximum number of chars of a title or an author list to display
on one line. The reference format is described below
Example: %BIBCODELIST(R;1970-2006/apj,aj;80) => '2004AJ....128..330D' 'Astron. J., 128, 330-342 (2004)' 'DELGADO A.J., MIRANDA L.F., FERNANDEZ M. and ALFARO E.J.' 'Photometric and spectroscopic study of stars in the field of the young open' 'cluster Roslund 4.' '1989AJ.....97..510M' 'Astron. J., 97, 510-531 (1989)' 'McALISTER H.A., HARTKOPF W.I., SOWELL J.R., DOMBROWSKI E.G. and FRANZ O.G.' 'ICCD speckle observations of binary stars. IV. Measurements during 1986-1988' 'from the Kitt Peak 4m telescope.' ...
%BIBCODELIST[%-25*%-25*%-25*\n] | => | '2004AJ....128..330D 2003A&A...412..447G 2002A&A...393..897R 2001A&A...367..521P 2001A&A...370..524M 1999A&A...349..521F 1999A&AS..134..359G 1995A&AS..114..269D 1995ApJS...99..135A 1994A&AS..104..121H 1993A&AS..101..599C 1991A&AS...89..415O 1991BAICz..42....1H 1991VeARI..33....1F 1989AJ.....97..510M' ... |
%BIBCODELIST(1970-2007/a&a)[%*|%*\n] | => | '2003A | A...412..447G|2002A | A...393..897R' |
'2001A | A...367..521P|2001A | A...370..524M' | ||
'1999A | A...349..521F|' |
A reference is displayed in a reference format, created by:
%B | bibcode |
%J | Coordinates of the paper (journal name, volume, page ...) |
%T | title |
%L | last page of the article |
%A | list of all authors |
%nA | list of the first 'n' authors. If the list has more authors '& al.' is appended |
%P | all comments (includes CDS status, errata, dic. def, flags, files and notes) |
%E | errata |
%D | nomenclature dictionary definition |
%I | flags |
%F | associated files |
%N | notes |
%S | CDS status of the reference |
%#[APEDIFNS] | number of items of the corresponding item (Ex: %#A: number of authors) |
A conditional format item allows two different display according to the existence or not of an item:
%?X/format-if-the-item-%X-exists/format-if-the-item-%X-don't-exist/
Example:
format ref bib1 "%REFLIST(\n%B:\n%A\n<%J>\n%T\n%P)"
format ref bib2 "%REFLIST(\n%B (%2A)\n%J\n%T)"
format ref bib3 "%REFLIST(\n%B: %?S/Status: %S/No status/)"
echodata "\n======== format bib1\n"
format bib1
2003A&A...412..447G
2001A&A...367..521P
echodata "\n======== format bib2\n"
format bib2
2001A&A...370..524M
1999A&A...349..521F
echodata "\n======== format bib3\n"
format bib3
2006ApJ...646..730J
2006ApJ...646.1009K
catA:# catB:# catC:# ...
Example: %#MESLIST
A VOTable output is defined by a list of field names. These names are defined below. Some of them allow or require a parameter written in parenthesis.
Object type | |
otype | standard name of the object type |
otype(opt) | object type. The option can be:
|
Magnitude and Fluxes |
The parameter filtername must correspond to an existing filter. Currently: B,V. Coming soon: IR filters (R,I,J,K,L) |
fluxdata(filtername) | all fields related with a particular filter. |
flux(filtername) | value of the flux for the given filter |
flux_name(filtername) | name of the filter |
flux_unit(filtername) | flux unit (mag, jy, ...) |
flux_system(filtername) | flux unit (mag, jy, ...) |
flux_error(filtername) | error value of the flux measurement |
flux_qual(filtername) | quality (A:best, E:worst) of the flux |
flux_bibcode(filtername) | bibcode |
Coordinates | |
coordinates | all fields related with coordinates |
angdist | Angular distance from the center in arcsec |
coo(opt) | only ra and dec fields. The options have the following syntax: ({d|s};frame;epoch;equinox)
|
ra(opt) | right ascension. The options are the same as for coo above. |
dec(opt) | declination. The options are the same as for coo above. |
ra_prec | right ascension precision code (0:1/10deg, ..., 8: 1/1000 arcsec) |
dec_prec | declination precision code (0:1/10deg, ..., 8: 1/1000 arcsec) |
coo_err_maja | major axis of the error ellipse |
coo_err_mina | minor axis of the error ellipse |
coo_err_angle | angle of the error ellipse |
coo_qual | quality (A:astrometric, .., E:unknown) |
coo_wavelength | wavelength type of the measure (Radio, IR, Visible, UV, X, Gamma) |
coo_bibcode | bibliographical reference |
Proper motions | |
propermotions | all fields related with the proper motions |
pm | proper motion values in right ascension and declination |
pmra | proper motion in right ascension |
pmdec | proper motion in declination |
pmra_prec | precision code (0:1/10deg, ..., 8: 1/1000 arcsec) |
pmdec_prec | precision code (0:1/10deg, ..., 8: 1/1000 arcsec) |
pm_err_maja | major axis of the error ellipse |
pm_err_mina | minor axis of the error ellipse |
pm_err_angle | angle of the error ellipse |
pm_qual | quality (A:astrometric, .., E:unknown) |
pm_bibcode | bibliographical reference |
Parallaxes | |
parallax | all fields related to parallaxes |
plx | parallax value |
plx_prec | precision code (0:1/10deg, ..., 8: 1/1000 arcsec) |
plx_error | parallax error |
plx_qual | parallax quality (A:astrometric, .., E:unknown) |
plx_bibcode | bibliographical reference |
Radial Velocity and redshift |
Fields beginning with rvz display the data as it is
in the database. Fields beginning with rv force the display as a radial velocity. Fields beginning with z force the display as a redshift |
velocity | all fields related with radial velocity and redshift |
rvz_type | stored type of velocity: 'v'=radial velocity, 'z'=redshift |
rv_value | Radial velocity value. Eventually translated from a redshift |
z_value | Redshift value. Eventually translated from a radial velocity |
rvz_radvel | stored value. Either a radial velocity, or a redshift, depending on the rvz_type field |
rvz_error | Error. In the same unit as rvz_radvel |
rvz_qual | Quality code (A: best, .., E: worst) |
rvz_wavelength | wavelength type of the measure (Radio, IR, Visible, UV, X, Gamma) |
rvz_bibcode | Bibliographical reference |
Spectral type | |
sptype | all fields related with the spectral type |
sp | spectral type value |
sp_qual | spectral type quality (A: best, .., E: worst) |
sp_nature | spectral type nature ('s'pectroscopic, 'a'bsorbtion, 'e'mmission |
sp_bibcode | Bibliographical reference |
Morphological type | |
morphtype | all fields related to the morphological type |
mt | morphological type value |
mt_qual | morphological type quality (A: best, .., E: worst) |
mt_bibcode | Bibliographical reference |
Extended object dimensions | |
dimensions | all fields related to object dimensions |
dim | main fields related to object dimensions: major and minor axis, and angle |
dim_majaxis | Major axis |
dim_minaxis | Minor axis |
dim_angle | angle of the object |
dim_qual | quality (A: best, .., E: worst) |
dim_wavelength | wavelength type in which these dimensions were measured (Radio, IR, Visible, UV, X, Gamma) |
dim_bibcode | Bibliographical reference |
Identifiers | |
main_id | main identifier of an astronomical object. It is the same as id(1) |
ids | all identifiers of an astronomical object separated with a ipipe |
typed_id | the identifier given by the user |
id(opt) | an identifier. Options can be:
|
Bibliography | |
bibcodelist(y1-y2) | number of references. The parameter is optional and limit the count to the references between the years y1 and y2 |
Measurement catalogs |
For each measurement catalog, the VOTable contains all fields of the first measurement. When applicable, the first measurement is the mean one. |
measurements | display all fields from all measurements (291 fields) |
diameter | Stellar diameters, see 2001A&A...367..521P for an explanation of the coding of the methods of measurements. |
distance | Measure of distances by several means |
fe_h | The Stellar Metallicity Values taken from the compilation by Cayrel de Strobel G.,et all (1997A&AS..124..299C) |
mk |
MK classifications in the Morgan-Keenan system and the Michigan Catalogues of Two-Dimensional Spectral Types for the HD stars (Houk N.,1975,and seq.) |
mesplx | Parallax measurements |
mespm | compilation of measurements of stellar proper motions (except SAO catalogue). These data are presently given at equinox and epoch 1950, in the FK4 system. |
rot | Stellar Rotational Velocities |
v* | variable stars parameters extracted mainly from the General Catalog of Variable Stars by Kukarkin et al. USSR Academy of Sciences (3rd edition in 1969,and continuations) |
velocities | Applies to any astronomical object, galactic or extra- galactic. Lists heliocentric velocities, or LSR velocities, or cz, or redshifts. Please check the flag type which can be v, lsr, z, or cz, especially to make selections on criteria. |
Herschel | Herschel Space Observatory log |
xmm | XMM log |
iso | Infrared Space Observatory (ISO) log |
iue | International Ultraviolet Explorer |
|