Skip to content

Commit

Permalink
widths in shidts in WL and NC
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimerzp committed Jul 19, 2024
1 parent 13aabac commit d7363cc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
7 changes: 7 additions & 0 deletions firecrown/likelihood/number_counts.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
SourceGalaxy,
SourceGalaxyArgs,
SourceGalaxyPhotoZShift,
SourceGalaxyPhotoZShiftandWidth,
SourceGalaxySelectField,
SourceGalaxySystematic,
PhotoZShiftFactory,
PhotoZShiftandWidthFactory,
Tracer,
)
from firecrown.metadata.two_point import InferredGalaxyZDist
Expand Down Expand Up @@ -60,6 +62,10 @@ class PhotoZShift(SourceGalaxyPhotoZShift[NumberCountsArgs]):
"""Photo-z shift systematic."""


class PhotoZShiftandWidth(SourceGalaxyPhotoZShiftandWidth[NumberCountsArgs]):
"""Photo-z shift systematic."""


class SelectField(SourceGalaxySelectField[NumberCountsArgs]):
"""Systematic to select 3D field."""

Expand Down Expand Up @@ -562,6 +568,7 @@ def create_global(self) -> ConstantMagnificationBiasSystematic:

NumberCountsSystematicFactory = Annotated[
PhotoZShiftFactory
| PhotoZShiftandWidthFactory
| LinearBiasSystematicFactory
| PTNonLinearBiasSystematicFactory
| MagnificationBiasSystematicFactory
Expand Down
13 changes: 10 additions & 3 deletions firecrown/likelihood/weak_lensing.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
SourceGalaxy,
SourceGalaxyArgs,
SourceGalaxyPhotoZShift,
SourceGalaxyPhotoZShiftandWidth,
SourceGalaxySelectField,
SourceGalaxySystematic,
PhotoZShiftFactory,
PhotoZShiftandWidthFactory,
Tracer,
)
from firecrown.metadata.two_point import InferredGalaxyZDist
Expand Down Expand Up @@ -55,6 +57,10 @@ def apply(
"""Apply method to include systematics in the tracer_arg."""


class PhotoZShiftandWidth(SourceGalaxyPhotoZShiftandWidth[WeakLensingArgs]):
"""Photo-z shift systematic."""


class PhotoZShift(SourceGalaxyPhotoZShift[WeakLensingArgs]):
"""Photo-z shift systematic."""

Expand Down Expand Up @@ -433,10 +439,11 @@ def create_global(self) -> TattAlignmentSystematic:


WeakLensingSystematicFactory = Annotated[
MultiplicativeShearBiasFactory
PhotoZShiftFactory
| PhotoZShiftandWidthFactory
| MultiplicativeShearBiasFactory
| LinearAlignmentSystematicFactory
| TattAlignmentSystematicFactory
| PhotoZShiftFactory,
| TattAlignmentSystematicFactory,
Field(discriminator="type", union_mode="left_to_right"),
]

Expand Down

0 comments on commit d7363cc

Please sign in to comment.