Skip to content

Commit

Permalink
Updates README's to reflect removal of --merge-partial as a cli flag
Browse files Browse the repository at this point in the history
  • Loading branch information
sherjeelshabih committed Nov 20, 2023
1 parent adb3e44 commit e5579b5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 11 additions & 1 deletion examples/json_map/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@ This reader is designed to allow users of pynxtools to convert their existing da
* JSON
* Python Dict Objects Pickled with [pickle](https://docs.python.org/3/library/pickle.html). These can contain [xarray.DataArray](https://docs.xarray.dev/en/stable/generated/xarray.DataArray.html) objects as well as regular Python types and Numpy types.

It accepts any NXDL file that you like as long as your mapping file contains all the fields.
Please use the --generate-template function of the dataconverter to create a .mapping.json file.

```console
user@box:~$ python convert.py --nxdl NXmynxdl --generate-template > mynxdl.mapping.json
```

## How to run these examples?

### Automatically merge partial NeXus files
```console
user@box:~$ dataconverter --nxdl NXiv_temp --input-file voltage_and_temperature.nxs --input-file current.nxs --merge-partial --output auto_merged.nxs
user@box:~$ dataconverter --nxdl NXiv_temp --input-file voltage_and_temperature.nxs --input-file current.nxs --output auto_merged.nxs
```

### Map and copy over data to new NeXus file
Expand All @@ -23,3 +30,6 @@ user@box:~$ dataconverter --nxdl NXiv_temp --mapping merge_copied.mapping.json -
```console
user@box:~$ dataconverter --nxdl NXiv_temp --mapping merge_linked.mapping.json --input-file voltage_and_temperature.nxs --input-file current.nxs --output merged_linked.nxs
```

## Contact person in FAIRmat for this reader
Sherjeel Shabih
4 changes: 1 addition & 3 deletions pynxtools/dataconverter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ Options:
parameters the converter supports.
--undocumented Shows a log output for all undocumented
fields
--merge-partial Merges partial NeXus files provided as
different --input-file to the converter.
--mapping TEXT Takes a <name>.mapping.json file and
converts data from given input files.
--help Show this message and exit.
Expand All @@ -47,7 +45,7 @@ Options:
#### Merge partial NeXus files into one

```console
user@box:~$ dataconverter --nxdl nxdl --input-file partial1.nxs --input-file partial2.nxs --merge-partial
user@box:~$ dataconverter --nxdl nxdl --input-file partial1.nxs --input-file partial2.nxs
```

#### Map an HDF5/JSON/(Python Dict pickled in a pickle file)
Expand Down

0 comments on commit e5579b5

Please sign in to comment.