-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add combined A/E fit routine #65
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #65 +/- ##
==========================================
+ Coverage 15.38% 15.46% +0.08%
==========================================
Files 24 32 +8
Lines 2035 2489 +454
==========================================
+ Hits 313 385 +72
- Misses 1722 2104 +382 ☔ View full report in Codecov by Sentry. |
I was assigned to this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CC @fhagemann
Check binning in |
|
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 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), (Maybe check for a small run that I didn't mess up the |
My last commit is just a clean-up, it does not change any functionality. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! :)
Right now, this routine still uses the result of the old routine as starting parameters for the combined fit.
How to use it: