diff --git a/skyllh/analyses/i3/publicdata_ps/backgroundpdf.py b/skyllh/analyses/i3/publicdata_ps/backgroundpdf.py index b9fd17d65d..e02901076e 100644 --- a/skyllh/analyses/i3/publicdata_ps/backgroundpdf.py +++ b/skyllh/analyses/i3/publicdata_ps/backgroundpdf.py @@ -1,3 +1,5 @@ +import warnings + import numpy as np from scipy.stats import ( gaussian_kde, @@ -83,6 +85,8 @@ def __init__( The smoothing filter to use for smoothing the energy histogram. If None, no smoothing will be applied. kde_smoothing : bool + Deprecated: use of ``kde_smoothing=True`` is deprecated and will be + removed in a future version. Apply a kde smoothing to the energy pdf for each bin in sin(dec). This is useful for signal injections, because it ensures that the background is not zero when injecting high energy events. @@ -152,6 +156,11 @@ def __init__( self._hist_mask_mc_covered_zero_physics = h > 0 if kde_smoothing: + warnings.warn( + 'The kde_smoothing option is deprecated and will be removed in a future version', + FutureWarning, + stacklevel=2, + ) # If a bandwidth is passed, apply a KDE-based smoothing with the # given bandwidth parameter as bandwidth for the fit. kde_pdf_list = [] @@ -374,6 +383,8 @@ def __init__(self, data_exp, logE_binning, sinDec_binning, smoothing_filter=None The smoothing filter to use for smoothing the energy histogram. If None, no smoothing will be applied. kde_smoothing : bool + Deprecated: use of ``kde_smoothing=True`` is deprecated and will be + removed in a future version. Apply a kde smoothing to the energy pdf for each bin in sin(dec). This is useful for signal injections, because it ensures that the background is not zero when injecting high energy events. diff --git a/skyllh/analyses/i3/publicdata_ps/time_dependent_ps.py b/skyllh/analyses/i3/publicdata_ps/time_dependent_ps.py index 3f1af07e3f..73ca65e45f 100644 --- a/skyllh/analyses/i3/publicdata_ps/time_dependent_ps.py +++ b/skyllh/analyses/i3/publicdata_ps/time_dependent_ps.py @@ -761,6 +761,8 @@ def create_analysis( gamma_max : float Upper bound for gamma fit. kde_smoothing : bool + Deprecated: use of ``kde_smoothing=True`` is deprecated and will be + removed in a future version. Apply a KDE-based smoothing to the data-driven background pdf. Default: False. minimizer_impl : str | "LBFGS" diff --git a/skyllh/analyses/i3/publicdata_ps/time_integrated_ps.py b/skyllh/analyses/i3/publicdata_ps/time_integrated_ps.py index dd997cb771..27ed00baff 100644 --- a/skyllh/analyses/i3/publicdata_ps/time_integrated_ps.py +++ b/skyllh/analyses/i3/publicdata_ps/time_integrated_ps.py @@ -179,6 +179,8 @@ def create_analysis( gamma_max : float Upper bound for gamma fit. kde_smoothing : bool + Deprecated: use of ``kde_smoothing=True`` is deprecated and will be + removed in a future version. Apply a KDE-based smoothing to the data-driven background pdf. Default: False. minimizer_impl : str diff --git a/skyllh/analyses/i3/publicdata_ps/time_integrated_ps_function_energy_spectrum.py b/skyllh/analyses/i3/publicdata_ps/time_integrated_ps_function_energy_spectrum.py index cda8cc380d..1716951db9 100644 --- a/skyllh/analyses/i3/publicdata_ps/time_integrated_ps_function_energy_spectrum.py +++ b/skyllh/analyses/i3/publicdata_ps/time_integrated_ps_function_energy_spectrum.py @@ -233,6 +233,8 @@ def create_analysis( e_peak_max : float Upper bound for energy peak fit, kde_smoothing : bool + Deprecated: use of ``kde_smoothing=True`` is deprecated and will be + removed in a future version. Apply a KDE-based smoothing to the data-driven background pdf. Default: False. minimizer_impl : str