LIGOtools Package: Fr
This package contains software to read and write data in the
"frame" format used by LIGO, VIRGO, etc. It includes only the
things in the core distribution:
- The C-language frame library (libFrame.a).
- The FrCopy utility, which can merge frame files,
strip out selected channels, etc.
- The FrCheck utility, which can be used to check the validity
of the frames in a frame file.
- The FrDump utility, which can be used to inspect the
contents of a frame file.
- The Matlab MEX-files frextract and frgetvect,
which read frame data into Matlab. (These are in
$LIGOTOOLS/matlab.)
Author: Benoit Mours
LIGOtools coordinators: Shourov Chatterji, Peter Shawhan
Version v6r24
Release date (as a LIGOtools package): August 3, 2007
History of changes
Notes
- The official distribution site for the Frame Library is
http://wwwlapp.in2p3.fr/virgo/FrameL/.
- This distribution includes only a static library, libFrame.a .
- Two different Matlab MEX-files, frextract and
frgetvect, are provided to read data from frame files. These
are similar but have slightly different syntax. Also,
frgetvect uses the table-of-contents structure in version 4.x
(and later) frames to read very efficiently, but it will not work on a
frame file which does not contain the table-of-contents structure.
See the FAQ article for
guidance about when to use one vs. the other.
- If the MATLABPATH environment variable includes the
LIGOtools matlab directory (normally
$LIGOTOOLS/matlab), then the frextract and
frgetvect macros will automatically be
available when you start up Matlab. Executing eval `$LIGOTOOLS/bin/use_ligotools`
causes MATLABPATH (among other things) to be set
appropriately. (Of course, you have to specify the explicit path
instead of $LIGOTOOLS/bin if LIGOTOOLS has not yet
been set!) Some installations may have some other automatic setup
mechanism which sets MATLABPATH.
Documentation
- Main Frame Library documentation (html)
- Frame format specification document (version 6):
T970130-F.pdf
- Typing FrCopy, FrCheck, or FrDump
without any arguments gives you a summary of the syntax.
- When using FrCopy, you can use wildcards to indicate a
list of input files. For example:
FrCopy -i L-6889456*.F -o mydat.F
-t L1:LSC-AS_Q L1:LSC-AS_DC
Note that the shell expands this wildcard into a list of file names.
(The shell may complain about "Arg list too long" if the wildcard
matches too many files, but argument lists totaling up to about
one million characters should be OK, I think.)
- FrCopy also allows you to use an asterisk as a wildcard
at the end of a partial channel name (but not within a partial channel
name). In this case, you must enclose the partial channel name in
quotes to prevent the shell from trying to expand it to match
filenames. For example:
FrCopy -i fulldat1.F fulldat2.F
-o stripped.F -t "L0:PEM-LVEA_SEIS*"
- See this FAQ article for
information about how to use the -d option to control what is
printed out by FrDump. Note that to use FrDump to
see the channels contained in a frame file which has no table of
contents, you need to set the "debug level" to 3 or higher. For
example:
FrDump -i
L-688012747.F -d 3
- Example C programs using library routines:
exampleCompress.c ,
exampleCopyFile.c ,
exampleCopyFrame.c ,
exampleFileDump.c ,
exampleFull.c ,
exampleReshape.c ,
exampleSpeed.c ,
exampleStat.c ,
FrCopy.c ,
FrCheck.c ,
FrDump.c
- Within Matlab, you can get detailed info (function arguments,
etc.) about frextract and frgetvect
by typing help
frextract, etc. Or see the source code: frextract.c, frgetvect.c.
- If you are using frextract or frgetvect to read
data from a file which contains more than one frame, then you must use
the optional arguments to indicate how many frames you want to read;
otherwise you will only get the data from the first frame. For
example:
a =
frextract('myfile.F','H2:LSC-AS_Q',1,20);
reads data from the first 20 frames in the file.
- Matlab M-file examples using frextract:
exampleGetAdc.m ,
exampleGetProc.m ,
exampleAudio.m
- Matlab M-file example using frgetvect:
exampleGetVect.m
Distribution files
Normally, you should use the ligotools_update utility to
download and install new packages or new versions of existing
packages, since it automatically figures out what packages need to be
updated. However, if you wish to do so manually, then click on the
name of the appropriate distribution file (below) with the
right mouse button and choose "Save Link As..." from
the popup menu. Note that you must save it on your disk with exactly
the same name as it has on this web site. After the file has been
downloaded, do:
ligotools_install <file>
where <file> is the file which was downloaded. This
procedure will be quicker if the environment variable
LIGOTOOLS is set to the main LIGOtools directory.
- Source distribution:
Fr_v6r24_SOURCE.tar.gz
(701 kb)
This is known to build properly on Solaris and Linux using
gcc; other operating systems or compilers may require
some modifications. Also, frextract and
frgetvect will be built only if
the Matlab mex compiler is present.
- Generic binary distribution for Solaris:
Fr_v6r24_SunOS.tar.gz
(1070 kb)
- Generic binary distribution for Linux:
Fr_v6r24_Linux.tar.gz
(1257 kb)
- 32-bit Linux binary distributions for specific versions of Matlab:
Matlab R13,
Matlab R14 SP3,
Matlab 2006a,
Matlab 2006b,
Matlab 2007a
- 64-bit Linux binary distributions for specific versions of Matlab:
Matlab R13,
Matlab R14 SP3,
Matlab 2006a,
Matlab 2006b,
Matlab 2007a
- Binary distribution for Mac OS X (THIS IS AN OLD VERSION, v6r15):
Fr_v6r15_Darwin.tar.gz
(834 kb)