BIPM Time Department Data Base | |||||
|
|
Overview
The Mises en Pratique for the metre and the second are currently
published in the BIPM website as PDF files ("Recommended
values of standard frequencies"). The CCL and CCTF communities
expressed the needs to have access to these data in a machine-readable
format. More about this matter can be found in
A.J. Lewis and
al.(2022), "A digital framework for realising the SI-a proposal for the
metre" , Metrologia 59 044004.
To answer to this need the
BIPM Time Department started a digitalization project allowing an
automatized process based on a a dedicated database and API.
In the
first release of this project the data currently available in PDF files
will be provided in XML format.
Scope
This application programming interface (API) is providing to machines
the access to the list of recommended values of standard frequencies for
applications including the practical realization of the definition of
the metre and secondary representations of the definition of the meter
and the second.
Technical aspects
The following API using GET method, the access to the data is using
HTTP/HTTPS protocol.
This can be obtained using utilities to transfer data from a server
(such as cURL, wget or any programming languages supporting HTTP
protocol).
A dedicated shared script to be run as client has been created for a
very easy access to all the available XML files. The current version is
to be considered as a prototype for extensive testing and feedbacks from
users are welcome.
Ouput format
Data are provided in standard exchange format : XML
( The XML schema
has been defined by the National Physical Laboratory and posted on
Zenodo :
https://zenodo.org/record/6412020
).
To allow an quick and easy generation of the XML documents, a small
bash script client has been developped.
This script allows to automatically download all available XMLs files
with results corresponding to all reference frequencies for the meter
and the second for the current date.
You can download this script: Documentation + Source code (TAR and ZIP).
It has been validated under Linux. For Windows use WSL, MSYS2, etc. to
emulated the Linux environment.
The API using GET method uses URL general syntax below :
https://webtai.bipm.org/api/ccl-cctf/v1.0/xml_auto.html?target=127I2|552+THz&date=2022-11-15
or ( to prevent use of '|' character in command line ) :
https://webtai.bipm.org/api/ccl-cctf/v1.0/xml_auto.html?target=127I2&freq=552+THz&date=2022-11-15
It is required to use utilities supporting HTTP protocol to get the data, such as cURL , wget or other programming languages such as Python, Perl,etc.
Below you can find examples of commands:
Using wget |
---|
wget -O 127I2-552THz.xml "https://webtai.bipm.org/api/ccl-cctf/v1.0/xml_auto.html?target=127I2|552+THz&date=2022-11-15" |
Using cURL |
---|
curl -k --url "https://webtai.bipm.org/api/ccl-cctf/v1.0/xml_auto.html?target=127I2|552+THz&date=2022-11-15" > 127I2-552THz.xml |
Using Perl |
---|
#!/usr/bin/perl
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my $response = $ua->get("https://webtai.bipm.org/api/ccl-cctf/v1.0/xml_auto.html?target=127I2|552+THz&date=2022-11-15") ;
if ($response->is_success) { print $response->decoded_content; }
Using Python |
---|
import requests
= requests.get("https://webtai.bipm.org/api/ccl-cctf/v1.0/xml_auto.html?target=127I2|552+THz&date=2022-11-15")
r print(r.text)
Version | Date | Feature/Change |
---|---|---|
Version 1.0 | 19/06/2023 | Stable and open access version |
24/02/2025 | More restrictive filtering on arguments to prevent injection attacks |
Home | FTP results | API UTC | Sitemap | Contact us | Webmaster |