firecrown.likelihood.gauss_family.statistic.statistic.GuardedStatistic#
- class firecrown.likelihood.gauss_family.statistic.statistic.GuardedStatistic(stat)[source]#
Bases:
Updatable
An internal class used to maintain state on statistics.
GuardedStatistic
is used by the framework to maintain and validate the state of instances of classes derived fromStatistic
.- Parameters:
stat (
Statistic
) –
Public Methods:
__init__
(stat)Initialize the GuardedStatistic to contain the given
Statistic
.read
(sacc_data)Read whatever data is needed from the given
sacc.Sacc
object.get_data_vector
()Return the contained
Statistic
's data vector.compute_theory_vector
(tools)Return the contained
Statistic
's computed theory vector.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:
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.
- compute_theory_vector(tools)[source]#
Return the contained
Statistic
’s computed theory vector.GuardedStatistic
ensures thatread()
has been called. first.- Parameters:
tools (
ModelingTools
) –- Return type:
- get_data_vector()[source]#
Return the contained
Statistic
’s data vector.GuardedStatistic
ensures thatread()
has been called. first.- Return type:
- read(sacc_data)[source]#
Read whatever data is needed from the given
sacc.Sacc
object.After this function is called, the object should be prepared for the calling of the methods
get_data_vector()
andcompute_theory_vector()
.- Parameters:
sacc_data (
Sacc
) –- Return type:
None