parse-pha - parse pha files and write header info to an rdb file
parse-pha [options] path1 [ path2 ... ]
Print this
Print the name of the pha file to STDERR.
Specify the name of the output rdb table.
Split the output up into one file per directory, using the name of the directory as the rdb file name.
parse-pha parses pha file headers and outputs an rdb table suitable for ingestion into Postgres.
The files to be parsed are specified on the command line. They may be specified as:
A directory. Any sub-directories are added to the list if their names are
composed solely of digits (e.g. 961201).
The pha file name.
A file containing file or directory names. The file name should be preceded
by the
@ character.
When parse-pha searches directories, it looks for files matching the Perl regular
expression /acq\d+d\d+i\d+.pha$/.
The output rdb file has the following columns: filename, filecreationdate, uniqueid, swversion, irigstarttime, irigstarttime_dt, shutters, voltage_v, currentlimit_ua, rampup_vs, rampdown_vs, autodeadtime_pulses, channels, livetime_sec, truetime_sec, instrument, detector, iteration, path.
The columns path and irigstarttime_dt are created by parse-pha. path is the last segment of the pha file's path (i.e. it's parent directory). irigstarttime_dt
is the IRIG time expressed as an ISO compliant date.