Metaio
The metaio package includes:
- A library (libmetaio) which allows a C program to parse a file containing a metadata table in LIGO_LW XML format. Note that, prior to version 6.0, these functions were contained in the library libdataflow.a in the 'dataflow' ligotools package.
- Utilities to manipulate metadata tables in LIGO_LW files:
- lwtscan to print the table's columns and the number of rows
- lwtcut to select certain rows from a table based on a numeric comparison and/or row number, report the number of matching rows, and optionally write the matching rows to a new LIGO_LW file
- lwtprint to print selected columns/rows as plain text
- lwtdiff to compare the data in two files (allowing for formatting variations which do not affect the content)
- lwtselect to extract a single Table object from a LIGO_LW file containing multiple Table objects
- concatMeta to concatenate LIGO_LW files containing database table data
- The Matlab MEX-file readMeta, which reads the contents of a LIGO_LW metadata file into Matlab arrays.
Note that the LIGOtools binary packages only contain only static libraries and
executables, whereas the lscsoft distribution and version built from souce
contain static and shared libraries and dynamic executables.
Project Librarian
Contact the DASWG mailing list <daswg@gravity.phys.uwm.edu>
if you have questions about metaio.
Documentation
Typing lwtscan, lwtcut, lwtprint, lwtdiff, lwtselect, or concatMeta without any arguments will print out usage information - in most cases, rather detailed.
The utility programs concatMeta and lwtselect in this package use the tclshexe program from the LIGOtools package 'tclexe', so that package must be installed and active if these utilities are used. The other utility programs are standalone C programs, so do not require any other packages to be installed.
By default, lwtprint
uses a comma to separate the values it prints out. To use a space as
a separator, use the -d option,
e.g.:
lwtprint myfile.xml -d " "
Example C program to perform a simple coincidence test on two
input LIGO_LW files with events, e.g. from the gds_trigger table: find_coinc.c.
To compile this, do:
gcc find_coinc.c -o find_coinc -lmetaio
There is no formal documentation about how to use the "Metaio" C library. However, you can see the comments in the source code for the library in metaio.c, and look at the utility programs lwt*.c as examples. Also see this code for an example of how to write out selected rows of an input LIGO_LW file: ivana_16jul02.c (search for "outEnv").
For more documentation about the metaio package, see the LIGOTools frequently asked questions page. In particular, the questions
- How can I read a LIGO_LW file of table entries into Matlab?
- How can I read a LIGO_LW file of table entries into a C program?
- How can I select certain entries from a LIGO_LW table file?
- What else can I do with a LIGO_LW file of table entries?
Download
Current release
The current version of metaio is version 7.2. This is availabe via the lscsoft software repository or download here as source or a LIGOtools binary package. To install the LIGOtools packages, download the binary tar files and type
ligotools_install packagename.tar.gzwhere packagename.tar.gz is the name of the binary package downloaded.
- Source distributions (see below for build instructions):
- Tar gzipped source code metaio-7.2.tar.gz
- LIGOtools Binary distributions:
- metaio_7.2_x86_64-unknown-linux-gnu-matlab-7.4.tar.gz (Linux 64 bit, Matlab r2007a)
- metaio_7.2_x86_64-unknown-linux-gnu-matlab-7.3.tar.gz (Linux 64 bit, Matlab r2006b)
- metaio_7.2_x86_64-unknown-linux-gnu-matlab-7.2.tar.gz (Linux 64 bit, Matlab r2006a)
- metaio_7.2_x86_64-unknown-linux-gnu-matlab-7.1.tar.gz (Linux 64 bit, Matlab r14 sp3)
- metaio_7.2_i686-pc-linux-gnu-matlab-7.4.tar.gz (Linux 32 bit, Matlab r2007a)
- metaio_7.2_i686-pc-linux-gnu-matlab-7.3.tar.gz (Linux 32 bit, Matlab r2006b)
- metaio_7.2_i686-pc-linux-gnu-matlab-7.2.tar.gz (Linux 32 bit, Matlab r2006a)
- metaio_7.2_i686-pc-linux-gnu-matlab-7.1.tar.gz (Linux 32 bit, Matlab r14 sp3)
- metaio_7.2_i686-pc-linux-gnu-matlab-6.5.tar.gz (Linux 32 bit, Matlab r13)
Previous releases
Note: Previous releases of metaio prior to 7.0 are available only as LIGOtools binary and source package.
CVS Archive
The metaio source is located in the LSCSoft CVS archive. The CVS can be accessed read-only using the anonymous account (no password is needed):
:pserver:anonymous@gravity.phys.uwm.edu:2402/usr/local/cvs/lscsoft
or you may contact the the DASWG mailing list to obtain your own CVS account for read/write access.
You may also browse the metaio CVS archive using the web interface.
Build Instructions
Metaio from can be build from the source tar ball or from CVS. To download from CVS, check out the code from the lscsoft repository and run the script 00boot to build the configure program:
cvs -d :pserver:anonymous@gravity.phys.uwm.edu:2402/usr/local/cvs/lscsoft co metaio cd metaio ./00boot
To build from the source tarball, download the current source code and uncompress the tar file:
wget http://www.lsc-group.phys.uwm.edu/daswg/projects/metaio/release-7-1/metaio-7.1.tar.gz tar -zxvf metaio-7.1.tar.gz cd metaio-7.1The configure program is contained in the source tarball, so there is no need to run the 00boot program.
The instructions for both CVS and source tarball are identical, once the configure program is built. The configure script automatically checks for a working version of Matlab and the Matlab mex compiler. If these are installed and functional, then the Matlab readMeta program is compiled. If not, only the library and the utility programs are built.
To build metaio, run the configure script. The default install location is /usr/local. To install in another location, specify --prefix when running configure. The example below assumes that you want to install metaio in your home directory, given by the environment variable ${HOME}. To build metaio run the commands:
CPPFLAGS=-std=gnu99 ./configure --prefix=${HOME}
make
Setting the environment variable CPPFLAGS=-std=gnu99 has no effect on
the Mac OS X build, but is required to build a version of metaio that supports
gzip compression on Linux.
To install metaio in the location specified by --prefix type
make install
To build a LIGOtools binary packge, type
make ligotoolswhich will build a LIGOtools binary package in the ligotools subdirectory. This binary package can be installed with the ligotools_install program.
Mailing Lists
Discussion of metaio should be directed to the DASWG mailing list.
Contributors
- Philip Charlton <pcharlton@csu.edu.au> (metaio library)
- Peter Shawhan <pshawhan@umd.edu> (utility programs)
- Drew Keppel <keppel_d@ligo.caltech.edu> (gzip compression code)
- Jolien Creighton <jolien@gravity.phys.uwm.edu> (gzip compression code)
- Duncan Brown <dbrown@ligo.caltech.edu> (packaging)