The EasyPhys package is a small library written to simplify some of the tasks that are repeated frequently when doing physics stuff. So far, it's very minimal.
Functionality is largely build on top of LsqFit.jl and PyPlot.jl and has been inspired by the Spinmob analysis and plotting package.
EasyPhys is available through Julia's built-in package manager, and can be installed by running Pkg.add("EasyPhys.jl")
at the Julia prompt.
This will automatically install any necessary dependencies.
Fitting is provided by the Fitter
type and by the associated methods set_data!
and fit!
.
julia> using EasyPhys
julia> model(x, a, b) = a .* exp.(-b .* x);
julia> xdata = linspace(0,10,100); ydata = model(xdata, 1.0, 2.0) + 0.01*randn(length(xdata)); eydata = 0.01;
julia> fitter = Fitter(model) |> set_data!(xdata, ydata, eydata) |> fit!
A lot.