Closed fhagemann closed 2 weeks ago
Attention: Patch coverage is 0.89286%
with 222 lines
in your changes missing coverage. Please review.
Project coverage is 15.46%. Comparing base (
392f2cc
) to head (79f52b7
). Report is 74 commits behind head on dev.
Files with missing lines | Patch % | Lines |
---|---|---|
src/aoefit_combined.jl | 0.00% | 150 Missing :warning: |
ext/LegendSpecFitsRecipesBaseExt.jl | 0.00% | 70 Missing :warning: |
src/aoefit.jl | 0.00% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I was assigned to this PR? Does that mean I should merge it?
Check binning in generate_aoe_compton_bands
and adapt if necessary
fit_aoe_compton_combined
now returns a report
(format/naming can still be discussed/changed), which includes the fits and fit parameters to the individual Compton bands.
CC @theHenks @verenaaur
So, to incorporate this code into the legend-julia-dataflow, one would need to insert
result_fit_combined, report_fit_combined = nothing, nothing
try
result_fit_combined, report_fit_combined = fit_aoe_compton_combined(compton_band_peakhists.peakhists, compton_band_peakhists.peakstats, compton_bands, result_correction; e_expression = e_type_aoe_cal, uncertainty = true);
catch e
@error "AoE compton bands cannot be fitted using a combined fit: $e"
throw(ErrorException("AoE compton bands cannot be fitted using a combined fit"))
end
after the block where fit_aoe_corrections
is called.
The plots afterwards can be adjusted to also include the combined fit result by adding an extra argument:
# instead of: p = plot(report_correction.report_µ)
p = plot(report_correction.report_μ, report_fit_combined.report_μ)
One thing to note: The combined fits took way longer yesterday than they used to do before (which is surprising to me because I didn't touch any of the maximum likelihood fit code in the last commits I added (?) --> https://github.com/fhagemann/LegendSpecFits.jl/compare/e728750..7707a3e). Not sure why this is and I hope this does not affect data production..
Never mind, false alarm: I reused a variable name and caused some type instabilities. This should be fixed with the latest force push.
There might still be changes on some internal functions (but just code style, no change of functionality),
so @theHenks you can safely merge this PR and use fit_aoe_compton_combined
and the new plot recipe taking two arguments to start data production ;)
(Maybe check for a small run that I didn't mess up the func
strings returned in result
.. )
My last commit is just a clean-up, it does not change any functionality. It just increases type stability.
Right now, this routine still uses the result of the old routine as starting parameters for the combined fit.
How to use it: