NAME

bp2rdb - translate bpipe format data into an RDB table


SYNTAX

bp2rdb [options]


DESCRIPTION

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.


ARGUMENTS

bp2rdb uses an IRAF-compatible parameter interface. A template parameter file is in /proj/axaf/simul/lib/uparm/bp2rdb.par

input
The input bpipe stream or file. If it's the string stdin, the standard input stream is read.

output
The stream or file to which the rdb table will be written. If it's the string stdout, the standard output stream is written to.

fields
This is a comma delimited list of field specifications. See OUTPUT FIELD SPECIFICATIONS for the format of a specification.

outlem
This is a comma delimited list the parts of the RDB file to output. The available options are:
all
output all elements

data
output the data

hdr
output the RDB header

hdrvar
output the bpipe header field variables in the RDB header, if hdr is also output.

help
Print a short help message and exit.

usage
Print a long help message and exit.

version
Output the version number and exit.


OUTPUT FIELD SPECIFICATION

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.

Examples

In the following examples, the list of fields is

  a b c d e


COPYRIGHT & LICENSE

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


VERSION

This documents version 2.0.1 of bp2rdb.


AUTHOR

Diab Jerius <djerius@cfa.harvard.edu>