bp2rdb - translate bpipe format data into an RDB table
bp2rdb [options]
bp2rdb translates a bpipe formatted data stream into an RDB table.
bpipe header fields are inserted into comments in the RDB table.
Multi-valued data types (such as DVector3
, etc) are split into
multiple columns.
Only one element in a multi-dimensional field is output. By default the first element is output, but that may be changed.
Character fields with an extent greater than one are treated as C style strings, with a trailing '\0' character.
bp2rdb uses an IRAF-compatible parameter interface. A template parameter file is in /proj/axaf/simul/lib/uparm/bp2rdb.par
bpipe
stream or file. If it's the string stdin
, the
standard input stream is read.
stdout
, the standard output stream is written to.
The specifications have the form
name name[matrix_element]
where name is the name of the field and matrix_element is a comma delimited list of indices of the element in the field matrix to be output. The zero-based indices are arranged in column-major order (the same order as output by bpipe_dump).
The final list of output fields is generated from an initial list by
adding or subtracting the fields specified in this parameter, in the
order given. Fields to be subtracted should be prefixed with the -
character.
The initial list of fields is set to the list of all possible fields
if fields contains only fields to be subtracted, or contains the
special field %all
.
The initial list of fields is empty if fields does not contain
%all
and contains at least one field to be added.
By default, if a field is multi-dimensional and a matrix element is not specified the first element is output.
In the following examples, the list of fields is
a b c d e
d
fields=-dTo output only fields
b
and d
fields=b,dTo output all of the fields and output element
[0,2]
of
field e
fields=%all,e[0,2]
Copyright 2006 Smithsonian Astrophysical Observatory
This software is released under the GNU General Public License. You may find a copy at
http://www.fsf.org/copyleft/gpl.html
This documents version 2.0.1 of bp2rdb.
Diab Jerius <djerius@cfa.harvard.edu>