The LoadCollective class

class pylife.stress.LoadCollective(pandas_obj)[source]

A Load collective.

The usual use of this signal is to process hysteresis loop data from a rainflow recording. Usually the keys from and to are used to describe the hysteresis loops. Alternatively also the keys range and mean can be given. In that case the frame is internally converted to from and to where the from values are the lower ones.

property R

Calculate the R values of the load collective.

Returns

R – The R values of the load collective

Return type

pd.Series

property amplitude

Calculate the amplitudes of the load collective.

Returns

amplitude – The amplitudes of the load collective

Return type

pd.Series

property cycles

The cycles of each member of the collective is 1.0. when no cycles are given

This is for compatibility with LoadHistogram

property lower

Calculate the lower load values of the load collective.

Returns

lower – The lower load values of the load collective

Return type

pd.Series

property meanstress

Calculate the mean load values of the load collective.

Returns

mean – The mean load values of the load collective

Return type

pd.Series

range_histogram(bins, axis=None)[source]

Calculate the histogram of range values along a given axis.

Parameters

bins (int, sequence of scalars or pd.IntervalIndex) – The bins of the histogram to be calculated

Returns

  • range histogram (LoadHistogram)

  • axis (str, optional) – The index axis along which the histogram is calculated. If missing the histogram is calculated over the whole collective.

scale(factors)[source]

Scale the collective.

Parameters

factors (scalar or pandas.Series) – The factor(s) to scale the collective ‘from’ and ‘to’ with.

Returns

scaled – The scaled histogram.

Return type

LoadHistogram

shift(diffs)[source]

Shift the collective.

Parameters

diffs (scalar or pandas.Series) – The diff(s) to shift the collective by.

Returns

shifted – The shifted histogram.

Return type

LoadHistogram

property upper

Calculate the upper load values of the load collective.

Returns

upper – The upper load values of the load collective

Return type

pd.Series