dccQuantities¶
dccQuantities is a Python library designed for users of PTB’s Digital Calibration Certificates (DCC). The goal of the library is to allow parsing, serializing and manipulating the data defined in XML formatted files.
About DCC Quantities¶
A DCC Quantity is a structure that contains information about data, with one or more values and their uncertainties, all sharing the same unit.
Example: Representation of a single value quantity.
Quantity:
name: "Weight"
value: 71.52
probability_cov: 0.02
unit: "\\kilogram"
Example: Representation of a quantity with multiple values.
Quantity:
name: "Weight"
value: [71.52, 14.80, 10.0, 25.23]
probability_cov: [0.02, 0.02, 0.01, 0.01]
unit: "\\kilogram"
Warning
Both previous quantity YAML representations are only to explain the important fields of a quantity, but they are not valid DCC schemas.
Each quantity is mainly defined by four characteristics that contain information about it:
- name: The descriptive name of the quantity. This name is an orientative tag to what it holds.
- value: An array of all the values that the quantity holds. These are the absolute value, not including the uncertainties.
- probability_cov: Array with the same number of elements as value, where the i-th element correspond to the symmetrical probability coverage (uncertainty) to the i-th element at the value array.
- unit: Digital SI (D-SI) unit for all the values and uncertainties of the quantity.
When working with quantities instances, other parameters are also of importance. They will be explained further on in this documentation.
Note
A quantity can only hold values that have the same unit. If multiple values require different units, then we are already talking about different quantities.
See the next section Get Started for installation steps and quick start.
Digital SI (D-SI) Units¶
The D-SI Units are the digital representation of all the rules defined in the SI-BIPM brochure. This is also an open-source project stored at the PTB repo of dsiUnits.