Commit 2a03415b authored by Edward Fauchon-Jones's avatar Edward Fauchon-Jones

Update README with correct pip install url and up usage instructions

parent 5574d1aa
Pipeline #25325 passed with stage
in 2 minutes and 7 seconds
# lvcnrpy
`lvcnrpy` is a simple Python interface to the LVC-NR Waveform Repository.
`lvcnrpy` is a simple Python interface to the
[`lvcnr-lfs`](https://git.ligo.org/waveforms/lvcnr-lfs) numerical relativity
repository.
## Installation
1. **Install the package locally**
The package can be installed directly from
[git.ligo.org](https://git.ligo.org/) using the following snippet. Use your
LIGO username `albert.einstein` and password when asked for
authorisation
[`git.ligo.org`](https://git.ligo.org/) using the following snippet
```bash
$ pip install git+https://git.ligo.org/edward.fauchon-jones/lvcnrpy.git@v3.0.0#egg=lvcnrpy
$ pip install git+https://git.ligo.org/waveforms/lvcnrpy.git
```
2. **Define LVC-NR Waveform Repository environment variable**
2. **Define [`lvcnr-lfs`](https://git.ligo.org/waveforms/lvcnr-lfs) 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 with
To use [`lvcnrjson`](#generating-a-json-dump-of-all-lvcnr-lfs-attributes)
you must define the environment variable `LVCNR_DATADIR` as the path to
a local clone of the
[`lvcnr-lfs`](https://git.ligo.org/waveforms/lvcnr-lfs) repository. If you
are using a virtual environment this can be defined in your activation
script. For a bash shell this could be done with
```bash
export LVCNR_DATADIR=<path-to-lvc-nr-repo>
```
If you do not want to use `lvcnrjson` then you can set the environment
variable to an empty sting. For a bash shell this could be done with
```bash
export LVCNR_DATADIR=""
```
## 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
A working draft of the possible formats HDF5 NR files may be committed in to
the [`lvcnr-lfs`](https://git.ligo.org/waveforms/lvcnr-lfs) repository is
avilable at
[Numerical Relativity Waveforms](https://www.lsc-group.phys.uwm.edu/ligovirgo/cbcnote/Waveforms/NR#BBH_Waveform_Catalog:_Metadata).
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
......@@ -72,9 +82,27 @@ installed.
To add a coloured output use the `-c` flag
To check against a specific format level use the `-f` option
```bash
$ cd <path-to-lvc-nr-repo>
$ lvcnrcheck -c ./Cardiff-UIB/GW150914-followup/q1.2_base_96.h5
```
### Generating a JSON dump of all [`lvcnr-lfs`](https://git.ligo.org/waveforms/lvcnr-lfs) attributes
To generate a JSON file containing all format level 1 attributes for all
simulations in the [`lvcnr-lfs`](https://git.ligo.org/waveforms/lvcnr-lfs)
repository you can use `lvcnrjson`. This requires that the environment
variable `LVCNR_DATADIR` has been set to the location of a local clone of
[`lvcnr-lfs`](https://git.ligo.org/waveforms/lvcnr-lfs) repository.
- **`lvcnrjson` usage**
```bash
lvcnrjson [-h]
Export format level 1 metadata for all simulations to JSON
optional arguments:
-h, --help show this help message and exit
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment