Skip to content

Commit

Permalink
Bug fix units of additonal points
Browse files Browse the repository at this point in the history
  • Loading branch information
theHenks committed Nov 19, 2024
1 parent 9dc6073 commit 0d4c7c7
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions ext/LegendSpecFitsRecipesBaseExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -962,18 +962,19 @@ end
bottom_margin --> (0, :mm)
if report.type == :cal
additional_pts = if !isempty(additional_pts)
μ_cal = if unit(first(additional_pts.μ)) != NoUnits
report.f_fit.(ustrip.(report.e_unit, additional_pts.μ))
μ_strip = if unit(first(additional_pts.μ)) != NoUnits
ustrip.(report.e_unit, additional_pts.μ)
else
report.f_fit.(additional_pts.μ)
additional_pts.μ
end
p_cal = if unit(first(additional_pts.μ)) != NoUnits
p_strip = if unit(first(additional_pts.peaks)) != NoUnits
ustrip.(report.e_unit, additional_pts.peaks)
else
additional_pts.peaks
end
(x = μ_cal, y = p_cal,
residuals_norm = (value.(μ_cal) .- p_cal)./ uncertainty.(μ_cal))
μ_cal = report.f_fit.(μ_strip)
(x = μ_strip, y = p_strip,
residuals_norm = (value.(μ_cal) .- p_strip)./ uncertainty.(μ_cal))
else
NamedTuple()
end
Expand Down

0 comments on commit 0d4c7c7

Please sign in to comment.