This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
NTPLib query NTP-servers | |
""" | |
import ntplib | |
import datetime | |
def test_ntp(ip): | |
c = ntplib.NTPClient() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clear all | |
close all | |
% BIPM API https://webtai.bipm.org/api/v1.0/index.html | |
data = webread("https://webtai.bipm.org/api/v1.0/get-data.html?scale=utc&lab=MIKE") | |
mjd = data.data.x; | |
phase_ns = data.data.y; | |
figure() | |
plot(mjd,phase_ns,'o') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import allantools as at | |
import numpy as np | |
decades = 3 | |
x_all = np.random.randn(pow(10, decades)) # test time-series | |
dev_rt = at.realtime.oadev_realtime(auto_afs=True,tau0=1.0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Created on Sun Oct 9 10:09:25 2022 | |
@author: awanders | |
""" | |
import bibtexparser | |
import datetime |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Read a clock-weight file from the BIPM Circular-T website | |
plot some figres | |
AW2021-03-28, update 2021-03-29 | |
""" | |
import os | |
import datetime |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The code below relates to computing the inverse chi-squared cumulative distribution, | |
# used e.g. in Stable32 and allantools for computing confidence intervals. | |
# This blog post has the images produced by the code, and some comments | |
# http://www.anderswallin.net/2020/12/fun-with-chi-squared/ | |
# | |
# Anders Wallin, 2020-12-29 | |
# | |
import numpy as np | |
import scipy.stats | |
import scipy.special |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Assume white phase noise sampled at 1 MS/s | |
# visualize what happens when we decimate 10x six times to 1 S/s | |
# | |
import allantools as at | |
import numpy | |
import matplotlib.pyplot as plt | |
import scipy | |
# simulated data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sr+ frequencies | |
# AW2019-11-20 | |
# https://www.bipm.org/utils/common/pdf/mep/88Sr+_445THz_2017.pdf | |
import matplotlib.pyplot as plt | |
import numpy | |
f_srs = 444779044095486.50 | |
f_offset = 444779044095000 | |
u_y_srs = 1.5e-15 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Usage in OBS | |
Browser source: local file\clock.html | |
Custom CSS box: body { background-color: rgba(0, 0, 0, 0); margin: 0px auto; overflow: hidden; | |
color: white; font: bold 40px monospace; } | |
--> | |
<!DOCTYPE html> | |
<html> | |
<head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# simple script for reading Keysight 53230A counter | |
import vxi11 # https://pypi.org/project/python-vxi11/ | |
import time | |
import datetime | |
import pytz | |
instr1 = vxi11.Instrument("194.100.49.155") # lower counter | |
init_commands = ["*RST", | |
"SYST:TIM 5.0", | |
"CONF:TINT (@1), (@2)", # REVERSE! |
NewerOlder