ggggggggg / modeltes.jl Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
Functions in TESNoise.jl re-implement various computations that are already in ARMA.jl package. They should be replaced so that this work can be tested tracked and implemented in only one place.
At some version in the past, one could use ModelTES to compute the temperature and current when there was more than one pulse, but either I am totally unable to find it, or the current API does not allow for multiple piled-up pulses. It needs to do so.
Galen, I just merged my fork with yours, and I still get an error when I try either of the 2nd or 3rd biasesTES in the following code:
using ModelTES, PyPlot
bt1 = ModelTES.pholmes(48e-9, 0.20)
bt2 = ModelTES.lowEpix()
bt3 = ModelTES.LCLSII(52e-9)
sampletime = 1e-7
pulsetimes = [1e-4, 2e-4]
clf()
for bt in (bt1, bt2, bt3)
outmany = ModelTES.pulses(6000, sampletime, bt, [1000,1000], pulsetimes);
plot(outmany.I[1]-outmany.I)
end
Specifically, a NaN-based error:
ERROR: LoadError: DomainError:
in nan_dom_err at ./math.jl:196 [inlined]
in ^(::Float64, ::Float64) at ./math.jl:355
in dT at /Users/fowlerj/.julia/v0.5/ModelTES/src/stochastic_integration.jl:7 [inlined]
in (::ModelTES.BiasedTES{ModelTES.ShankRIT})(::Float64, ::Array{Float64,1}, ::Array{Float64,1}) at /Users/fowlerj/.julia/v0.5/ModelTES/src/stochastic_integration.jl:88
in perform_step! at /Users/fowlerj/.julia/v0.5/OrdinaryDiffEq/src/integrators/low_order_rk_integrators.jl:224 [inlined]
in perform_step! at /Users/fowlerj/.julia/v0.5/OrdinaryDiffEq/src/integrators/low_order_rk_integrators.jl:204 [inlined]
in solve!(::OrdinaryDiffEq.ODEIntegrator{OrdinaryDiffEq.Tsit5,Array{Float64,1},Float64,Float64,Float64,Array{Array{Float64,1},1},DiffEqBase.ODESolution{Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},DiffEqBase.ODEProblem{Array{Float64,1},Float64,true,ModelTES.BiasedTES{ModelTES.ShankRIT}},OrdinaryDiffEq.Tsit5,OrdinaryDiffEq.InterpolationData{ModelTES.BiasedTES{ModelTES.ShankRIT},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}}},Array{Float64,1},ModelTES.BiasedTES{ModelTES.ShankRIT},Void,OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,OrdinaryDiffEq.#ODE_DEFAULT_NORM,DiffEqBase.CallbackSet{Tuple{},Tuple{DiffEqBase.DiscreteCallback{ModelTES.##11#15{Array{Float64,1}},ModelTES.##12#16{ModelTES.BiasedTES{ModelTES.ShankRIT},Dict{Float64,Int64}}}}},OrdinaryDiffEq.#ODE_DEFAULT_ISOUTOFDOMAIN,OrdinaryDiffEq.#ODE_DEFAULT_PROG_MESSAGE,OrdinaryDiffEq.#ODE_DEFAULT_UNSTABLE_CHECK,DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Void}}) at /Users/fowlerj/.julia/v0.5/OrdinaryDiffEq/src/solve.jl:250
in #solve#45(::Array{Any,1}, ::Function, ::DiffEqBase.ODEProblem{Array{Float64,1},Float64,true,ModelTES.BiasedTES{ModelTES.ShankRIT}}, ::OrdinaryDiffEq.Tsit5, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Type{Val{true}}) at /Users/fowlerj/.julia/v0.5/OrdinaryDiffEq/src/solve.jl:7
in (::DiffEqBase.#kw##solve)(::Array{Any,1}, ::DiffEqBase.#solve, ::DiffEqBase.ODEProblem{Array{Float64,1},Float64,true,ModelTES.BiasedTES{ModelTES.ShankRIT}}, ::OrdinaryDiffEq.Tsit5, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Type{Val{true}}) at ./<missing>:0 (repeats 2 times)
in #pulses#9(::Float64, ::OrdinaryDiffEq.Tsit5, ::Float64, ::Float64, ::Function, ::Int64, ::Float64, ::ModelTES.BiasedTES{ModelTES.ShankRIT}, ::Array{Int64,1}, ::Array{Float64,1}) at /Users/fowlerj/.julia/v0.5/ModelTES/src/ModelTES.jl:352
in pulses(::Int64, ::Float64, ::ModelTES.BiasedTES{ModelTES.ShankRIT}, ::Array{Int64,1}, ::Array{Float64,1}) at /Users/fowlerj/.julia/v0.5/ModelTES/src/ModelTES.jl:342
in macro expansion; at /Users/fowlerj/Microcal/Nonlinearity/Demos/swetz_bes_demo.jl:12 [inlined]
in anonymous at ./<missing>:?
in include_from_node1(::String) at ./loading.jl:488
in include_from_node1(::String) at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
while loading /Users/fowlerj/Microcal/Nonlinearity/Demos/swetz_bes_demo.jl, in expression starting on line 11
Unfortunately, now that you installed a package with a totally inscrutable interface, I'm helpless here. And I promised Dan some kind of demo plot quickly. Ideas??
In some tests, I'm finding that the following
using ModelTES, ARMA
t = ModelTES.LCLSII()
ΔT = 1e-6
ntotal = 2000 # How many lags to compute
nm = NoiseModel(t, ΔT, 5e-23)
wrong_covar = ARMA.model_covariance(nm, ntotal)
nm2 = ARMA.ARMAModel(nm.thetacoef * sqrt(0.5/ΔT), nm.phicoef)
correct_covar = ARMA.model_covariance(nm2, ntotal)
The noise model underestimates the covariance by a factor of 2ΔT. Bad!
I'm planning to tag a release, which can be the last one compatible with Julia 0.6, and then start a branch to remove the new deprecations in julia 0.7.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.