Content-type: text/html
Manpage of VOTSORT
VOTSORT
Section: User Commands (1)
Updated: Feb 2013
Index
Return to Main Contents
NAME
votsort - Extract the main positional columns from a VOTable
SYNOPSIS
votsort [-opts] votable.xml
OPTIONS
The votsort task accepts the following options:
- -h, --help
-
Print a help summary to the terminal and exit. No processing is done
following this flag.
- -c N,--col N
-
Sort by column number N (0-indexed).
- -d,--desc
-
Sort in descending order.
- -f FORMAT,--fmt FORMAT
-
Output format of sorted table. See description below for list of formats.
- -o NAME,--output NAME
-
Output name of sorted file, if not specified results are written to stdout.
- -s,--string
-
Perform a string sort of the columns.
- -t N,--top N
-
Print the top N rows of the sorted table.
- -i N,--indent N
-
XML indention level when writing a new XML document.
- -n,--noheader
-
Suppress header information for formats other than XML and FITS.
- -N NAME,--name NAME
-
Sort by column with the name=NAME attribute.
- -I ID,--id ID
-
Sort by column with the id=ID attribute.
- -U UCD,--ucd ucd
-
Sort by column with the ucd=UCD attribute.
DESCRIPTION
The votsort task is used to sort the rows of a VOTable either by
explicit column number (i.e. the -c flag), as a simple string sort
(i.e. the -s flag), or by an explicit 'name', 'id' or 'ucd' attribute
of the <FIELD> elements (the -N, -I and -U flags
respectively). If no column is specified explicitly by number or attribute,
then the first column will be used for sorting. By default, columns are
sorted in ascending order, the
-d flag can be used to force a descending sort of the column.
Output is written to the stdout unless the -o flag is used to
name a specific output file. By default, a new VOTable will be written,
the -f flag can be used to specify a new format. Allowed formats
include:
vot
A new VOTable
asv
ASCII-separated (i.e. whitespace) values.
bsv
Bar-separated values.
csv
Comma-separated values
tsv
Tab-separated values
html
Standalone HTML document (entire table)
shtml
Single HTML table
fits
FITS bintable
ascii
ASV alias
xml
VOTable alias
raw
VOTable alias
For formats such as CSV that normally
include column headers, the -n (or --noheader) flag may be used
to suppress this header. The FITS file produced will be an MEF containing
a bintable extension for each VOTable "<TABLE>" element. Column types and
names in this case come from the VOTable "<FIELD>" attributes.
If no input file is specified the VOTable will be read from the stdin,
results will be written to stdout unless the -o (or --output)
names an output file. The task will only process a single VOTable and may
not be used to convert multiple files in a single call.
RETURN STATUS
On exit the votsort task will return a zero indicating success, or a
one indicating an error.
EXAMPLES
- 1) Sort a VOTable based on first column
-
% votsort test.xml
% votsort http://generic.edu/test.xml
% cat test.xml | votsort -o sort_test.xml
A string sort will be done automatically if this is a string-valued column, otherwise a numeric sort is done.
- 2) Sort a VOTable based on the magnitude column
-
% votsort --name=V test.xml
- 3) Same as above, select 10 faintest stars
-
% votsort --name=V --desc --top=10 test.xml
- 4) String sort based on object name, output as CSV
-
% votsort -s -f csv test.xml
% votsort --string --fmt=csv test.xml
BUGS
No known bugs with this release.
Revision History
Feb 2013 - First public release
Author
Michael Fitzpatrick (fitz@noao.edu), Feb 2013
SEE ALSO
votget, votinfo, votcnv, votpos, votstat
Index
- NAME
-
- SYNOPSIS
-
- OPTIONS
-
- DESCRIPTION
-
- RETURN STATUS
-
- EXAMPLES
-
- BUGS
-
- Revision History
-
- Author
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 05:13:27 GMT, April 14, 2013