rdtools.normalization.energy_from_power
- rdtools.normalization.energy_from_power(power, target_frequency=None, max_timedelta=None, power_type='right_labeled')
Returns a regular right-labeled energy time series in units of Wh per interval from a power time series. For instantaneous timeseries, a trapezoidal sum is used. For right labeled time series, a rectangular sum is used. NaN is filled where the gap between input data points exceeds
max_timedelta
. Power_series should be given in Watts.- Parameters:
power (pandas.Series) -- Time series of power in Watts
target_frequency (pandas.tseries.offsets.DateOffset or frequency string, default None) -- The frequency of the energy time series to be returned. If omitted, use the median timestep of
power
, or ifpower
has fewer than two elements, usepower.index.freq
.max_timedelta (pandas.Timedelta, default None) -- The maximum allowed gap between power measurements. If the gap between consecutive power measurements exceeds
max_timedelta
, NaN will be returned for that interval. If omitted,max_timedelta
is set internally to the median time delta inpower
. Ignored whenpower
has fewer than two elements.power_type (str, {'right_labeled', 'instantaneous'}) -- The labeling convention used in power. Default: 'right_labeled'
- Returns:
right-labeled energy in Wh per interval
- Return type: