8000 Fix nexus conversion tutorial and its links by lukaspie · Pull Request #279 · FAIRmat-NFDI/pynxtools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix nexus conversion tutorial and its links #279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions docs/tutorial/converting-data-to-nexus.md
8000
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ You will have

## Setup

We use a Python tool to make converting our research data easier. This has a number of [readers](https://github.com/FAIRmat-NFDI/pynxtools/tree/master/pynxtools/dataconverter/readers) that support multiple file formats. You can browse the separate folders to find the reader that might work for you. A generic reader is the [JSON Map Reader](https://github.com/FAIRmat-NFDI/pynxtools/tree/master/pynxtools/dataconverter/readers/json_map).
We use a Python tool to make converting our research data easier. This has a number of [readers](https://github.com/FAIRmat-NFDI/pynxtools/tree/master/pynxtools/dataconverter/readers) that support multiple file formats. You can browse the separate folders to find the reader that might work for you. A generic reader is the [JSON Map Reader](https://github.com/FAIRmat-NFDI/pynxtools/tree/master/pynxtools/dataconverter/readers/json_map). In addition, we provide multiple [reader plugins](https://github.com/FAIRmat-NFDI/pynxtools/tree/master?tab=readme-ov-file#plugins) for different experimental techniques.

We will use the [XPS Reader](https://github.com/FAIRmat-NFDI/pynxtools/tree/master/pynxtools/dataconverter/readers/xps) with a [SpecsLabProdigy](https://www.specs-group.com/nc/specs/products/detail/prodigy/) file (.sle) as an example.
We will use the [XPS reader plugin](https://github.com/FAIRmat-NFDI/pynxtools-xps) with a [SpecsLabProdigy](https://www.specs-group.com/nc/specs/products/detail/prodigy/) file (file extension: .sle) as an example.

#### Steps

1. Download the example files from here: [Example files](https://download-directory.github.io/?url=https://github.com/FAIRmat-NFDI/pynxtools/tree/master/examples/xps)
1. Download the example files from here: [Example files](https://download-directory.github.io/?url=https://github.com/FAIRmat-NFDI/pynxtools-xps/tree/main/examples/sle)
2. **Extract** the zip and copy the files in your current working directory. You can find the working directory by typing the following in your terminal:
```console
pwd
```
3. Install [pynxtools](https://github.com/FAIRmat-NFDI/pynxtools/tree/master?tab=readme-ov-file#installation)
3. Install [pynxtools](https://github.com/FAIRmat-NFDI/pynxtools/tree/master?tab=readme-ov-file#installation) with the [XPS reader plugin](https://github.com/FAIRmat-NFDI/pynxtools-xps):
```console
pip install git+https://github.com/FAIRmat-NFDI/pynxtools.git
pip install pynxtools[xps]
```
4. Verify you can run the ```dataconverter``` in a terminal window. Open a terminal with the Python environment where you installed ```pynxtools```. Then type the following:
```console
Expand All @@ -43,21 +43,23 @@ dataconverter --help

## Converting the example files

Once you have your files copied into the working directory. Your directory structure should look like this:
Once you have your files copied into the working directory, your directory structure should look like this:
```
├── README.md
├── EX439_S718_Au.sle
├── params.yaml
└── eln_data_sle.yaml
├── eln_data_sle.yaml
└── params.yaml
```

The ```eln_data_sle.yaml``` YAML file is another data file containing additional information (e.g., information about the experimentator) that is not provided in the main data file.

Next, you will run the conversion routine from your Python environment:
```console
dataconverter --params-file params.yaml
```

Here we use a params.yaml parameter file to configure the converter. You can try out [other examples from pynxtools](https://github.com/FAIRmat-NFDI/pynxtools/tree/documentation/examples)

This will create a file called ```Au_25_mbar_O2_no_align.nxs``` in your current directory.
Here we use a ```params.yaml``` parameter file to configure the converter. This will create a file called ```Au_25_mbar_O2_no_align.nxs``` in your current directory.

**Congrats! You now have a FAIR NeXus file!**

You can try out [other examples from pynxtools](https://github.com/FAIRmat-NFDI/pynxtools/tree/master/examples).
0