Skip to content

Commit

Permalink
Merge pull request #125 from legend-exp/patch_sipm-calibration-func
Browse files Browse the repository at this point in the history
Bug Fix `fit_calibration`
  • Loading branch information
theHenks authored Feb 28, 2025
2 parents 2ba3dd2 + 0e24bb5 commit 7abb834
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fit_calibration.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ function fit_calibration(pol_order::Int, µ::AbstractVector{<:Union{Unitful.Real
result_fit = merge(result_fit, (par = par_unit,))

# built function in string
func = join(["$(mvalue(par[i]))$e_unit * ($(e_expression))^$(i-1)" for i in eachindex(par)], " + ")
func_err = join(["($(par[i]))$e_unit * ($(e_expression))^$(i-1)" for i in eachindex(par)], " + ")
func = join(["$(mvalue(par[i]))$e_unit .* ($(e_expression)).^$(i-1)" for i in eachindex(par)], " .+ ")
func_err = join(["($(par[i]))$e_unit .* ($(e_expression)).^$(i-1)" for i in eachindex(par)], " .+ ")

result = merge(result_fit, (func = func, func_err = func_err, µ = μ, peaks = peaks))
report = merge(report_fit, (e_unit = e_unit, par = result.par, type = :cal))
Expand Down

0 comments on commit 7abb834

Please sign in to comment.