opencr.data.provenance
Where a piece of data comes from, how it was changed and what it may be used for.
Every reaction, and every dataset of a model, carries a Provenance:
the reference, the persistent identifier, the version and the retrieval date,
the units and the conversions applied, the range of validity, the
interpolation and extrapolation, the uncertainty and the licence under which
it may be redistributed. opencr.data.checks.check_provenance tells
what is missing.
Attributes
| Name | Description |
|---|---|
DERIVED | No description. |
LICENCES_REDISTRIBUTABLE | No description. |
Classes
| Name | Description |
|---|---|
Provenance | The origin and the conditions of use of one piece of data. |
Reference | A publication or database. |
Validity | The range of a quantity in which data may be used. |
DERIVEDattributemodule attribute#
DERIVED = Provenance(
Reference('derived in OpenCR'),
licence='MIT',
notes='computed from other data of the model'
)LICENCES_REDISTRIBUTABLEattributemodule attribute#
LICENCES_REDISTRIBUTABLE = ('CC0-1.0', 'CC-BY-4.0', 'MIT', 'public-domain', 'published-fit')Provenanceclassdataclass#
class Provenance(reference: Reference, version: str = '', retrieved: str = '', units: str = '', conversions: tuple[str, ...] = (), validity: tuple[Validity, ...] = (), interpolation: str = '', extrapolation: str = '', uncertainty: float | None = None, uncertainty_note: str = '', licence: str = 'unknown', notes: str = '')The origin and the conditions of use of one piece of data.
Attributes
| Name | Type | Description |
|---|---|---|
reference | Reference | The source. |
version | str | The version of the database or dataset, if it has one. |
retrieved | str | The date the data were obtained, ISO 8601 ("2026-10-27"). |
units | str | The units of the data as stored, e.g. "m^2 against eV". |
conversions | tuple[str, ...] | The conversions applied to the source, in order, e.g.
("1e-16 cm^2 -> m^2",). |
validity | tuple[Validity, ...] | The ranges of validity. |
interpolation | str | How values between data points are obtained. |
extrapolation | str | What happens outside the data or the validity. |
uncertainty | float | None | The relative uncertainty (a fraction, e.g. 0.2), or None
if unknown. |
uncertainty_note | str | The uncertainty as the source states it. |
licence | str | The licence of the data; one of LICENCES_REDISTRIBUTABLE
for data OpenCR may ship, otherwise its name or "unknown". |
notes | str | Anything else, e.g. a correction of a misprint. |
conversionsattributeclass attributeinstance attribute#
conversions: tuple[str, ...] = ()extrapolationattributeclass attributeinstance attribute#
extrapolation: str = ''interpolationattributeclass attributeinstance attribute#
interpolation: str = ''licenceattributeclass attributeinstance attribute#
licence: str = 'unknown'notesattributeclass attributeinstance attribute#
notes: str = ''referenceattributeinstance attribute#
reference: Referenceretrievedattributeclass attributeinstance attribute#
retrieved: str = ''uncertaintyattributeclass attributeinstance attribute#
uncertainty: float | None = Noneuncertainty_noteattributeclass attributeinstance attribute#
uncertainty_note: str = ''unitsattributeclass attributeinstance attribute#
units: str = ''validityattributeclass attributeinstance attribute#
validity: tuple[Validity, ...] = ()versionattributeclass attributeinstance attribute#
version: str = ''Referenceclassdataclass#
class Reference(citation: str, doi: str | None = None, url: str | None = None, detail: str = '')A publication or database.
Attributes
| Name | Type | Description |
|---|---|---|
citation | str | The full citation, e.g. "L. C. Johnson, Astrophys. J. 174, 227 (1972)". |
doi | str | None | The DOI without the https://doi.org/ prefix, if any. |
url | str | None | A URL where the source is openly available, if any. |
detail | str | The equation, table or section used, e.g. "eq. (14), table 3". |
Validityclassdataclass#
class Validity(quantity: str, minimum: float = 0.0, maximum: float = float('inf'), unit: str = 'eV')The range of a quantity in which data may be used.
Attributes
maximumattributeclass attributeinstance attribute#
maximum: float = float('inf')minimumattributeclass attributeinstance attribute#
minimum: float = 0.0quantityattributeinstance attribute#
quantity: strunitattributeclass attributeinstance attribute#
unit: str = 'eV'