firecrown.likelihood.weak_lensing
Weak lensing source and systematics.
Attributes
Classes
Class for weak lensing tracer builder argument. |
|
Abstract base class for all weak lensing systematics. |
|
Photo-z shift systematic. |
|
Photo-z shift systematic. |
|
Systematic to select 3D field. |
|
Multiplicative shear bias systematic. |
|
Linear alignment systematic. |
|
TATT alignment systematic. |
|
Halo model intrinsic alignment systematic. |
|
Source class for weak lensing. |
|
Factory class for MultiplicativeShearBias objects. |
|
Factory class for LinearAlignmentSystematic objects. |
|
Factory class for TattAlignmentSystematic objects. |
|
Factory class for WeakLensing objects. |
Module Contents
- class firecrown.likelihood.weak_lensing.WeakLensingArgs[source]
Bases:
firecrown.likelihood.source.SourceGalaxyArgs
Class for weak lensing tracer builder argument.
- ia_bias: None | tuple[numpy.typing.NDArray[numpy.float64], numpy.typing.NDArray[numpy.float64]] = None
- has_pt: bool = False
- has_hm: bool = False
- ia_pt_c_1: None | tuple[numpy.typing.NDArray[numpy.float64], numpy.typing.NDArray[numpy.float64]] = None
- ia_pt_c_d: None | tuple[numpy.typing.NDArray[numpy.float64], numpy.typing.NDArray[numpy.float64]] = None
- ia_pt_c_2: None | tuple[numpy.typing.NDArray[numpy.float64], numpy.typing.NDArray[numpy.float64]] = None
- ia_a_1h: None | numpy.typing.NDArray[numpy.float64] = None
- ia_a_2h: None | numpy.typing.NDArray[numpy.float64] = None
- class firecrown.likelihood.weak_lensing.WeakLensingSystematic(parameter_prefix=None)[source]
Bases:
firecrown.likelihood.source.SourceGalaxySystematic[WeakLensingArgs]
Abstract base class for all weak lensing systematics.
- Parameters:
parameter_prefix (None | str)
- abstractmethod apply(tools, tracer_arg)[source]
Apply method to include systematics in the tracer_arg.
- Parameters:
tracer_arg (WeakLensingArgs)
- Return type:
- class firecrown.likelihood.weak_lensing.PhotoZShiftandStretch(sacc_tracer, active=True)[source]
Bases:
firecrown.likelihood.source.SourceGalaxyPhotoZShiftandStretch[WeakLensingArgs]
Photo-z shift systematic.
- Parameters:
sacc_tracer (str)
active (bool)
- class firecrown.likelihood.weak_lensing.PhotoZShift(sacc_tracer, active=True)[source]
Bases:
firecrown.likelihood.source.SourceGalaxyPhotoZShift[WeakLensingArgs]
Photo-z shift systematic.
- Parameters:
sacc_tracer (str)
active (bool)
- class firecrown.likelihood.weak_lensing.SelectField(field='delta_matter')[source]
Bases:
firecrown.likelihood.source.SourceGalaxySelectField[WeakLensingArgs]
Systematic to select 3D field.
- Parameters:
field (str)
- firecrown.likelihood.weak_lensing.MULTIPLICATIVE_SHEAR_BIAS_DEFAULT_BIAS = 1.0
- class firecrown.likelihood.weak_lensing.MultiplicativeShearBias(sacc_tracer)[source]
Bases:
WeakLensingSystematic
Multiplicative shear bias systematic.
This systematic adjusts the scale_ of a source by (1 + m).
The following parameters are special Updatable parameters, which means that they can be updated by the sampler, sacc_tracer is going to be used as a prefix for the parameters:
- Variables:
mult_bias – the multiplicative shear bias parameter.
- Parameters:
sacc_tracer (str)
- mult_bias
- apply(tools, tracer_arg)[source]
Apply multiplicative shear bias to a source.
The scale_ of the source is multiplied by (1 + m).
- Parameters:
tools (firecrown.modeling_tools.ModelingTools) – A ModelingTools object.
tracer_arg (WeakLensingArgs) – The WeakLensingArgs to which apply the shear bias.
- Returns:
A new WeakLensingArgs object with the shear bias applied.
- Return type:
- firecrown.likelihood.weak_lensing.LINEAR_ALIGNMENT_DEFAULT_IA_BIAS = 0.5
- firecrown.likelihood.weak_lensing.LINEAR_ALIGNMENT_DEFAULT_ALPHAZ = 0.0
- firecrown.likelihood.weak_lensing.LINEAR_ALIGNMENT_DEFAULT_ALPHAG = 1.0
- firecrown.likelihood.weak_lensing.LINEAR_ALIGNMENT_DEFAULT_Z_PIV = 0.5
- class firecrown.likelihood.weak_lensing.LinearAlignmentSystematic(sacc_tracer=None, alphag=1.0)[source]
Bases:
WeakLensingSystematic
Linear alignment systematic.
This systematic adds a linear intrinsic alignment model systematic which varies with redshift and the growth function.
The following parameters are special Updatable parameters, which means that they can be updated by the sampler, sacc_tracer is going to be used as a prefix for the parameters:
- Variables:
ia_bias – the intrinsic alignment bias parameter.
alphaz – the redshift dependence of the intrinsic alignment bias.
alphag – the growth function dependence of the intrinsic alignment bias.
z_piv – the pivot redshift for the intrinsic alignment bias.
- Parameters:
sacc_tracer (None | str)
alphag (None | float)
- ia_bias
- alphaz
- alphag
- z_piv
- apply(tools, tracer_arg)[source]
Return a new linear alignment systematic.
This choice is based on the given tracer_arg, in the context of the given cosmology.
- Parameters:
tracer_arg (WeakLensingArgs)
- Return type:
- firecrown.likelihood.weak_lensing.TATT_ALIGNMENT_DEFAULT_IA_A_1 = 1.0
- firecrown.likelihood.weak_lensing.TATT_ALIGNMENT_DEFAULT_IA_A_2 = 0.5
- firecrown.likelihood.weak_lensing.TATT_ALIGNMENT_DEFAULT_IA_A_D = 0.5
- class firecrown.likelihood.weak_lensing.TattAlignmentSystematic(sacc_tracer=None)[source]
Bases:
WeakLensingSystematic
TATT alignment systematic.
This systematic adds a TATT (nonlinear) intrinsic alignment model systematic.
The following parameters are special Updatable parameters, which means that they can be updated by the sampler, sacc_tracer is going to be used as a prefix for the parameters:
- Variables:
ia_a_1 – the amplitude of the linear alignment model.
ia_a_2 – the amplitude of the quadratic alignment model.
ia_a_d – the amplitude of the density-dependent alignment model.
- Parameters:
sacc_tracer (None | str)
- ia_a_1
- ia_a_2
- ia_a_d
- apply(tools, tracer_arg)[source]
Return a new linear alignment systematic.
This choice is based on the given tracer_arg, in the context of the given cosmology.
- Parameters:
tracer_arg (WeakLensingArgs)
- Return type:
- firecrown.likelihood.weak_lensing.HM_ALIGNMENT_DEFAULT_IA_A_1H = 0.0001
- firecrown.likelihood.weak_lensing.HM_ALIGNMENT_DEFAULT_IA_A_2H = 1.0
- class firecrown.likelihood.weak_lensing.HMAlignmentSystematic(_=None)[source]
Bases:
WeakLensingSystematic
Halo model intrinsic alignment systematic.
This systematic adds a halo model based intrinsic alignment systematic which, at the moment, is fixed within the redshift bin.
The following parameters are special Updatable parameters, which means that they can be updated by the sampler, sacc_tracer is going to be used as a prefix for the parameters:
- Variables:
ia_a_1h – the 1-halo intrinsic alignment bias parameter (satellite galaxies).
ia_a_2h – the 2-halo intrinsic alignment bias parameter (central galaxies).
- Parameters:
_ (None | str)
- ia_a_1h
- ia_a_2h
- apply(tools, tracer_arg)[source]
Return a new halo-model alignment systematic.
- Parameters:
tools (firecrown.modeling_tools.ModelingTools) – A ModelingTools object.
tracer_arg (WeakLensingArgs) – The WeakLensingArgs to which apply the systematic.
- Returns:
A new WeakLensingArgs object with the systematic applied.
- Return type:
- class firecrown.likelihood.weak_lensing.WeakLensing(*, sacc_tracer, scale=1.0, systematics=None)[source]
Bases:
firecrown.likelihood.source.SourceGalaxy[WeakLensingArgs]
Source class for weak lensing.
- Parameters:
sacc_tracer (str)
scale (float)
systematics (None | Sequence[firecrown.likelihood.source.SourceGalaxySystematic[WeakLensingArgs]])
- sacc_tracer
- scale = 1.0
- current_tracer_args: None | WeakLensingArgs = None
- tracer_args: WeakLensingArgs
- classmethod create_ready(inferred_zdist, systematics=None)[source]
Create a WeakLensing object with the given tracer name and scale.
- Parameters:
inferred_zdist (firecrown.metadata_types.InferredGalaxyZDist)
systematics (None | list[firecrown.likelihood.source.SourceGalaxySystematic[WeakLensingArgs]])
- Return type:
- class firecrown.likelihood.weak_lensing.MultiplicativeShearBiasFactory(/, **data)[source]
Bases:
pydantic.BaseModel
Factory class for MultiplicativeShearBias objects.
- Parameters:
data (Any)
- model_config
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type: Annotated[Literal['MultiplicativeShearBiasFactory'], Field(description='The type of the systematic.')] = 'MultiplicativeShearBiasFactory'
- create(bin_name)[source]
Create a MultiplicativeShearBias object.
- Parameters:
inferred_zdist – The inferred galaxy redshift distribution for the created MultiplicativeShearBias object.
bin_name (str)
- Returns:
The created MultiplicativeShearBias object.
- Return type:
- class firecrown.likelihood.weak_lensing.LinearAlignmentSystematicFactory(/, **data)[source]
Bases:
pydantic.BaseModel
Factory class for LinearAlignmentSystematic objects.
- Parameters:
data (Any)
- model_config
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type: Annotated[Literal['LinearAlignmentSystematicFactory'], Field(description='The type of the systematic.')] = 'LinearAlignmentSystematicFactory'
- alphag: None | float = 1.0
- create(bin_name)[source]
Create a LinearAlignmentSystematic object.
- Parameters:
inferred_zdist – The inferred galaxy redshift distribution for the created LinearAlignmentSystematic object.
bin_name (str)
- Returns:
The created LinearAlignmentSystematic object.
- Return type:
- class firecrown.likelihood.weak_lensing.TattAlignmentSystematicFactory(/, **data)[source]
Bases:
pydantic.BaseModel
Factory class for TattAlignmentSystematic objects.
- Parameters:
data (Any)
- model_config
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type: Annotated[Literal['TattAlignmentSystematicFactory'], Field(description='The type of the systematic.')] = 'TattAlignmentSystematicFactory'
- create(bin_name)[source]
Create a TattAlignmentSystematic object.
- Parameters:
inferred_zdist – The inferred galaxy redshift distribution for the created TattAlignmentSystematic object.
bin_name (str)
- Returns:
The created TattAlignmentSystematic object.
- Return type:
- firecrown.likelihood.weak_lensing.WeakLensingSystematicFactory
- class firecrown.likelihood.weak_lensing.WeakLensingFactory(/, **data)[source]
Bases:
pydantic.BaseModel
Factory class for WeakLensing objects.
- Parameters:
data (Any)
- model_config
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- per_bin_systematics: Sequence[WeakLensingSystematicFactory]
- global_systematics: Sequence[WeakLensingSystematicFactory]
- create(inferred_zdist)[source]
Create a WeakLensing object with the given tracer name and scale.
- Parameters:
inferred_zdist (firecrown.metadata_types.InferredGalaxyZDist)
- Return type: