Skip to content
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 energycalibrationplot and lplot! for energy calibration plots #10

Merged
merged 6 commits into from
Feb 27, 2025

Conversation

fhagemann
Copy link
Contributor

@fhagemann fhagemann commented Feb 26, 2025

These functions can plot the report returned by LegendSpecFits.fit_calibration:

result_calib, report_calib = fit_calibration(energy_config_ch.cal_pol_order, μ_fit, pp_fit; e_expression=e_uncal_func)

LegendMakie.lplot(report_calib, xerrscaling=100, additional_pts== μ_notfit, peaks = pp_notfit), 
    title = get_plottitle(filekey, det, "Calibration Curve"; additiional_type=string(e_type)))

image

I tried to allow for the same keywords (plot_ribbon, xerrscaling, yerrscaling) as before

Copy link

codecov bot commented Feb 26, 2025

Codecov Report

Attention: Patch coverage is 95.12195% with 4 lines in your changes missing coverage. Please review.

Project coverage is 92.23%. Comparing base (fea5c06) to head (0119618).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
ext/LegendMakieMeasurementsExt.jl 95.06% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #10      +/-   ##
==========================================
+ Coverage   91.79%   92.23%   +0.43%     
==========================================
  Files           9        9              
  Lines         317      399      +82     
==========================================
+ Hits          291      368      +77     
- Misses         26       31       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fhagemann fhagemann force-pushed the ecal branch 2 times, most recently from 3d26d35 to 20f8208 Compare February 26, 2025 19:23
@fhagemann
Copy link
Contributor Author

I also added the FWHM plot into this PR, that is returned by LegendSpecFits.fit_fwhm.

result_fwhm, report_fwhm = fit_fwhm(energy_config_ch.fwhm_pol_order, pp_fit, fwhm_fit)

LegendMakie.lplot(report_fwhm, additional_pts=(peaks = pp_notfit, fwhm = fwhm_notfit), 
    title = get_plottitle(filekey, det, "FWHM"; additiional_type=string(e_type)))

image

@fhagemann fhagemann merged commit 7f8224b into main Feb 27, 2025
9 checks passed
@fhagemann fhagemann deleted the ecal branch February 27, 2025 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant