How to Use This Plugin¶
This plugin can be used in a NOMAD Oasis installation.
Add This Plugin to Your NOMAD installation¶
Read the NOMAD plugin documentation for all details on how to deploy the plugin on your NOMAD instance.
Using the REST API¶
The API is mounted at {api_base_path}/semantic-web-service (in this repo's dev
setup, http://localhost:8000/nomad-oasis/semantic-web-service):
The routes mirror the real ESRF ICAT+ paths (/catalogue/datasets,
/ids/data/download) and proxy them anonymously:
curl 'http://localhost:8000/nomad-oasis/semantic-web-service/health'
# List real ESRF datasets by date, beamline, and technique (proxies ICAT+
# /catalogue/datasets). ID21's public XAS datasets ARE annotated with the
# technique PID, so techniquePids filters them server-side.
curl 'http://localhost:8000/nomad-oasis/semantic-web-service/catalogue/datasets?startDate=2021-01-01&endDate=2022-12-31&instrumentName=ID21&techniquePids=https://w3id.org/PaN/ESRFET%23XAS'
curl 'http://localhost:8000/nomad-oasis/semantic-web-service/map?term=PaNET01196&source=PANET&target=ESRFET'
# Download a real public dataset anonymously, optionally filtered by file extension.
# ID21 datasets hold a single .h5, which IDS returns as the raw file (not a zip);
# multi-file datasets come back as a zip.
curl 'http://localhost:8000/nomad-oasis/semantic-web-service/ids/data/download?datasetIds=874478618&fileExtensions=h5' -o dataset_or_file.bin
See the reference for all routes, or open
.../semantic-web-service/docs for the interactive Swagger UI.
Using the ELN schema¶
- In the NOMAD GUI, create a new entry of type Dataset search request.
- The defaults already target the OSCARS demonstrator source —
synchrotronESRF,vocabularyESRFET,technique_termXAS,instrument_nameID21, and the 2021–2022 window — so simply saving runs an ID21 XAS search against the bundled offline demo catalogue. Setuse_real_icat(step 4) to run the same search against live ESRF ICAT+. Adjust any field (e.g. setvocabularyPANETandtechnique_termPaNET01196, or a differentinstrument_name) as needed. - Save the entry.
resolved_technique_termis resolved (after PANET→ESRFET mapping, if applicable) and the search runs automatically in the same save —matched_datasetsis populated immediately, including a DOI-basedlanding_pageandinvestigation_name/investigation_titlewhere available. Editing the search fields and saving again re-runs the search; saving for an unrelated reason (e.g. step 4 below) does not, so it won't discard work in progress onmatched_datasetsitems. ForESRF, the same save also checks the facility's advertised technique vocabulary (detected_technique_ontology) and flags avocabulary_warningif it disagrees with yourvocabularyselection, without changing it. - Toggle
use_real_icat(off by default) to query the real ESRF ICAT+ endpoint instead of the local demo data (requires network access toicatplus.esrf.fr). Each real match'sids_status(ONLINE/ARCHIVED/RESTORING/...) is filled in at the same time — real ICAT+ archives older public datasets to tape, and onlyONLINEones download immediately. Togglerequire_onlineto drop non-ONLINEmatches frommatched_datasetsentirely instead of just flagging them. - To download a matched dataset's files: open it in
matched_datasets, optionally adjustfile_extensions_filter(defaults toh5; clear it to get the whole dataset), then click the Download Files action button and save. The files are extracted into the upload underdownloaded_folder(e.g.dataset-874478618/), listed indownloaded_files; the zip itself is discarded. This only works for real ICAT+ results (step 4) — the local demo data has no real files behind it. If the dataset isn'tONLINE, a restore is requested andids_statusis updated instead of downloading — tape restores can take minutes to hours, so retry later. - A successful download also creates a new, standalone Downloaded dataset
entry (
dataset-874478618.archive.yaml) in the same upload, independent of theDatasetSearchRequestentry — visible in the upload's entry list, with each downloaded file individually browsable underfiles. - If the
nexusextra is installed (pip install nomad-semantic-web-service[nexus], which bringspynxtools-xas) andauto_convert_to_nxxasis left on (the default), each downloaded raw.h5is also converted to a NeXusNXxas.nxsbeside it and processed into its own XAS entry — so the ESRF dataset becomes discoverable by the samedefinition == NXxassearch used for already-NeXus data. Without the extra, this step is skipped with a warning and the download itself is unaffected.