Command line interface¶
pynxtools-raman provides its command-line tools under a single pynx-raman entry point, mirroring the top-level pynx dispatcher of pynxtools itself. This page documents the current API; see How-to > Build a NOMAD upload batch from the Raman Open Database for usage examples.
The generic pynx convert command (provided by pynxtools, not by this package) is what actually performs a conversion — see How-to > Convert WITec or ROD data and the pynxtools CLI reference.
Download ROD files¶
Downloads a batch of .rod files from the Raman Open Database.
pynx-raman download¶
Download a batch of .rod files from the Raman Open Database.
ROD_IDS: ROD IDs to download, in addition to any given via --ids-file and/or --all.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--yes, -y |
boolean | Do not ask for confirmation before downloading or before overwriting existing .nxs files during conversion. | False |
--output-dir |
directory | Directory the .rod files (and any further output) are written into. | rod_batch |
--all |
boolean | Use the full list of known ROD IDs bundled with this package (ROD-numbers.txt), in addition to any given via ROD_IDS/--ids-file. | False |
--ids-file |
file | Text file with one ROD ID per line, e.g. ROD-numbers.txt. | None |
--help |
boolean | Show this message and exit. | False |
Build a NOMAD upload batch for ROD files¶
Downloads, converts, and stamps a batch of Raman Open Database records with NOMAD upload metadata in one step — see Learn > The Raman Open Database in NOMAD.
pynx-raman build-upload-batch¶
Download, convert, and add nomad.json upload metadata for a batch of ROD records -- the full pipeline for one NOMAD upload.
ROD_IDS: ROD IDs to include, in addition to any given via --ids-file and/or --all.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--yes, -y |
boolean | Do not ask for confirmation before downloading or before overwriting existing .nxs files during conversion. | False |
--output-dir |
directory | Directory the .rod files (and any further output) are written into. | rod_batch |
--all |
boolean | Use the full list of known ROD IDs bundled with this package (ROD-numbers.txt), in addition to any given via ROD_IDS/--ids-file. | False |
--ids-file |
file | Text file with one ROD ID per line, e.g. ROD-numbers.txt. | None |
--help |
boolean | Show this message and exit. | False |
Upload a ROD batch to NOMAD¶
Zips a batch built by build-upload-batch, uploads it to NOMAD, waits for processing, and optionally publishes it. Requires the pynxtools-raman[upload] extra and NOMAD_USERNAME/NOMAD_PASSWORD set in the environment — see Learn > The Raman Open Database in NOMAD.
pynx-raman upload¶
Zip, upload, and optionally publish a ROD batch to NOMAD.
Requires NOMAD_USERNAME and NOMAD_PASSWORD to be set in the environment.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--output-dir |
directory | Directory containing the batch to upload, as built by build-upload-batch. | rod_batch |
--upload-name |
text | Name to give the NOMAD upload(s). | None |
--nomad-url |
text | NOMAD API URL. Defaults to the central NOMAD deployment. | None |
--batch-size |
integer | Upload at most this many entries per NOMAD upload, creating multiple uploads instead of one. Default: upload everything in --output-dir as a single upload. | None |
--publish |
boolean | Publish the upload(s) after successful processing. Off by default: uploads land in staging for manual review. | False |
--yes, -y |
boolean | Do not ask for confirmation before publishing. | False |
--help |
boolean | Show this message and exit. | False |
Analyze CIF keys in ROD files¶
Counts how often each CIF key occurs across a directory of .rod files — useful when deciding what to add to config_file_rod.json.
pynx-raman analyze-keys¶
Count how often each CIF key occurs across every .rod file in ROD_DIR, writing a sorted key/count report into ROD_DIR.
ROD_DIR: directory containing .rod files (default: rod_batch).
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--output |
file | File to write the key/count report to (default: rod_key_statistics.txt inside ROD_DIR). | None |
--help |
boolean | Show this message and exit. | False |