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

Source-wise interpolation #228

Merged
merged 5 commits into from
Nov 13, 2024
Merged
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
4 changes: 3 additions & 1 deletion alea/models/blueice_extended_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import itertools
from copy import deepcopy

from tqdm import tqdm
import numpy as np
import scipy.stats as stats
from blueice.likelihood import LogAncillaryLikelihood, LogLikelihoodSum
Expand Down Expand Up @@ -334,6 +335,7 @@ def _build_ll_from_config(
# Iterate through each likelihood term in the configuration
for config in likelihood_config["likelihood_terms"]:
blueice_config = self._process_blueice_config(config, template_folder_list)
blueice_config.setdefault("source_wise_interpolation", True)

likelihood_class = cast(Callable, locate(config["likelihood_type"]))
if likelihood_class is None:
Expand Down Expand Up @@ -399,7 +401,7 @@ def _build_data_generators(self) -> list:
"""
# last one is AncillaryLikelihood
data_generators = []
for ll_term in self.likelihood_list[:-1]:
for ll_term in tqdm(self.likelihood_list[:-1], desc="building data generators"):
methods = [s.config["pdf_interpolation_method"] for s in ll_term.base_model.sources]
# make sure that all sources have the same pdf_interpolation_method
if len(set(methods)) != 1:
Expand Down
Loading