1
1
2
2
"""
3
- get_standard_pseudo_prior(h::Histogram, ps::NamedTuple{(:peak_pos, :peak_fwhm, :peak_sigma, :peak_counts, :mean_background, :mean_background_step, :mean_background_std), NTuple{7 , T}}, fit_func::Symbol; low_e_tail::Bool=true, fixed_position::Bool=false) where T<:Real
3
+ get_standard_pseudo_prior(h::Histogram, ps::NamedTuple{(:peak_pos, :peak_fwhm, :peak_sigma, :peak_counts, :bin_width, : mean_background, :mean_background_step, :mean_background_std), NTuple{8 , T}}, fit_func::Symbol; low_e_tail::Bool=true, fixed_position::Bool=false) where T<:Real
4
4
5
5
Gets standard pseudo prior of given histogram.
6
6
@@ -17,8 +17,11 @@ Gets standard pseudo prior of given histogram.
17
17
18
18
TO DO: function description and arguments.
19
19
"""
20
-
21
- function get_standard_pseudo_prior (h:: Histogram , ps:: NamedTuple{(:peak_pos, :peak_fwhm, :peak_sigma, :peak_counts, :mean_background, :mean_background_step, :mean_background_std), NTuple{7, T}} , fit_func:: Symbol ; low_e_tail:: Bool = true , fixed_position:: Bool = false ) where T<: Real
20
+ function get_standard_pseudo_prior (h:: Histogram , ps:: NamedTuple{(:peak_pos, :peak_fwhm, :peak_sigma, :peak_counts, :bin_width, :mean_background, :mean_background_step, :mean_background_std), NTuple{8, T}} , fit_func:: Symbol ; low_e_tail:: Bool = true , fixed_position:: Bool = false ) where T<: Real
21
+ # base priors common with all functions
22
+ window_left = ps. peak_pos - minimum (h. edges[1 ])
23
+ window_right = maximum (h. edges[1 ]) - ps. peak_pos
24
+ # base priors common with all functions
22
25
pprior_base = NamedTupleDist (
23
26
μ = ifelse (fixed_position, ConstValueDist (ps. peak_pos), Normal (ps. peak_pos, 0.2 * ps. peak_sigma)),
24
27
σ = weibull_from_mx (ps. peak_sigma, 1.5 * ps. peak_sigma),
@@ -55,7 +58,7 @@ function get_standard_pseudo_prior(h::Histogram, ps::NamedTuple{(:peak_pos, :pea
55
58
end
56
59
57
60
"""
58
- get_pseudo_prior(h::Histogram, ps::NamedTuple{(:peak_pos, :peak_fwhm, :peak_sigma, :peak_counts, :mean_background, :mean_background_step, :mean_background_std), NTuple{7 , T}}, fit_func::Symbol; pseudo_prior::NamedTupleDist=NamedTupleDist(empty = true), kwargs...) where T<:Real
61
+ get_pseudo_prior(h::Histogram, ps::NamedTuple{(:peak_pos, :peak_fwhm, :peak_sigma, :peak_counts, :bin_width, : mean_background, :mean_background_step, :mean_background_std), NTuple{8 , T}}, fit_func::Symbol; pseudo_prior::NamedTupleDist=NamedTupleDist(empty = true), kwargs...) where T<:Real
59
62
60
63
Gets the pseudo prior of the histogram, which is
61
64
@@ -73,7 +76,7 @@ Gets the pseudo prior of the histogram, which is
73
76
TO DO: check argument descriptions and returns.
74
77
"""
75
78
76
- function get_pseudo_prior (h:: Histogram , ps:: NamedTuple{(:peak_pos, :peak_fwhm, :peak_sigma, :peak_counts, :mean_background, :mean_background_step, :mean_background_std), NTuple{7 , T}} , fit_func:: Symbol ; pseudo_prior:: NamedTupleDist = NamedTupleDist (empty = true ), kwargs... ) where T<: Real
79
+ function get_pseudo_prior (h:: Histogram , ps:: NamedTuple{(:peak_pos, :peak_fwhm, :peak_sigma, :peak_counts, :bin_width, : mean_background, :mean_background_step, :mean_background_std), NTuple{8 , T}} , fit_func:: Symbol ; pseudo_prior:: NamedTupleDist = NamedTupleDist (empty = true ), kwargs... ) where T<: Real
77
80
standard_pseudo_prior = get_standard_pseudo_prior (h, ps, fit_func; kwargs... )
78
81
# use standard priors in case of no overwrites given
79
82
if ! (:empty in keys (pseudo_prior))
0 commit comments