Skip to content

Commit ed2dfb5

Browse files
committed
1.4.0 build
1 parent 1c787c9 commit ed2dfb5

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
## nt2.py
1+
# nt2.py
22

33
Python package for visualization and post-processing of the [`Entity`](https://github.com/entity-toolkit/entity) simulation data. For usage, please refer to the [documentation](https://entity-toolkit.github.io/wiki/content/2-howto/2-vis/#nt2py). The package is distributed via [`PyPI`](https://pypi.org/project/nt2py/):
44

55
```sh
66
pip install nt2py
77
```
88

9-
### Usage
9+
## Usage
1010

1111
Simply pass the location to the data when initializing the main `Data` object:
1212

@@ -28,7 +28,7 @@ data.spectra # < xr.Dataset
2828
2929
> Note, that by default, the `hdf5` support is disabled in `nt2py` (i.e., only `ADIOS2` format is supported). To enable it, install the package as `pip install "nt2py[hdf5]"` instead of simply `pip install nt2py`.
3030
31-
#### Accessing the data
31+
### Accessing the data
3232

3333
Fields and spectra are stored as lazily loaded `xarray` datasets (a collection of equal-sized arrays with shared axis coordinates). You may access the coordinates in each dimension using `.coords`:
3434

@@ -61,7 +61,7 @@ data.particles.sel(sp=[1, 2, 4]).isel(t=-1)
6161

6262
selects all the particles of species 1, 2, and 4 on the last timestep. The loading of the data itself is done by calling: `.load()` method, which returns a simple `pandas` dataframe.
6363

64-
#### Plotting
64+
### Plotting
6565

6666
Plot a field (in Cartesian coordinates) at a specific time (or output step):
6767

@@ -164,7 +164,7 @@ nt2e.makeFramesAndMovie(
164164
)
165165
```
166166

167-
#### Raw readers
167+
### Raw readers
168168

169169
In case you want to access the raw data without using `nt2py`'s `xarray`/`dask` lazy-loading, you may do so by using the readers. For example, for `ADIOS2` output data format:
170170

@@ -194,7 +194,7 @@ reader.ReadArrayAtTimestep(
194194
There are many more functions available within the reader. For `hdf5`, you can simply change the import to `nt2.readers.hdf5`, and the rest should remain the same.
195195

196196

197-
### CLI
197+
## CLI
198198

199199
Since version 1.0.0, `nt2py` also offers a command-line interface, accessed via `nt2` command. To view all the options, simply run:
200200

@@ -222,18 +222,18 @@ nt2 plot myrun/mysimulation --fields "E.*;B.*" --sel "x=slice(-5, None); z=0.5"
222222

223223
> If you want to only install the CLI, without the library itself, you may do that via `pipx`: `pipx install nt2py`.
224224
225-
### Features
225+
## Features
226226

227227
1. Lazy loading and parallel processing of the simulation data with [`dask`](https://dask.org/).
228228
2. Context-aware data manipulation with [`xarray`](http://xarray.pydata.org/en/stable/).
229229
3. Parallel plotting and movie generation with [`loky`](https://pypi.org/project/loky/) and [`ffmpeg`](https://ffmpeg.org/).
230230
4. Command-line interface, the `nt2` command, for quick plotting (both movies and snapshots).
231231

232-
### Testing
232+
## Testing
233233

234234
There are unit tests included with the code which also require downloading test data with [`git lfs`](https://git-lfs.com/) (installed separately from `git`). You may download the data simply by running `git lfs pull`.
235235

236-
### TODO
236+
## TODO
237237

238238
- [x] Unit tests
239239
- [x] Plugins for other simulation data formats

dist/nt2py-1.4.0-py3-none-any.whl

42.2 KB
Binary file not shown.

dist/nt2py-1.4.0.tar.gz

35.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)