Skip to content

Commit

Permalink
Chop long lines in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiodsf committed Jun 14, 2018
1 parent f611b77 commit 89e6fa2
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions README.md
@@ -1,13 +1,15 @@
# NLLGrid

Python class for reading and writing [NonLinLoc](http://alomax.free.fr/nlloc)
grid files.
Python class for reading and writing
[NonLinLoc](http://alomax.free.fr/nlloc) grid files.

(c) 2015-2018 Claudio Satriano, Natalia Poiata

## Installation

Clone or download the project from GitHub, uncompress the archive (if needed), and install the codes by running (from within the main directory):
Clone or download the project from GitHub, uncompress the archive
(if needed), and install the codes by running (from within the main
directory):

pip install .

Expand Down Expand Up @@ -52,12 +54,14 @@ The grid can be plotted doing:
>>> grd.plot()
```

Use Python introspection (e.g. `dir(grd)`) to see all the available methods and attributes.
Use Python introspection (e.g. `dir(grd)`) to see all the available
methods and attributes.


### Creating a NLL grid

Suppose that you have a 3D data array stored into a NumPy array called `mydata`.
Suppose that you have a 3D data array stored into a NumPy array
called `mydata`.

First, create an empty NLL grid object:

Expand All @@ -66,7 +70,8 @@ First, create an empty NLL grid object:
>>> grd = NLLGrid()
```

then, add the data array and information on grid sampling and grid origin, e.g.:
then, add the data array and information on grid sampling and grid
origin, e.g.:

```python
>>> grd.array = mydata
Expand Down Expand Up @@ -101,10 +106,14 @@ Finally, give a basename and write to disk:
This will create the two files `mygrid.hdr` and `mygrid.buf`.

If you want to save your grid in double precision (required for
instance by NLDiffLoc), change `grd.float_type` to `'DOUBLE'` before saving the grid (default is `'FLOAT'`):
instance by NLDiffLoc), change `grd.float_type` to `'DOUBLE'` before
saving the grid (default is `'FLOAT'`):

```python
>>> grd.float_type = 'DOUBLE'
```

Note that if you want to use your grid as input for NonLinLoc `Grid2Time` code, the grid type has to be `SLOW_LEN` and your grid array has to be transformed into slowness (in s/km) and multiplied by the grid step (in km).
Note that if you want to use your grid as input for NonLinLoc
`Grid2Time` code, the grid type has to be `SLOW_LEN` and your grid
array has to be transformed into slowness (in s/km) and multiplied
by the grid step (in km).

0 comments on commit 89e6fa2

Please sign in to comment.