Skip to content

DataCite

datacite

DataCite: instrument DOIs inside every dataset, and DOIs for datasets.

With nuance-datacite installed (pip install "nuscope[datacite]"):

  • Reading a file looks its instrument up in the NUANCE instrument registry (vendor, model, serial) and records the instrument DOI in metadata["instrument"]["doi"] and in the provenance agent of the instrument. Saving puts the instrument DOIs in the seal manifest as well, so the seal (and every signature on it) covers which instrument collected the data. Pixels are never modified.
  • Citing a sealed file builds DataCite metadata for a dataset DOI linked to the instrument (IsCollectedBy), to the exact file (seal id and SHA-256) and to its creators (ORCID iDs from the file's signatures), and can create a draft DOI. The DOI is then written next to the seal (not into it: the seal must not change), and the DataCite record carries the seal id, so each points to the other.

    import nuscope as ns from nuscope import datacite attrs = datacite.dataset_payload("ti11.h5", title="Ti alloy BSE, sample 11") doi = datacite.register_draft("ti11.h5", title="Ti alloy BSE, sample 11") # needs DataCite credentials

link_instrument(meta: dict) -> Optional[dict]

Add the registered instrument DOI to meta (in place). Returns the reference, or None.

dataset_payload

dataset_payload(path, *, title: str, description: str = '', creators: Optional[list] = None, url: Optional[str] = None, doi: Optional[str] = None, prefix: Optional[str] = None, subjects: tuple = ()) -> dict

DataCite attributes for a dataset DOI of a sealed, intact NUScope file.

register_draft

register_draft(path, *, title: str, client=None, **kw) -> str

Create a draft dataset DOI for path and record it next to the file's seal. Returns the DOI.