firecrown.likelihood.number_counts
Number counts source and systematics.
Classes
Source class for number counts. |
|
Factory class for NumberCounts objects. |
|
Simple constant magnification bias systematic. |
|
Magnification bias systematic. |
|
Photo-z shift systematic. |
|
Non-linear bias systematic. |
Package Contents
- class firecrown.likelihood.number_counts.NumberCounts(*, sacc_tracer, has_rsd=False, derived_scale=False, scale=1.0, systematics=None)
Bases:
firecrown.likelihood._base.SourceGalaxy[firecrown.likelihood.number_counts._args.NumberCountsArgs]
Source class for number counts.
- Parameters:
sacc_tracer (str)
has_rsd (bool)
derived_scale (bool)
scale (float)
systematics (None | collections.abc.Sequence[firecrown.likelihood._base.SourceGalaxySystematic[firecrown.likelihood.number_counts._args.NumberCountsArgs]])
- sacc_tracer
- has_rsd = False
- derived_scale = False
- bias
- systematics: firecrown.updatable.UpdatableCollection[firecrown.likelihood._base.SourceGalaxySystematic[firecrown.likelihood.number_counts._args.NumberCountsArgs]]
- scale = 1.0
- current_tracer_args: None | firecrown.likelihood.number_counts._args.NumberCountsArgs = None
- tracer_args: firecrown.likelihood.number_counts._args.NumberCountsArgs
- classmethod create_ready(inferred_zdist, has_rsd=False, derived_scale=False, scale=1.0, systematics=None)
Create a NumberCounts object with the given tracer name and scale.
This is the recommended way to create a NumberCounts object. It creates a fully initialized object.
- Parameters:
inferred_zdist (firecrown.metadata_types.InferredGalaxyZDist) – the inferred redshift distribution
has_rsd (bool) – whether to include RSD in the tracer
derived_scale (bool) – whether to include a derived parameter for the scale of the tracer
scale (float) – the initial scale of the tracer
systematics (None | list[firecrown.likelihood._base.SourceGalaxySystematic[firecrown.likelihood.number_counts._args.NumberCountsArgs]]) – a list of systematics to apply to the tracer
- Returns:
a fully initialized NumberCounts object
- Return type:
- create_tracers(tools)
Create the tracers for this source.
- Parameters:
tools (firecrown.modeling_tools.ModelingTools) – the ModelingTools used to create the tracers
- Returns:
a tuple of tracers and the updated tracer_args
- Return type:
tuple[list[firecrown.likelihood._base.Tracer], firecrown.likelihood.number_counts._args.NumberCountsArgs]
- get_scale()
Return the scale for this source.
- Returns:
the scale for this source.
- Return type:
float
- class firecrown.likelihood.number_counts.NumberCountsFactory(/, **data)
Bases:
pydantic.BaseModel
Factory class for NumberCounts 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: collections.abc.Sequence[NumberCountsSystematicFactory] = None
- global_systematics: collections.abc.Sequence[NumberCountsSystematicFactory] = None
- include_rsd: bool = False
- model_post_init(_, /)
Initialize the NumberCountsFactory.
- Return type:
None
- create(inferred_zdist)
Create a NumberCounts object with the given tracer name and scale.
- Parameters:
inferred_zdist (firecrown.metadata_types.InferredGalaxyZDist) – the inferred redshift distribution
- Returns:
a fully initialized NumberCounts object
- Return type:
firecrown.likelihood.number_counts._source.NumberCounts
- create_from_metadata_only(sacc_tracer)
Create an WeakLensing object with the given tracer name and scale.
- Parameters:
sacc_tracer (str) – the name of the tracer
- Returns:
a fully initialized NumberCounts object
- Return type:
firecrown.likelihood.number_counts._source.NumberCounts
- class firecrown.likelihood.number_counts.ConstantMagnificationBiasSystematic(sacc_tracer)
Bases:
NumberCountsSystematic
Simple constant magnification bias systematic.
This systematic adds a constant magnification bias model for galaxy number contrast.
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:
mag_bias – the magnification bias.
- Parameters:
sacc_tracer (str)
- mag_bias
- apply(tools, tracer_arg)
Apply a constant magnification bias systematic.
- Parameters:
tools (firecrown.modeling_tools.ModelingTools) – currently unused, but required by interface
tracer_arg (firecrown.likelihood.number_counts._args.NumberCountsArgs) – a NumberCountsArgs object with values to be updated
- Returns:
an updated NumberCountsArgs object
- Return type:
firecrown.likelihood.number_counts._args.NumberCountsArgs
- class firecrown.likelihood.number_counts.MagnificationBiasSystematic(sacc_tracer)
Bases:
NumberCountsSystematic
Magnification bias systematic.
This systematic adds a magnification bias model for galaxy number contrast following Joachimi & Bridle (2010), arXiv:0911.2454.
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:
r_lim – the limiting magnitude.
sig_c – the intrinsic dispersion of the source redshift distribution.
eta – the slope of the luminosity function.
z_c – the characteristic redshift of the source distribution.
z_m – the slope of the source redshift distribution.
- Parameters:
sacc_tracer (str)
- r_lim
- sig_c
- eta
- z_c
- z_m
- apply(tools, tracer_arg)
Apply a magnification bias systematic.
- Parameters:
tools (firecrown.modeling_tools.ModelingTools) – currently unused, but required by the interface
tracer_arg (firecrown.likelihood.number_counts._args.NumberCountsArgs) – a NumberCountsArgs object with values to be updated
- Returns:
an updated NumberCountsArgs object
- Return type:
firecrown.likelihood.number_counts._args.NumberCountsArgs
- class firecrown.likelihood.number_counts.PhotoZShift(sacc_tracer, active=True)
Bases:
firecrown.likelihood._base.SourceGalaxyPhotoZShift[firecrown.likelihood.number_counts._args.NumberCountsArgs]
Photo-z shift systematic.
- Parameters:
sacc_tracer (str)
active (bool)
- class firecrown.likelihood.number_counts.PTNonLinearBiasSystematic(sacc_tracer=None)
Bases:
NumberCountsSystematic
Non-linear bias systematic.
This systematic adds a linear bias model 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:
b_2 – the quadratic bias.
b_s – the stochastic bias.
- Parameters:
sacc_tracer (None | str)
- b_2
- b_s
- apply(tools, tracer_arg)
Apply a non-linear bias systematic.
- Parameters:
tools (firecrown.modeling_tools.ModelingTools) – currently unused, but required by interface
tracer_arg (firecrown.likelihood.number_counts._args.NumberCountsArgs) – a NumberCountsArgs object with values to be updated
- Returns:
the updated NumberCountsArgs object
- Return type:
firecrown.likelihood.number_counts._args.NumberCountsArgs