Commit 68e25eac authored by Antonino D'Anna's avatar Antonino D'Anna

Added TIC and AIC function. TIC takes a FitRes, while AIC needs also the...

Added TIC and AIC function. TIC takes a FitRes, while AIC needs also the number of data point used in the fit
parent db78e2d5
...@@ -7,7 +7,7 @@ include("types.jl") ...@@ -7,7 +7,7 @@ include("types.jl")
include("pvalue.jl") include("pvalue.jl")
include("fit_functions.jl") include("fit_functions.jl")
include("fit_scan.jl") include("fit_scan.jl")
include("utils.jl")
export pvalue, fit_routine, FitRes, fit_scan export pvalue, fit_routine, FitRes, fit_scan
end # module FitRoutines end # module FitRoutines
function TIC(f::FitRes{NT}) where NT <:Union{NamedTuple,Nothing}
return f.chi2 - 2f.chiexp
end
function AIC(f::FitRes{NT},ndata::Int64) where NT<:Union{NamedTuple,Nothing}
return f.chi2 + 2length(f.par) - 2ndata
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment