Skip to content

Commit

Permalink
Merge branch 'two_point_likelihood_factory' of github.com:LSSTDESC/fi…
Browse files Browse the repository at this point in the history
…recrown into two_point_likelihood_factory
  • Loading branch information
vitenti committed Sep 13, 2024
2 parents 210d403 + 6273d2d commit 55402ef
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 71 deletions.
9 changes: 7 additions & 2 deletions firecrown/likelihood/number_counts.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,7 @@ class NumberCountsFactory(BaseModel):

per_bin_systematics: Sequence[NumberCountsSystematicFactory]
global_systematics: Sequence[NumberCountsSystematicFactory]
include_rsd: bool = False

def model_post_init(self, _) -> None:
"""Initialize the NumberCountsFactory.
Expand Down Expand Up @@ -674,7 +675,9 @@ def create(self, inferred_zdist: InferredGalaxyZDist) -> NumberCounts:
]
systematics.extend(self._global_systematics_instances)

nc = NumberCounts.create_ready(inferred_zdist, systematics=systematics)
nc = NumberCounts.create_ready(
inferred_zdist, systematics=systematics, has_rsd=self.include_rsd
)
self._cache[inferred_zdist_id] = nc

return nc
Expand All @@ -697,7 +700,9 @@ def create_from_metadata_only(
]
systematics.extend(self._global_systematics_instances)

nc = NumberCounts(sacc_tracer=sacc_tracer, systematics=systematics)
nc = NumberCounts(
sacc_tracer=sacc_tracer, systematics=systematics, has_rsd=self.include_rsd
)
self._cache[sacc_tracer_id] = nc

return nc
Loading

0 comments on commit 55402ef

Please sign in to comment.