From 7c02c540ac0890fcde4ab38e9f91e1f0eb2904de Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Tue, 4 Aug 2026 21:44:07 -0300 Subject: [PATCH] Promote the SI defining constants to named quantity nodes Signed-off-by: Juan Cruz Viotti --- examples/calibration-certificate.json | 52 +++++++ .../bipm/si/2019/constant/avogadro/v1.json | 8 + .../bipm/si/2019/constant/boltzmann/v1.json | 8 + .../2019/constant/caesium-frequency/v1.json | 8 + .../2019/constant/elementary-charge/v1.json | 8 + .../bipm/si/2019/constant/light-speed/v1.json | 8 + .../2019/constant/luminous-efficacy/v1.json | 8 + schemas/bipm/si/2019/constant/planck/v1.json | 8 + .../calibration-certificate.test.json | 141 ++++++++++++++++++ .../si/2019/constant/avogadro/v1.test.json | 18 ++- .../si/2019/constant/boltzmann/v1.test.json | 18 ++- .../constant/caesium-frequency/v1.test.json | 18 ++- .../constant/elementary-charge/v1.test.json | 18 ++- .../si/2019/constant/light-speed/v1.test.json | 18 ++- .../constant/luminous-efficacy/v1.test.json | 18 ++- .../bipm/si/2019/constant/planck/v1.test.json | 18 ++- 16 files changed, 368 insertions(+), 7 deletions(-) create mode 100644 examples/calibration-certificate.json create mode 100644 test/examples/calibration-certificate.test.json diff --git a/examples/calibration-certificate.json b/examples/calibration-certificate.json new file mode 100644 index 00000000..22cedb6d --- /dev/null +++ b/examples/calibration-certificate.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Calibration Certificate", + "description": "A metrology certificate for a frequency standard that declares traceability to the caesium defining constant of the SI as a named quantity node, with the measured frequency offset in a prefixed SI unit from the standard library", + "examples": [ + { + "about": "Caesium beam frequency standard CS-1", + "issuedBy": { + "name": "National Institute of Standards and Technology" + }, + "validFrom": "2026-05-12", + "definingConstant": 9192631770, + "measuredOffset": 0.4 + } + ], + "x-jsonld-type": "https://schema.org/Certification", + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ "https://www.bipm.org/en/publications/si-brochure" ], + "type": "object", + "required": [ "about", "definingConstant" ], + "properties": { + "about": { + "x-jsonld-id": "https://schema.org/about", + "type": "string" + }, + "issuedBy": { + "x-jsonld-id": "https://schema.org/issuedBy", + "x-jsonld-type": "https://schema.org/Organization", + "type": "object", + "properties": { + "name": { + "x-jsonld-id": "https://schema.org/name", + "type": "string" + } + }, + "additionalProperties": false + }, + "validFrom": { + "x-jsonld-id": "https://schema.org/validFrom", + "$ref": "../schemas/iso/datetime/2019/date/calendar-extended/v1.json" + }, + "definingConstant": { + "x-jsonld-id": "http://purl.org/dc/terms/references", + "$ref": "../schemas/bipm/si/2019/constant/caesium-frequency/v1.json" + }, + "measuredOffset": { + "x-jsonld-id": "https://schema.org/value", + "$ref": "../schemas/bipm/si/2019/derived/prefixed/millihertz/v1.json" + } + }, + "additionalProperties": false +} diff --git a/schemas/bipm/si/2019/constant/avogadro/v1.json b/schemas/bipm/si/2019/constant/avogadro/v1.json index d9320e96..eb5302d9 100644 --- a/schemas/bipm/si/2019/constant/avogadro/v1.json +++ b/schemas/bipm/si/2019/constant/avogadro/v1.json @@ -3,6 +3,14 @@ "title": "Avogadro constant", "description": "It has the exact numerical value of 6.022 140 76 x 10^23 when expressed in the unit mol^-1", "examples": [ 6.02214076000000000000000e+23 ], + "x-jsonld-constants": { + "http://qudt.org/schema/qudt/hasUnit": { + "@id": "http://qudt.org/vocab/unit/PER-MOL" + } + }, + "x-jsonld-self": "https://si-digital-framework.org/constants/AvogadroConstant", + "x-jsonld-type": "http://qudt.org/schema/qudt/Quantity", + "x-jsonld-value": "http://qudt.org/schema/qudt/value", "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", "x-links": [ "https://www.bipm.org/en/publications/si-brochure" ], "const": 6.02214076000000000000000e+23 diff --git a/schemas/bipm/si/2019/constant/boltzmann/v1.json b/schemas/bipm/si/2019/constant/boltzmann/v1.json index 8f054cc6..a2b8693a 100644 --- a/schemas/bipm/si/2019/constant/boltzmann/v1.json +++ b/schemas/bipm/si/2019/constant/boltzmann/v1.json @@ -3,6 +3,14 @@ "title": "Boltzmann constant", "description": "It has the exact numerical value of 1.380 649 x 10^-23 when expressed in the unit J/K, which is equal to kg m^2 s^-2 K^-1", "examples": [ 1.380649e-23 ], + "x-jsonld-constants": { + "http://qudt.org/schema/qudt/hasUnit": { + "@id": "http://qudt.org/vocab/unit/J-PER-K" + } + }, + "x-jsonld-self": "https://si-digital-framework.org/constants/BoltzmannConstant", + "x-jsonld-type": "http://qudt.org/schema/qudt/Quantity", + "x-jsonld-value": "http://qudt.org/schema/qudt/value", "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", "x-links": [ "https://www.bipm.org/en/publications/si-brochure" ], "const": 1.380649e-23 diff --git a/schemas/bipm/si/2019/constant/caesium-frequency/v1.json b/schemas/bipm/si/2019/constant/caesium-frequency/v1.json index 27d8bc1e..b48a6e62 100644 --- a/schemas/bipm/si/2019/constant/caesium-frequency/v1.json +++ b/schemas/bipm/si/2019/constant/caesium-frequency/v1.json @@ -3,6 +3,14 @@ "title": "Caesium hyperfine transition frequency", "description": "Of the unperturbed ground state hyperfine transition of the caesium 133 atom. It has the exact numerical value of 9 192 631 770 when expressed in the unit Hz, which is equal to s^-1", "examples": [ 9192631770 ], + "x-jsonld-constants": { + "http://qudt.org/schema/qudt/hasUnit": { + "@id": "http://qudt.org/vocab/unit/HZ" + } + }, + "x-jsonld-self": "https://si-digital-framework.org/constants/HyperfineTransitionFrequencyOfCs-133", + "x-jsonld-type": "http://qudt.org/schema/qudt/Quantity", + "x-jsonld-value": "http://qudt.org/schema/qudt/value", "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", "x-links": [ "https://www.bipm.org/en/publications/si-brochure" ], "const": 9192631770 diff --git a/schemas/bipm/si/2019/constant/elementary-charge/v1.json b/schemas/bipm/si/2019/constant/elementary-charge/v1.json index b8767522..b7fec903 100644 --- a/schemas/bipm/si/2019/constant/elementary-charge/v1.json +++ b/schemas/bipm/si/2019/constant/elementary-charge/v1.json @@ -3,6 +3,14 @@ "title": "Elementary charge", "description": "It has the exact numerical value of 1.602 176 634 x 10^-19 when expressed in the unit C, which is equal to A s", "examples": [ 1.602176634e-19 ], + "x-jsonld-constants": { + "http://qudt.org/schema/qudt/hasUnit": { + "@id": "http://qudt.org/vocab/unit/C" + } + }, + "x-jsonld-self": "https://si-digital-framework.org/constants/ElementaryCharge", + "x-jsonld-type": "http://qudt.org/schema/qudt/Quantity", + "x-jsonld-value": "http://qudt.org/schema/qudt/value", "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", "x-links": [ "https://www.bipm.org/en/publications/si-brochure" ], "const": 1.602176634e-19 diff --git a/schemas/bipm/si/2019/constant/light-speed/v1.json b/schemas/bipm/si/2019/constant/light-speed/v1.json index 3e269a6c..ddccd0d5 100644 --- a/schemas/bipm/si/2019/constant/light-speed/v1.json +++ b/schemas/bipm/si/2019/constant/light-speed/v1.json @@ -3,6 +3,14 @@ "title": "Speed of light in vacuum", "description": "It has the exact numerical value of 299 792 458 when expressed in the unit m/s", "examples": [ 299792458 ], + "x-jsonld-constants": { + "http://qudt.org/schema/qudt/hasUnit": { + "@id": "http://qudt.org/vocab/unit/M-PER-SEC" + } + }, + "x-jsonld-self": "https://si-digital-framework.org/constants/SpeedOfLight", + "x-jsonld-type": "http://qudt.org/schema/qudt/Quantity", + "x-jsonld-value": "http://qudt.org/schema/qudt/value", "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", "x-links": [ "https://www.bipm.org/en/publications/si-brochure" ], "const": 299792458 diff --git a/schemas/bipm/si/2019/constant/luminous-efficacy/v1.json b/schemas/bipm/si/2019/constant/luminous-efficacy/v1.json index 288000bc..4dc9b7ce 100644 --- a/schemas/bipm/si/2019/constant/luminous-efficacy/v1.json +++ b/schemas/bipm/si/2019/constant/luminous-efficacy/v1.json @@ -3,6 +3,14 @@ "title": "Luminous efficacy of monochromatic radiation", "description": "Of monochromatic radiation of frequency 540 x 10^12 Hz. It has the exact numerical value of 683 when expressed in the unit lm/W, which is equal to cd sr W^-1, or cd sr kg^-1 m^-2 s^3", "examples": [ 683 ], + "x-jsonld-constants": { + "http://qudt.org/schema/qudt/hasUnit": { + "@id": "http://qudt.org/vocab/unit/LM-PER-W" + } + }, + "x-jsonld-self": "https://si-digital-framework.org/constants/LuminousEfficacy", + "x-jsonld-type": "http://qudt.org/schema/qudt/Quantity", + "x-jsonld-value": "http://qudt.org/schema/qudt/value", "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", "x-links": [ "https://www.bipm.org/en/publications/si-brochure" ], "const": 683 diff --git a/schemas/bipm/si/2019/constant/planck/v1.json b/schemas/bipm/si/2019/constant/planck/v1.json index 4244f9e7..de161796 100644 --- a/schemas/bipm/si/2019/constant/planck/v1.json +++ b/schemas/bipm/si/2019/constant/planck/v1.json @@ -3,6 +3,14 @@ "title": "Planck constant", "description": "It has the exact numerical value of 6.626 070 15 x 10^-34 when expressed in the unit J s, which is equal to kg m^2 s^-1", "examples": [ 6.62607015e-34 ], + "x-jsonld-constants": { + "http://qudt.org/schema/qudt/hasUnit": { + "@id": "http://qudt.org/vocab/unit/J-SEC" + } + }, + "x-jsonld-self": "https://si-digital-framework.org/constants/PlanckConstant", + "x-jsonld-type": "http://qudt.org/schema/qudt/Quantity", + "x-jsonld-value": "http://qudt.org/schema/qudt/value", "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", "x-links": [ "https://www.bipm.org/en/publications/si-brochure" ], "const": 6.62607015e-34 diff --git a/test/examples/calibration-certificate.test.json b/test/examples/calibration-certificate.test.json new file mode 100644 index 00000000..9fd58142 --- /dev/null +++ b/test/examples/calibration-certificate.test.json @@ -0,0 +1,141 @@ +{ + "target": "../../examples/calibration-certificate.json", + "tests": [ + { + "description": "Valid - complete certificate", + "data": { + "about": "Caesium beam frequency standard CS-1", + "issuedBy": { + "name": "National Institute of Standards and Technology" + }, + "validFrom": "2026-05-12", + "definingConstant": 9192631770, + "measuredOffset": 0.4 + }, + "valid": true, + "rdf": [ + { + "@type": [ "https://schema.org/Certification" ], + "https://schema.org/about": [ + { + "@value": "Caesium beam frequency standard CS-1" + } + ], + "http://purl.org/dc/terms/references": [ + { + "@id": "https://si-digital-framework.org/constants/HyperfineTransitionFrequencyOfCs-133", + "@type": [ "http://qudt.org/schema/qudt/Quantity" ], + "http://qudt.org/schema/qudt/value": [ + { + "@value": 9192631770 + } + ], + "http://qudt.org/schema/qudt/hasUnit": [ + { + "@id": "http://qudt.org/vocab/unit/HZ" + } + ] + } + ], + "https://schema.org/issuedBy": [ + { + "@type": [ "https://schema.org/Organization" ], + "https://schema.org/name": [ + { + "@value": "National Institute of Standards and Technology" + } + ] + } + ], + "https://schema.org/value": [ + { + "@type": [ "http://qudt.org/schema/qudt/Quantity" ], + "http://qudt.org/schema/qudt/value": [ + { + "@value": 0.4 + } + ], + "http://qudt.org/schema/qudt/hasUnit": [ + { + "@id": "http://qudt.org/vocab/unit/MilliHZ" + } + ] + } + ], + "https://schema.org/validFrom": [ + { + "@value": "2026-05-12", + "@type": "http://www.w3.org/2001/XMLSchema#date" + } + ] + } + ] + }, + { + "description": "Valid - minimal certificate", + "data": { + "about": "Rubidium frequency standard RB-7", + "definingConstant": 9192631770 + }, + "valid": true, + "rdf": [ + { + "@type": [ "https://schema.org/Certification" ], + "https://schema.org/about": [ + { + "@value": "Rubidium frequency standard RB-7" + } + ], + "http://purl.org/dc/terms/references": [ + { + "@id": "https://si-digital-framework.org/constants/HyperfineTransitionFrequencyOfCs-133", + "@type": [ "http://qudt.org/schema/qudt/Quantity" ], + "http://qudt.org/schema/qudt/value": [ + { + "@value": 9192631770 + } + ], + "http://qudt.org/schema/qudt/hasUnit": [ + { + "@id": "http://qudt.org/vocab/unit/HZ" + } + ] + } + ] + } + ] + }, + { + "description": "Invalid - missing defining constant", + "data": { + "about": "Caesium beam frequency standard CS-1" + }, + "valid": false + }, + { + "description": "Invalid - wrong constant value", + "data": { + "about": "Caesium beam frequency standard CS-1", + "definingConstant": 9192631771 + }, + "valid": false + }, + { + "description": "Invalid - constant as a string", + "data": { + "about": "Caesium beam frequency standard CS-1", + "definingConstant": "9192631770" + }, + "valid": false + }, + { + "description": "Invalid - basic format date", + "data": { + "about": "Caesium beam frequency standard CS-1", + "definingConstant": 9192631770, + "validFrom": "20260512" + }, + "valid": false + } + ] +} diff --git a/test/schemas/bipm/si/2019/constant/avogadro/v1.test.json b/test/schemas/bipm/si/2019/constant/avogadro/v1.test.json index ea201ec9..c32fdd33 100644 --- a/test/schemas/bipm/si/2019/constant/avogadro/v1.test.json +++ b/test/schemas/bipm/si/2019/constant/avogadro/v1.test.json @@ -4,7 +4,23 @@ { "description": "Valid - exact value", "data": 6.02214076000000000000000e+23, - "valid": true + "valid": true, + "rdf": [ + { + "@id": "https://si-digital-framework.org/constants/AvogadroConstant", + "@type": [ "http://qudt.org/schema/qudt/Quantity" ], + "http://qudt.org/schema/qudt/value": [ + { + "@value": 6.02214076000000000000000e+23 + } + ], + "http://qudt.org/schema/qudt/hasUnit": [ + { + "@id": "http://qudt.org/vocab/unit/PER-MOL" + } + ] + } + ] }, { "description": "Invalid - different value", diff --git a/test/schemas/bipm/si/2019/constant/boltzmann/v1.test.json b/test/schemas/bipm/si/2019/constant/boltzmann/v1.test.json index 0a920ef9..d63f52e8 100644 --- a/test/schemas/bipm/si/2019/constant/boltzmann/v1.test.json +++ b/test/schemas/bipm/si/2019/constant/boltzmann/v1.test.json @@ -4,7 +4,23 @@ { "description": "Valid - exact value", "data": 1.380649e-23, - "valid": true + "valid": true, + "rdf": [ + { + "@id": "https://si-digital-framework.org/constants/BoltzmannConstant", + "@type": [ "http://qudt.org/schema/qudt/Quantity" ], + "http://qudt.org/schema/qudt/value": [ + { + "@value": 1.380649e-23 + } + ], + "http://qudt.org/schema/qudt/hasUnit": [ + { + "@id": "http://qudt.org/vocab/unit/J-PER-K" + } + ] + } + ] }, { "description": "Invalid - different value", diff --git a/test/schemas/bipm/si/2019/constant/caesium-frequency/v1.test.json b/test/schemas/bipm/si/2019/constant/caesium-frequency/v1.test.json index fd78f159..9519f44d 100644 --- a/test/schemas/bipm/si/2019/constant/caesium-frequency/v1.test.json +++ b/test/schemas/bipm/si/2019/constant/caesium-frequency/v1.test.json @@ -4,7 +4,23 @@ { "description": "Valid - exact value", "data": 9192631770, - "valid": true + "valid": true, + "rdf": [ + { + "@id": "https://si-digital-framework.org/constants/HyperfineTransitionFrequencyOfCs-133", + "@type": [ "http://qudt.org/schema/qudt/Quantity" ], + "http://qudt.org/schema/qudt/value": [ + { + "@value": 9192631770 + } + ], + "http://qudt.org/schema/qudt/hasUnit": [ + { + "@id": "http://qudt.org/vocab/unit/HZ" + } + ] + } + ] }, { "description": "Invalid - different value", diff --git a/test/schemas/bipm/si/2019/constant/elementary-charge/v1.test.json b/test/schemas/bipm/si/2019/constant/elementary-charge/v1.test.json index c5c571a8..5b1e7c5d 100644 --- a/test/schemas/bipm/si/2019/constant/elementary-charge/v1.test.json +++ b/test/schemas/bipm/si/2019/constant/elementary-charge/v1.test.json @@ -4,7 +4,23 @@ { "description": "Valid - exact value", "data": 1.602176634e-19, - "valid": true + "valid": true, + "rdf": [ + { + "@id": "https://si-digital-framework.org/constants/ElementaryCharge", + "@type": [ "http://qudt.org/schema/qudt/Quantity" ], + "http://qudt.org/schema/qudt/value": [ + { + "@value": 1.602176634e-19 + } + ], + "http://qudt.org/schema/qudt/hasUnit": [ + { + "@id": "http://qudt.org/vocab/unit/C" + } + ] + } + ] }, { "description": "Invalid - different value", diff --git a/test/schemas/bipm/si/2019/constant/light-speed/v1.test.json b/test/schemas/bipm/si/2019/constant/light-speed/v1.test.json index c6b5baa8..72237304 100644 --- a/test/schemas/bipm/si/2019/constant/light-speed/v1.test.json +++ b/test/schemas/bipm/si/2019/constant/light-speed/v1.test.json @@ -4,7 +4,23 @@ { "description": "Valid - exact value", "data": 299792458, - "valid": true + "valid": true, + "rdf": [ + { + "@id": "https://si-digital-framework.org/constants/SpeedOfLight", + "@type": [ "http://qudt.org/schema/qudt/Quantity" ], + "http://qudt.org/schema/qudt/value": [ + { + "@value": 299792458 + } + ], + "http://qudt.org/schema/qudt/hasUnit": [ + { + "@id": "http://qudt.org/vocab/unit/M-PER-SEC" + } + ] + } + ] }, { "description": "Invalid - different value", diff --git a/test/schemas/bipm/si/2019/constant/luminous-efficacy/v1.test.json b/test/schemas/bipm/si/2019/constant/luminous-efficacy/v1.test.json index 212d6906..5fdf0e4a 100644 --- a/test/schemas/bipm/si/2019/constant/luminous-efficacy/v1.test.json +++ b/test/schemas/bipm/si/2019/constant/luminous-efficacy/v1.test.json @@ -4,7 +4,23 @@ { "description": "Valid - exact value", "data": 683, - "valid": true + "valid": true, + "rdf": [ + { + "@id": "https://si-digital-framework.org/constants/LuminousEfficacy", + "@type": [ "http://qudt.org/schema/qudt/Quantity" ], + "http://qudt.org/schema/qudt/value": [ + { + "@value": 683 + } + ], + "http://qudt.org/schema/qudt/hasUnit": [ + { + "@id": "http://qudt.org/vocab/unit/LM-PER-W" + } + ] + } + ] }, { "description": "Invalid - different value", diff --git a/test/schemas/bipm/si/2019/constant/planck/v1.test.json b/test/schemas/bipm/si/2019/constant/planck/v1.test.json index 5b3fee33..ee673f59 100644 --- a/test/schemas/bipm/si/2019/constant/planck/v1.test.json +++ b/test/schemas/bipm/si/2019/constant/planck/v1.test.json @@ -4,7 +4,23 @@ { "description": "Valid - exact value", "data": 6.62607015e-34, - "valid": true + "valid": true, + "rdf": [ + { + "@id": "https://si-digital-framework.org/constants/PlanckConstant", + "@type": [ "http://qudt.org/schema/qudt/Quantity" ], + "http://qudt.org/schema/qudt/value": [ + { + "@value": 6.62607015e-34 + } + ], + "http://qudt.org/schema/qudt/hasUnit": [ + { + "@id": "http://qudt.org/vocab/unit/J-SEC" + } + ] + } + ] }, { "description": "Invalid - different value",