firecrown.likelihood.gauss_family.statistic.source.source.Source#

class firecrown.likelihood.gauss_family.statistic.source.source.Source(sacc_tracer)[source]#

Bases: Updatable

An abstract source class (e.g., a sample of lenses).

Parameters:
  • systematics (list of str, optional) – A list of the source-level systematics to apply to the source. The default of None implies no systematics.

  • sacc_tracer (str) –

Public Methods:

__init__(sacc_tracer)

Create a Source object that uses the named tracer.

read(sacc_data)

Read the data for this source from the SACC file.

get_scale()

Abstract method to return the scales for this Source.

create_tracers(tools)

Create tracers for this Source, for the given cosmology.

get_tracers(tools)

Return the tracer for the given cosmology.

Inherited from Updatable

__init__([parameter_prefix])

Updatable initialization.

__setattr__(key, value)

Set the attribute named key to the supplied value.

set_parameter(key, value)

Sets the parameter to the given value.

set_internal_parameter(key, value)

Assure this InternalParameter has not already been set, and then set it.

set_sampler_parameter(value)

Assure this SamplerParameter has not already been set, and then set it.

update(params)

Update self by calling to prepare for the next MCMC sample.

is_updated()

Determine if the object has been updated.

reset()

Reset the updatable.

required_parameters()

Returns a RequiredParameters object.

get_derived_parameters()

Returns a collection of derived parameters.

Private Methods:

_read(sacc_data)

Abstract method to read the data for this source from the SACC file.

_update_source(params)

Method to update the source from the given ParamsMap.

_update(params)

Implementation of Updatable interface method _update.

Inherited from Updatable

_update(params)

Method for auxiliary updates to be made to an updatable.

_reset()

Abstract method implemented by all concrete classes to update self.

_required_parameters()

Return a RequiredParameters object containing the information for this class.

_get_derived_parameters()

Returns the derived parameters of an implementation.


abstract _read(sacc_data)[source]#

Abstract method to read the data for this source from the SACC file.

Parameters:

sacc_data (Sacc) –

final _update(params)[source]#

Implementation of Updatable interface method _update.

This clears the current hash and tracer, and calls the abstract method _update_source, which must be implemented in all subclasses.

Parameters:

params (ParamsMap) –

_update_source(params)[source]#

Method to update the source from the given ParamsMap.

Any subclass that needs to do more than update its contained Updatable objects should implement this method.

Parameters:

params (ParamsMap) –

abstract create_tracers(tools)[source]#

Create tracers for this Source, for the given cosmology.

Parameters:

tools (ModelingTools) –

abstract get_scale()[source]#

Abstract method to return the scales for this Source.

Return type:

float

final get_tracers(tools)[source]#

Return the tracer for the given cosmology.

This method caches its result, so if called a second time with the same cosmology, no calculation needs to be done.

Parameters:

tools (ModelingTools) –

Return type:

Sequence[Tracer]

final read(sacc_data)[source]#

Read the data for this source from the SACC file.

Parameters:

sacc_data (Sacc) –