honeybee_ph_standards.sourcefactors.factors module

Energy conversion factor (CO2, Source) functions

exception honeybee_ph_standards.sourcefactors.factors.FuelNotAllowedError(_fuel_type_input)[source]

Bases: Exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

args
class honeybee_ph_standards.sourcefactors.factors.Factor(fuel_name: str = '', value: float = 0.0, unit: str = '')[source]

Bases: _Base

Dataclass for site->other conversion factor

ToString()[source]
classmethod from_dict(_input_dict: dict) Factor[source]
set_base_attrs_from_source(_source)
to_dict() dict[source]
property display_name

Get or set a string for the object name without any character restrictions.

If not set, this will be equal to the identifier.

property identifier
property identifier_short
class honeybee_ph_standards.sourcefactors.factors.FactorCollection(_name: str = '', _factors: List[Factor] | None = None)[source]

Bases: _Base

Collection of conversion factors.

ToString()[source]
add_factor(_new_factor: Factor) None[source]

Add a new factor to the collection. If the factor already exists, update it.

duplicate() FactorCollection[source]
classmethod from_dict(_input_dict: dict) FactorCollection[source]
get_factor(_fuel_name: str) Factor[source]

Get a factor by fuel name.

set_base_attrs_from_source(_source)
to_dict() dict[source]
validate_fuel_types(_allowed_fuels)[source]
property display_name

Get or set a string for the object name without any character restrictions.

If not set, this will be equal to the identifier.

property identifier
property identifier_short
honeybee_ph_standards.sourcefactors.factors.build_factors_from_library(_factor_dict: Dict[str, Dict[str, float | str]]) List[Factor][source]

Returns a list of factors based on an input data dict from the library.

honeybee_ph_standards.sourcefactors.factors.clean_input(input: str | None) str | None[source]

Returns a clean/standardized string with no spaces, all upper-case