.\" @(#)votsort.1 1.0 Feb-2013 MJF .TH VOTSORT 1 "Feb 2013" "VOClient Package" .SH NAME votsort \- Extract the main positional columns from a VOTable .SH SYNOPSIS \fBvotsort\fP [\fI-opts\fP] votable.xml .SH OPTIONS The \fIvotsort\fP task accepts the following options: .TP 6 .B \-h, --help Print a help summary to the terminal and exit. No processing is done following this flag. .TP 6 .B \-c \fIN\fP,--col \fIN\fP Sort by column number \fIN\fP (0-indexed). .TP 6 .B \-d,--desc Sort in descending order. .TP 6 .B \-f \fIFORMAT\fP,--fmt \fIFORMAT\fP Output format of sorted table. See description below for list of formats. .TP 6 .B \-o \fINAME\fP,--output \fINAME\fP Output name of sorted file, if not specified results are written to stdout. .TP 6 .B \-s,--string Perform a string sort of the columns. .TP 6 .B \-t \fIN\fP,--top \fIN\fP Print the top \fIN\fP rows of the sorted table. .TP 6 .B \-i \fIN\fP,--indent \fIN\fP XML indention level when writing a new XML document. .TP 6 .B \-n,--noheader Suppress header information for formats other than XML and FITS. .TP 6 .B \-N \fINAME\fP,--name \fINAME\fP Sort by column with the name=\fINAME\fP attribute. .TP 6 .B \-I \fIID\fP,--id \fIID\fP Sort by column with the id=\fIID\fP attribute. .TP 6 .B \-U \fIUCD\fP,--ucd \fIucd\fP Sort by column with the ucd=\fIUCD\fP attribute. .SH DESCRIPTION The \fIvotsort\fP task is used to sort the rows of a VOTable either by explicit column number (i.e. the \fI-c\fP flag), as a simple string sort (i.e. the \fI-s\fP flag), or by an explicit 'name', 'id' or 'ucd' attribute of the elements (the \fI-N\fP, \fI-I\fP and \fI-U\fP 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 \fI-d\fP flag can be used to force a descending sort of the column. .PP Output is written to the stdout unless the \fI-o\fP flag is used to name a specific output file. By default, a new VOTable will be written, the \fI-f\fP flag can be used to specify a new format. Allowed formats include: .in 15 .I vot A new VOTable .in 15 .I asv ASCII-separated (i.e. whitespace) values. .in 15 .I bsv Bar-separated values. .in 15 .I csv Comma-separated values .in 15 .I tsv Tab-separated values .in 15 .I html Standalone HTML document (entire table) .in 15 .I shtml Single HTML table .in 15 .I fits FITS bintable .in 15 .I ascii ASV alias .in 15 .I xml VOTable alias .in 15 .I raw VOTable alias .in 7 For formats such as CSV that normally include column headers, the \fI\-n\fP (or \fI\--noheader\fP) flag may be used to suppress this header. The FITS file produced will be an MEF containing a bintable extension for each VOTable "" element. Column types and names in this case come from the VOTable "" attributes. If no input file is specified the VOTable will be read from the stdin, results will be written to stdout unless the \fI\-o\fP (or \fI\--output\fP) 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. .SH RETURN STATUS On exit the \fBvotsort\fP task will return a zero indicating success, or a one indicating an error. .SH EXAMPLES .TP 4 1) Sort a VOTable based on first column .nf % votsort test.xml % votsort http://generic.edu/test.xml % cat test.xml | votsort -o sort_test.xml .fi A string sort will be done automatically if this is a string-valued column, otherwise a numeric sort is done. .TP 4 2) Sort a VOTable based on the magnitude column .nf % votsort --name=V test.xml .fi .TP 4 3) Same as above, select 10 faintest stars .nf % votsort --name=V --desc --top=10 test.xml .fi .TP 4 4) String sort based on object name, output as CSV .nf % votsort -s -f csv test.xml % votsort --string --fmt=csv test.xml .fi .SH BUGS No known bugs with this release. .SH Revision History Feb 2013 - First public release .SH Author Michael Fitzpatrick (fitz@noao.edu), Feb 2013 .SH "SEE ALSO" votget, votinfo, votcnv, votpos, votstat