This file contains 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 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 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 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 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 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 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 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! |
This file contains 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
# AW2018-12-06 | |
# very simple auto-courtyard for KiCad footprints | |
# 1. reads bounding-box of F.fab and pads | |
# 2. expands by clearance | |
# 4. writes rectangle to F.CrtYd layer | |
# 5. writes modified footprint to a new file | |
import sys | |
import os | |
import math |
This file contains 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 bigfloat | |
import numpy | |
dds_clk=1.0e9 | |
ftw_length = pow(2,48) | |
IF = 100e6/1024.0 # 97656.25 | |
def ftw_dds(f_hz): | |
return numpy.round(f_hz*ftw_length/dds_clk,0) |
NewerOlder