firecrown.likelihood.number_counts ================================== .. py:module:: firecrown.likelihood.number_counts .. autoapi-nested-parse:: Number counts source and systematics. Classes ------- .. autoapisummary:: firecrown.likelihood.number_counts.NumberCounts firecrown.likelihood.number_counts.NumberCountsFactory firecrown.likelihood.number_counts.ConstantMagnificationBiasSystematic firecrown.likelihood.number_counts.MagnificationBiasSystematic firecrown.likelihood.number_counts.PhotoZShift firecrown.likelihood.number_counts.PTNonLinearBiasSystematic Package Contents ---------------- .. py:class:: NumberCounts(*, sacc_tracer, has_rsd = False, derived_scale = False, scale = 1.0, systematics = None) Bases: :py:obj:`firecrown.likelihood._base.SourceGalaxy`\ [\ :py:obj:`firecrown.likelihood.number_counts._args.NumberCountsArgs`\ ] .. autoapi-inheritance-diagram:: firecrown.likelihood.number_counts.NumberCounts :parts: 1 Source class for number counts. .. py:attribute:: sacc_tracer .. py:attribute:: has_rsd :value: False .. py:attribute:: derived_scale :value: False .. py:attribute:: bias .. py:attribute:: systematics :type: firecrown.updatable.UpdatableCollection[firecrown.likelihood._base.SourceGalaxySystematic[firecrown.likelihood.number_counts._args.NumberCountsArgs]] .. py:attribute:: scale :value: 1.0 .. py:attribute:: current_tracer_args :type: None | firecrown.likelihood.number_counts._args.NumberCountsArgs :value: None .. py:attribute:: tracer_args :type: firecrown.likelihood.number_counts._args.NumberCountsArgs .. py:method:: create_ready(inferred_zdist, has_rsd = False, derived_scale = False, scale = 1.0, systematics = None) :classmethod: 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. :param inferred_zdist: the inferred redshift distribution :param has_rsd: whether to include RSD in the tracer :param derived_scale: whether to include a derived parameter for the scale of the tracer :param scale: the initial scale of the tracer :param systematics: a list of systematics to apply to the tracer :return: a fully initialized NumberCounts object .. py:method:: create_tracers(tools) Create the tracers for this source. :param tools: the ModelingTools used to create the tracers :return: a tuple of tracers and the updated tracer_args .. py:method:: get_scale() Return the scale for this source. :return: the scale for this source. .. py:class:: NumberCountsFactory(/, **data) Bases: :py:obj:`pydantic.BaseModel` .. autoapi-inheritance-diagram:: firecrown.likelihood.number_counts.NumberCountsFactory :parts: 1 Factory class for NumberCounts objects. .. py:attribute:: model_config Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict]. .. py:attribute:: type_source :type: firecrown.metadata_types.TypeSource .. py:attribute:: per_bin_systematics :type: collections.abc.Sequence[NumberCountsSystematicFactory] :value: None .. py:attribute:: global_systematics :type: collections.abc.Sequence[NumberCountsSystematicFactory] :value: None .. py:attribute:: include_rsd :type: bool :value: False .. py:method:: model_post_init(_, /) Initialize the NumberCountsFactory. .. py:method:: create(inferred_zdist) Create a NumberCounts object with the given tracer name and scale. :param inferred_zdist: the inferred redshift distribution :return: a fully initialized NumberCounts object .. py:method:: create_from_metadata_only(sacc_tracer) Create an WeakLensing object with the given tracer name and scale. :param sacc_tracer: the name of the tracer :return: a fully initialized NumberCounts object .. py:class:: ConstantMagnificationBiasSystematic(sacc_tracer) Bases: :py:obj:`NumberCountsSystematic` .. autoapi-inheritance-diagram:: firecrown.likelihood.number_counts.ConstantMagnificationBiasSystematic :parts: 1 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: :ivar mag_bias: the magnification bias. .. py:attribute:: mag_bias .. py:method:: apply(tools, tracer_arg) Apply a constant magnification bias systematic. :param tools: currently unused, but required by interface :param tracer_arg: a NumberCountsArgs object with values to be updated :return: an updated NumberCountsArgs object .. py:class:: MagnificationBiasSystematic(sacc_tracer) Bases: :py:obj:`NumberCountsSystematic` .. autoapi-inheritance-diagram:: firecrown.likelihood.number_counts.MagnificationBiasSystematic :parts: 1 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: :ivar r_lim: the limiting magnitude. :ivar sig_c: the intrinsic dispersion of the source redshift distribution. :ivar eta: the slope of the luminosity function. :ivar z_c: the characteristic redshift of the source distribution. :ivar z_m: the slope of the source redshift distribution. .. py:attribute:: r_lim .. py:attribute:: sig_c .. py:attribute:: eta .. py:attribute:: z_c .. py:attribute:: z_m .. py:method:: apply(tools, tracer_arg) Apply a magnification bias systematic. :param tools: currently unused, but required by the interface :param tracer_arg: a NumberCountsArgs object with values to be updated :return: an updated NumberCountsArgs object .. py:class:: PhotoZShift(sacc_tracer, active = True) Bases: :py:obj:`firecrown.likelihood._base.SourceGalaxyPhotoZShift`\ [\ :py:obj:`firecrown.likelihood.number_counts._args.NumberCountsArgs`\ ] .. autoapi-inheritance-diagram:: firecrown.likelihood.number_counts.PhotoZShift :parts: 1 Photo-z shift systematic. .. py:class:: PTNonLinearBiasSystematic(sacc_tracer = None) Bases: :py:obj:`NumberCountsSystematic` .. autoapi-inheritance-diagram:: firecrown.likelihood.number_counts.PTNonLinearBiasSystematic :parts: 1 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: :ivar b_2: the quadratic bias. :ivar b_s: the stochastic bias. .. py:attribute:: b_2 .. py:attribute:: b_s .. py:method:: apply(tools, tracer_arg) Apply a non-linear bias systematic. :param tools: currently unused, but required by interface :param tracer_arg: a NumberCountsArgs object with values to be updated :return: the updated NumberCountsArgs object