Skip to content

Instantly share code, notes, and snippets.

View DanHickstein's full-sized avatar

Danhickstein DanHickstein

  • Octave Photonics
  • Boulder, CO
View GitHub Profile
This file has been truncated, but you can view the full file.
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#! /usr/bin/env python
# 2014-10-13 by Dan Hickstein
import numpy as np
import matplotlib.pyplot as plt
pressure = np.logspace(-3,3,100)
def Cknud(pressure,length,diameter):
#using equation 1.26 of the Leybold handbook:
#https://www3.nd.edu/~nsl/Lectures/urls/LEYBOLD_FUNDAMENTALS.pdf
import ctypes as c
import numpy as np
import os, time
dllname = os.path.join(os.path.dirname(__file__), 'Thorlabs.MotionControl.IntegratedStepperMotors.dll')
if not os.path.exists(dllname):
print "ERROR: DLL not found"
p = c.windll.LoadLibrary(dllname)
@DanHickstein
DanHickstein / opticaArxiv.cls
Created August 28, 2017 16:48
A modified Optica class file that removes the "Optica" text, and makes a few other improvements
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% File: opticaArxiv.cls
% Version: 1.4
% Date: 25 Aug 2016
%
% Hacked on Aug 15 2017, to produce a "preprint"
% suitable for submission to ArXiv, or similar.
%
% - Removed "Optica" text in header
% - Changed "Research Article" to "Preprint" in header
@DanHickstein
DanHickstein / opticaArxiv.cls
Created August 28, 2017 16:48
A modified Optica class file that removes the "Optica" text, and makes a few other improvements
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% File: opticaArxiv.cls
% Version: 1.4
% Date: 25 Aug 2016
%
% Hacked on Aug 15 2017, to produce a "preprint"
% suitable for submission to ArXiv, or similar.
%
% - Removed "Optica" text in header
% - Changed "Research Article" to "Preprint" in header
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 19 in line 1.
system information: Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz16.7.0x86_64Darwin2.7.13
n, basex, basex_bs, direct_C, direct_C_f, direct_Python, direct_Python_f, hansenlaw, hansenlaw_f, linbasex, linbasex_bs, onion_bordas, onion_peeling, onion_peeling_bs, two_point, two_point_bs, three_point, three_point_bs,
101, 0.355, 307.988, 1.073, 0.889, 8.973, 8.731, 2.977, 2.035, 7.562, 0.989, 46.556, 0.075, 0.624, 0.082, 0.829, 0.074, 1.667,
145, 0.853, 806.014, 2.352, 4.204, 18.338, 19.016, 5.344, 4.279, 11.060, 1.706, 121.463, 0.144, 0.845, 0.217, 0.912, 0.540, 3.066,
213, 2.293, 2126.145, 7.182, 5.839, 44.457, 40.238, 11.123, 4.818, 25.126, 3.690, 227.825, 0.344, 2.059, 0.473, 2.236, 0.320,
import numpy as np
import matplotlib.pyplot as plt
import sys
import abel
transforms = {
"basex": abel.basex.basex_transform,
# "linbasex": abel.linbasex.linbasex_transform,
"direct": abel.direct.direct_transform,
"hansenlaw": abel.hansenlaw.hansenlaw_transform,
import numpy as np
import matplotlib.pyplot as plt
import sys
import abel
transforms = [
("BASEX" , abel.basex.basex_transform),
# ("linbasex" , abel.linbasex.linbasex_transform),
# must have higher symmetry for linbasex
("Direct" , abel.direct.direct_transform),