hestia_earth.calculation.emission_hierarchies.Emissions_field_hierarchy¶
-
class
hestia_earth.calculation.emission_hierarchies.Emissions_field_hierarchy(emission)[source]¶ Bases:
hestia_earth.calculation.emission_hierarchies.Emissions_hierarchyModel_Hierarchy class. This is an abstract class from which inherit all the hierarchies defined in Hestia. It contains a set of common methods and instance variables that are typically used by every hierarchy. A hierarchy defines the order to run the calculations in the models for a particular emission defined in Hestia. The order is from higher tier to lower tier.
Methods
build_emissioncalculate_modelcheck_modelget_referenceMethod that runs the hierarchy through all the models for a given cycle.
Method to round to a given number of significant numbers.
Method that updates cycle representation emission.
Method that checks if the model has enough data to do the calculation.
Attributes
context-
process_hierarchy(data)[source]¶ Method that runs the hierarchy through all the models for a given cycle. :param cycle: This is a cycle in the representation required by the calculation engine. :param (Different from the Schema representation):
Returns a file object.
-
round_to_significant(number, sig_number)¶ Method to round to a given number of significant numbers. :param number: The number to round. :param sig_number: The number of significant numbers.
Returns The rounded number.
-
update_node(data)¶ Method that updates cycle representation emission. :param data: It is a dataStore object with the representation with the emission to be updated
Returns boolean.
-
update_representation(cycle)¶ Method that checks if the model has enough data to do the calculation. :param cycle: This is a cycle in the representation required by the calculation engine. :param (Different from the Schema representation):
Returns boolean.
-