- Take raw data records of fixed length and noise. Return basis for analyzing that data, and future data.
- Requires cuts to select down to clean pulses from which to make the basis. This suggests a sort of self consistent cut procedure. Luckily Alpert et all describe such a procedure https://link.springer.com/article/10.1007/s10909-015-1402-y
- Take raw data records. Return subspace representation + residual std deviation.
- Take subspace representation and spectral information. Return rough calibration. J?
- Take J and ??. Return various corrected Js.
- Baseline-J Correlation Correction
- Subsample arrival time Correction
- Time Drift Correction
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
### A Pluto.jl notebook ### | |
# v0.19.32 | |
using Markdown | |
using InteractiveUtils | |
# ╔═╡ a353c1f3-0921-4c9b-ab1d-a34cb262b3d9 | |
# following docs at https://docs.julialang.org/en/v1/manual/methods/#Function-like-objects-1 | |
# lets make a functor |
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
# written in Julia just because its easier and more compact to annotate the code with types (mainly vector vs scalar) | |
# and group the data into structs.... we will write everything in python | |
# the goal is just to get a sense of what functions we need from the abaco hardware side (abaco_*) | |
# and what functions we want to expose from some analysis package, and what data all of those will want | |
const Vec = Vector{Float64} | |
struct S21 | |
frequency::Vec | |
transmission::Vec | |
phase::Vec # future |
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
using HDF5 | |
"HDF5 appears to be inefficent for small writes, so this a simple buffer that | |
allows me to write to HDF5 only once per unit time (typically one second) to | |
limit the number of small writes." | |
mutable struct BufferedHDF5Dataset{T} | |
ds::HDF5Dataset | |
v::Vector{T} | |
lasti::Int64 # last index in hdf5 dataset | |
timeout_s::Float64 # interval in seconds at which to transfer data from v to ds |
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
const NEIG_py = [[1, 4, 5], [0, 2, 4, 5, 6], [1, 3, 5, 6, 7], [2, 6, 7], [0, 1, 5, 8, 9], [0, 1, 2, 4, 6, 8, 9, 10], [1, 2, 3, 5, 7, 9, 10, 11], [2, 3, 6, 10, 11], [4, 5, 9, 12, 13], [4, 5, 6, 8, 10, 12, 13, 14], [5, 6, 7, 9, 11, 13, 14, 15], [6, 7, 10, 14, 15], [8, 9, 13], [8, 9, 10, 12, 14], [9, 10, 11, 13, 15], [10, 11, 14]]; | |
const NEIG = [n.+1 for n in NEIG_py] | |
function enlarge(path::Vector{Int}) | |
(push!(copy(path),loc) for loc in NEIG[path[end]] if !(loc in path)) | |
end | |
collect(enlarge([1])) | |
function enlargepaths(paths) | |
Iterators.Flatten(enlarge(path) for path in paths) | |
end | |
collect(enlargepaths([[1],[2]])) |
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
using BenchmarkTools | |
dirname = "anotherdir" | |
isdir(dirname) || mkdir(dirname) | |
fname = joinpath(dirname,"stackexchange46809845_f.jl") | |
funname = "myfun" | |
funstr = """$funname() = rand(100)""" | |
open(fname,"w") do f | |
write(f,funstr) | |
end |
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
using MacroTools, Base.Test | |
"@parsetype T ex | |
replace all numeric literals that are supertypes of `T` with type `T`" | |
macro parsetype(Tsym, ex) | |
T=getfield(Main, Tsym) | |
ST=parsesuper(T) | |
parsetype(T, ST, ex) | |
end |
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 archive paper provides 10 example hard complex divions with answers. It also provides an algorith for measuring the accuracy of the result in "bits", which I have implemented. The robust cdiv algorithm is said to get 53 bits for all but #8 on the hard problems, where it gets 52 bits. I reproduce all of the results (also the default julia / reproduces results for smith's algorithm), except I get 0 bits on #5. I've tracked this down to the division of b/c returning zero inside robust_cdiv2, after r is also zero. But it's not clear how to fix it. | |
cdiv #1 ,53 bits accurate, 1.1125369292536007e-308 - 1.1125369292536007e-308im | |
cdiv #2 ,53 bits accurate, 8.98846567431158e307 + 0.0im | |
cdiv #3 ,53 bits accurate, 1.4334366349937947e104 - 3.645561009778199e-304im | |
cdiv #4 ,53 bits accurate, 8.98846567431158e307 + 0.0im | |
cdiv #5 ,0 bits accurate, 3.757668132438133e109 - 2.0e-323im | |
cdiv #6 ,53 bits accurate, 2.0e-323 + 1.048576e6im | |
cdiv #7 ,53 bits accurate, 3.8981256045591133e289 + 8.174961907852354e295im |
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
package main | |
import "time" | |
import "fmt" | |
func counter(c chan int, N int) { | |
for j := 1; j <= N; j++ { | |
c <- j | |
} | |
} |
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
# implement WirelessKeyboard as K | |
immutable K | |
f::Int | |
s::Int | |
end | |
# implement InterferesWith as < | |
>(k::K,K::K)=k.f==K.f | |
#prepare randomized array | |
k = [K(f,(j-1)*3+f) for j=1:12,f=1:3] | |
k9 = [K(f,(j-1)*3+f) for j=1:3,f=1:3] # smaller testing array |
NewerOlder