calculate_phases_co2_emissions

calculate_phases_co2_emissions(times, phases_indices, co2_emissions, phases_distances=1.0)[source]

Calculates CO2 emission or cumulative CO2 of cycle phases [CO2g/km or CO2g].

If phases_distances is not given the result is the cumulative CO2 of cycle phases [CO2g] otherwise it is CO2 emission of cycle phases [CO2g/km].

Parameters:
  • times (numpy.array) – Time vector [s].
  • phases_indices (numpy.array) – Indices of the cycle phases [-].
  • co2_emissions (numpy.array) – CO2 instantaneous emissions vector [CO2g/s].
  • phases_distances (numpy.array | float, optional) – Cycle phases distances [km].
Returns:

CO2 emission or cumulative CO2 of cycle phases [CO2g/km or CO2g].

Return type:

numpy.array