Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimerzp committed Jul 19, 2024
1 parent 0ddecc7 commit 5e3d174
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions firecrown/likelihood/number_counts.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ def get_scale(self):
assert self.current_tracer_args
return self.current_tracer_args.scale


class LinearBiasSystematicFactory(BaseModel):
"""Factory class for LinearBiasSystematic objects."""

Expand Down
8 changes: 5 additions & 3 deletions firecrown/likelihood/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class SourceSystematic(Updatable):
def read(self, sacc_data: sacc.Sacc):
"""Call to allow this object to read from the appropriate sacc data."""


class Source(Updatable):
"""An abstract source class (e.g., a sample of lenses).
Expand Down Expand Up @@ -248,6 +249,7 @@ def apply(self, tools: ModelingTools, tracer_arg: _SourceGalaxyArgsT):
dndz=dndz,
)


class PhotoZShiftFactory(BaseModel):
"""Factory class for PhotoZShift objects."""

Expand Down Expand Up @@ -312,9 +314,9 @@ def __init__(

self.sacc_tracer = sacc_tracer
self.current_tracer_args: None | _SourceGalaxyArgsT = None
self.systematics: UpdatableCollection[SourceGalaxySystematic] = (
UpdatableCollection(systematics)
)
self.systematics: UpdatableCollection[
SourceGalaxySystematic
] = UpdatableCollection(systematics)
self.tracer_args: _SourceGalaxyArgsT

def _read(self, sacc_data: sacc.Sacc):
Expand Down
7 changes: 4 additions & 3 deletions firecrown/likelihood/weak_lensing.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ def create_global(self) -> TattAlignmentSystematic:
"""
return TattAlignmentSystematic(None)


WeakLensingSystematicFactory = Annotated[
MultiplicativeShearBiasFactory
| LinearAlignmentSystematicFactory
Expand All @@ -446,9 +447,9 @@ class WeakLensingFactory(BaseModel):
model_config = ConfigDict(extra="forbid", frozen=True)

_cache: dict[int, WeakLensing] = PrivateAttr()
_global_systematics_instances: Sequence[SourceGalaxySystematic[WeakLensingArgs]] = (
PrivateAttr()
)
_global_systematics_instances: Sequence[
SourceGalaxySystematic[WeakLensingArgs]
] = PrivateAttr()

per_bin_systematics: Sequence[WeakLensingSystematicFactory]
global_systematics: Sequence[WeakLensingSystematicFactory]
Expand Down

0 comments on commit 5e3d174

Please sign in to comment.