File tree Expand file tree Collapse file tree 1 file changed +25
-8
lines changed
skyllh/analyses/i3/publicdata_ps Expand file tree Collapse file tree 1 file changed +25
-8
lines changed Original file line number Diff line number Diff line change 4242 SpatialBoxEventSelectionMethod ,
4343)
4444from skyllh .core .flux_model import (
45+ CutoffPowerLawEnergyFluxProfile ,
4546 PowerLawEnergyFluxProfile ,
4647 SteadyPointlikeFFM ,
4748)
@@ -134,6 +135,7 @@ def create_analysis(
134135 refplflux_Phi0 = 1 ,
135136 refplflux_E0 = 1e3 ,
136137 refplflux_gamma = 2.0 ,
138+ refplflux_Ec = np .inf ,
137139 ns_seed = 10.0 ,
138140 ns_min = 0. ,
139141 ns_max = 1e3 ,
@@ -171,6 +173,8 @@ def create_analysis(
171173 The reference energy to use for the reference power law flux model.
172174 refplflux_gamma : float
173175 The spectral index to use for the reference power law flux model.
176+ refplflux_Ec: float,
177+ The cutoff energy for the cutoff power law flux model.
174178 ns_seed : float
175179 Value to seed the minimizer with for the ns fit.
176180 ns_min : float
@@ -269,15 +273,28 @@ def create_analysis(
269273 dtc_except_fields = ['mcweight' , 'time' ]
270274
271275 # Define the flux model.
272- fluxmodel = SteadyPointlikeFFM (
273- Phi0 = refplflux_Phi0 ,
274- energy_profile = PowerLawEnergyFluxProfile (
275- E0 = refplflux_E0 ,
276- gamma = refplflux_gamma ,
276+ if refplflux_Ec == np .inf :
277+ fluxmodel = SteadyPointlikeFFM (
278+ Phi0 = refplflux_Phi0 ,
279+ energy_profile = PowerLawEnergyFluxProfile (
280+ E0 = refplflux_E0 ,
281+ gamma = refplflux_gamma ,
282+ cfg = cfg ,
283+ ),
277284 cfg = cfg ,
278- ),
279- cfg = cfg ,
280- )
285+ )
286+ else :
287+ fluxmodel = SteadyPointlikeFFM (
288+ Phi0 = refplflux_Phi0 ,
289+ energy_profile = CutoffPowerLawEnergyFluxProfile (
290+ E0 = refplflux_E0 ,
291+ gamma = refplflux_gamma ,
292+ Ecut = refplflux_Ec , #in GeV
293+ cfg = cfg ,
294+ ),
295+ cfg = cfg ,
296+ )
297+
281298
282299 # Define the fit parameter ns.
283300 param_ns = Parameter (
You can’t perform that action at this time.
0 commit comments