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

Implementation of A/E fit background function with two EMGs #77

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

verenaaur
Copy link
Collaborator

@verenaaur verenaaur commented Oct 9, 2024

changed so far:

  • changed markersize in plot recipe
  • implemented option to choose between aoe fit background function with one EMG (default) or two EMGs (-> two fit_func 'aoe_one_bck' and 'aoe_two_bck')
  • updated plot recipe: additional keyword "x_label" which is set to "Energy (keV)" by default; show A/E labels by using "x_label = "A/E"" like this:
    p = plot(report, x_label="A/E")
  • updated A/E pseudo priors (still some LogUniform distributions, though)

current code to obtain Compton band histogram (when 'filtered_aoe' is the array with all the filtered aoe values of the CBs):

binsize = 0.05
h = fit(Histogram, filtered_aoe, -20:binsize:3)
ps = LegendSpecFits.estimate_single_peak_stats_psd(h)
result, report = LegendSpecFits.fit_single_aoe_compton(h, ps, fit_func=:aoe_two_bck, uncertainty=true) # use background function with two EMGs
p = plot(report, x_label="A/E") # use A/E labels instead of energy labels

(binsize 0.05 and interval [-20,3] is variable)

@verenaaur verenaaur marked this pull request as draft October 9, 2024 14:41
@verenaaur verenaaur self-assigned this Oct 9, 2024
@verenaaur verenaaur added bug Something isn't working enhancement New feature or request labels Oct 9, 2024
@theHenks theHenks linked an issue Oct 9, 2024 that may be closed by this pull request
Copy link

codecov bot commented Oct 9, 2024

Codecov Report

Attention: Patch coverage is 0% with 52 lines in your changes missing coverage. Please review.

Project coverage is 21.85%. Comparing base (02da7b0) to head (e408f8d).
Report is 27 commits behind head on dev.

Files with missing lines Patch % Lines
ext/LegendSpecFitsRecipesBaseExt.jl 0.00% 27 Missing ⚠️
src/aoefit_functions.jl 0.00% 13 Missing ⚠️
src/aoe_pseudo_prior.jl 0.00% 5 Missing ⚠️
src/peakshapes.jl 0.00% 4 Missing ⚠️
src/aoefit_combined.jl 0.00% 2 Missing ⚠️
src/aoefit.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev      #77      +/-   ##
==========================================
+ Coverage   15.11%   21.85%   +6.73%     
==========================================
  Files          32       33       +1     
  Lines        2680     2970     +290     
==========================================
+ Hits          405      649     +244     
- Misses       2275     2321      +46     

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

@theHenks theHenks marked this pull request as ready for review October 13, 2024 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Revise A/E routines
1 participant