firecrown.likelihood.weak_lensing

Weak lensing source and systematics.

Attributes

MULTIPLICATIVE_SHEAR_BIAS_DEFAULT_BIAS

LINEAR_ALIGNMENT_DEFAULT_IA_BIAS

LINEAR_ALIGNMENT_DEFAULT_ALPHAZ

LINEAR_ALIGNMENT_DEFAULT_ALPHAG

LINEAR_ALIGNMENT_DEFAULT_Z_PIV

TATT_ALIGNMENT_DEFAULT_IA_A_1

TATT_ALIGNMENT_DEFAULT_IA_A_2

TATT_ALIGNMENT_DEFAULT_IA_A_D

HM_ALIGNMENT_DEFAULT_IA_A_1H

HM_ALIGNMENT_DEFAULT_IA_A_2H

WeakLensingSystematicFactory

Classes

WeakLensingArgs

Class for weak lensing tracer builder argument.

WeakLensingSystematic

Abstract base class for all weak lensing systematics.

PhotoZShiftandStretch

Photo-z shift systematic.

PhotoZShift

Photo-z shift systematic.

SelectField

Systematic to select 3D field.

MultiplicativeShearBias

Multiplicative shear bias systematic.

LinearAlignmentSystematic

Linear alignment systematic.

TattAlignmentSystematic

TATT alignment systematic.

HMAlignmentSystematic

Halo model intrinsic alignment systematic.

WeakLensing

Source class for weak lensing.

MultiplicativeShearBiasFactory

Factory class for MultiplicativeShearBias objects.

LinearAlignmentSystematicFactory

Factory class for LinearAlignmentSystematic objects.

TattAlignmentSystematicFactory

Factory class for TattAlignmentSystematic objects.

WeakLensingFactory

Factory class for WeakLensing objects.

Module Contents

class firecrown.likelihood.weak_lensing.WeakLensingArgs[source]

Bases: firecrown.likelihood.source.SourceGalaxyArgs

Inheritance diagram of firecrown.likelihood.weak_lensing.WeakLensingArgs

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]

Inheritance diagram of firecrown.likelihood.weak_lensing.WeakLensingSystematic

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:
Return type:

WeakLensingArgs

class firecrown.likelihood.weak_lensing.PhotoZShiftandStretch(sacc_tracer, active=True)[source]

Bases: firecrown.likelihood.source.SourceGalaxyPhotoZShiftandStretch[WeakLensingArgs]

Inheritance diagram of firecrown.likelihood.weak_lensing.PhotoZShiftandStretch

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]

Inheritance diagram of firecrown.likelihood.weak_lensing.PhotoZShift

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]

Inheritance diagram of firecrown.likelihood.weak_lensing.SelectField

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

Inheritance diagram of firecrown.likelihood.weak_lensing.MultiplicativeShearBias

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:
Returns:

A new WeakLensingArgs object with the shear bias applied.

Return type:

WeakLensingArgs

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

Inheritance diagram of firecrown.likelihood.weak_lensing.LinearAlignmentSystematic

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:
Return type:

WeakLensingArgs

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

Inheritance diagram of firecrown.likelihood.weak_lensing.TattAlignmentSystematic

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:
Return type:

WeakLensingArgs

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

Inheritance diagram of firecrown.likelihood.weak_lensing.HMAlignmentSystematic

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:
Returns:

A new WeakLensingArgs object with the systematic applied.

Return type:

WeakLensingArgs

class firecrown.likelihood.weak_lensing.WeakLensing(*, sacc_tracer, scale=1.0, systematics=None)[source]

Bases: firecrown.likelihood.source.SourceGalaxy[WeakLensingArgs]

Inheritance diagram of firecrown.likelihood.weak_lensing.WeakLensing

Source class for weak lensing.

Parameters:
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:
Return type:

WeakLensing

create_tracers(tools)[source]

Render a source by applying systematics.

Parameters:

tools (firecrown.modeling_tools.ModelingTools)

get_scale()[source]

Returns the scales for this Source.

class firecrown.likelihood.weak_lensing.MultiplicativeShearBiasFactory(/, **data)[source]

Bases: pydantic.BaseModel

Inheritance diagram of firecrown.likelihood.weak_lensing.MultiplicativeShearBiasFactory

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:

MultiplicativeShearBias

create_global()[source]

Create a MultiplicativeShearBias object.

Returns:

The created MultiplicativeShearBias object.

Return type:

MultiplicativeShearBias

class firecrown.likelihood.weak_lensing.LinearAlignmentSystematicFactory(/, **data)[source]

Bases: pydantic.BaseModel

Inheritance diagram of firecrown.likelihood.weak_lensing.LinearAlignmentSystematicFactory

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:

LinearAlignmentSystematic

create_global()[source]

Create a LinearAlignmentSystematic object.

Returns:

The created LinearAlignmentSystematic object.

Return type:

LinearAlignmentSystematic

class firecrown.likelihood.weak_lensing.TattAlignmentSystematicFactory(/, **data)[source]

Bases: pydantic.BaseModel

Inheritance diagram of firecrown.likelihood.weak_lensing.TattAlignmentSystematicFactory

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:

TattAlignmentSystematic

create_global()[source]

Create a TattAlignmentSystematic object.

Returns:

The created TattAlignmentSystematic object.

Return type:

TattAlignmentSystematic

firecrown.likelihood.weak_lensing.WeakLensingSystematicFactory
class firecrown.likelihood.weak_lensing.WeakLensingFactory(/, **data)[source]

Bases: pydantic.BaseModel

Inheritance diagram of firecrown.likelihood.weak_lensing.WeakLensingFactory

Factory class for WeakLensing objects.

Parameters:

data (Any)

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

type_source: firecrown.metadata_types.TypeSource
per_bin_systematics: Sequence[WeakLensingSystematicFactory] = None
global_systematics: Sequence[WeakLensingSystematicFactory] = None
model_post_init(_, /)[source]

Initialize the WeakLensingFactory object.

Return type:

None

create(inferred_zdist)[source]

Create a WeakLensing object with the given tracer name and scale.

Parameters:

inferred_zdist (firecrown.metadata_types.InferredGalaxyZDist)

Return type:

WeakLensing

create_from_metadata_only(sacc_tracer)[source]

Create an WeakLensing object with the given tracer name and scale.

Parameters:

sacc_tracer (str)

Return type:

WeakLensing