lvcnrpy
lvcnrpy
is a simple Python interface to the LVC-NR Waveform Repository.
Installation
-
Install the package locally
The package can be installed directly from git.ligo.org using the following snippet. Use your LIGO username
albert.einstein
and password when asked for authorisation$ pip install git+https://git.ligo.org/edward.fauchon-jones/lvcnrpy.git#egg=lvcnrpy
-
Define LVC-NR Waveform Repository environment variable
Define the environment variable
LVCNR_DATADIR
as the path to your local clone of the LVC-NR Waveform Repository. If you are using a virtual environment this can be defined in your activation script. For a bash shell this could be done withexport LVCNR_DATADIR=<path-to-lvc-nr-repo>
Usage
Checking HDF5 NR files against format specifications
A working draft of the possible formats HDF5 NR files may be committed in to the
LVC-NR Waveform Repository is avilable at
Numerical Relativity Waveforms.
To check a HDF5 NR file against one of the format levels use the included
program lvcnrcheck
. It is installed as a global program when this package is
installed.
-
lvcnrcheck
usagelvcnrcheck [-h] [-c] [-f {1,2,3}] file Check hdf5 NR data meet LVCNR format specifications positional arguments: file name of file to check optional arguments: -h, --help show this help message and exit -c, --col use coloured output (default: False) -f {1,2,3}, --format {1,2,3} format level to use (default: 1)
-
lvcnrcheck
exampleFor basic usage simple pass the file name to
lvcnrcheck
$ cd <path-to-lvc-nr-repo> $ lvcnrcheck ./Cardiff-UIB/h5/q1.2_base_96.h5
To check against a specific format level use the
-f
option$ cd <path-to-lvc-nr-repo> $ lvcnrcheck -f 2 ./Cardiff-UIB/h5/q1.2_base_96.h5
To add a coloured output use the
-c
flagTo check against a specific format level use the
-f
option$ cd <path-to-lvc-nr-repo> $ lvcnrcheck -c ./Cardiff-UIB/h5/q1.2_base_96.h5