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

Remove registration of standard_llh #375

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions flarestack/core/llh.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,6 @@ def calculate_test_statistic(self, params, weights, **kwargs):
return 2.0 * np.sum(llh_value)


@LLH.register_subclass("standard")
class StandardLLH(FixedEnergyLLH):
fit_energy = True

Expand Down Expand Up @@ -1063,7 +1062,6 @@ def return_injected_parameters(mh_dict):
return res_dict


@LLH.register_subclass("standard_kde_enabled")
class StandardKDEEnabledLLH(StandardLLH):
def create_kwargs(self, data, pull_corrector, weight_f=None):
kwargs = dict()
Expand Down
6 changes: 2 additions & 4 deletions flarestack/core/minimisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,6 @@ class FixedWeightMinimisationHandler(MinimisationHandler):
compatible_llh = [
"spatial",
"fixed_energy",
"standard",
"standard_kde_enabled",
"standard_overlapping",
"standard_matrix",
"std_matrix_kde_enabled",
Expand Down Expand Up @@ -1271,7 +1269,7 @@ def add_injector(self, season, sources):

@MinimisationHandler.register_subclass("fit_weights")
class FitWeightMinimisationHandler(FixedWeightMinimisationHandler):
compatible_llh = ["spatial", "fixed_energy", "standard", "standard_kde_enabled"]
compatible_llh = ["spatial", "fixed_energy", "standard_matrix", "std_matrix_kde_enabled"]
compatible_negative_n_s = False

def __init__(self, mh_dict):
Expand Down Expand Up @@ -1487,7 +1485,7 @@ def corner_likelihood_scan(

@MinimisationHandler.register_subclass("flare")
class FlareMinimisationHandler(FixedWeightMinimisationHandler):
compatible_llh = ["spatial", "fixed_energy", "standard"]
compatible_llh = ["spatial", "fixed_energy", "standard_matrix"]
compatible_negative_n_s = False

def __init__(self, mh_dict):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_full_analysis_chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def test_full_chain(self):
}

llh_dict = {
"llh_name": "standard",
"llh_name": "standard_matrix",
"llh_sig_time_pdf": {"time_pdf_name": "steady"},
"llh_bkg_time_pdf": {
"time_pdf_name": "steady",
Expand Down
68 changes: 0 additions & 68 deletions tests/test_likelihood_standard.py

This file was deleted.

2 changes: 1 addition & 1 deletion tests/test_mh_fit_weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Initialise Injectors/LLHs

llh_dict = {
"llh_name": "standard",
"llh_name": "standard_matrix",
"llh_sig_time_pdf": {"time_pdf_name": "steady"},
"llh_bkg_time_pdf": {
"time_pdf_name": "steady",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_mh_fixed_weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Initialise Injectors/LLHs

llh_dict = {
"llh_name": "standard",
"llh_name": "standard_matrix",
"llh_sig_time_pdf": {"time_pdf_name": "steady"},
"llh_bkg_time_pdf": {
"time_pdf_name": "steady",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_mh_flare.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
llh_time = {"time_pdf_name": "custom_source_box"}

unblind_llh = {
"llh_name": "standard",
"llh_name": "standard_matrix",
"llh_sig_time_pdf": llh_time,
"llh_bkg_time_pdf": {"time_pdf_name": "steady"},
"llh_energy_pdf": llh_energy,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_negative_ns.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Initialise Injectors/LLHs

llh_dict = {
"llh_name": "standard",
"llh_name": "standard_matrix",
"llh_sig_time_pdf": {"time_pdf_name": "steady"},
"llh_bkg_time_pdf": {
"time_pdf_name": "steady",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_submitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
llh_energy = injection_energy

llh_kwargs = {
"llh_name": "standard",
"llh_name": "standard_matrix",
"llh_energy_pdf": llh_energy,
"llh_sig_time_pdf": llh_time,
"llh_bkg_time_pdf": {"time_pdf_name": "steady"},
Expand Down
2 changes: 1 addition & 1 deletion tests/test_time_pdfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_declination_sensitivity(self):

for i, t_pdf_dict in enumerate(time_pdfs):
llh_dict = {
"llh_name": "standard",
"llh_name": "standard_matrix",
"llh_sig_time_pdf": t_pdf_dict,
"llh_bkg_time_pdf": {
"time_pdf_name": "steady",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_util_custom_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_custom_dataset(self):
logging.info("Testing custom_dataset util function.")

llh_dict = {
"llh_name": "standard",
"llh_name": "standard_matrix",
"llh_sig_time_pdf": {
"time_pdf_name": "box",
"pre_window": 0.0,
Expand Down
Loading