The LoopValueRecorder class#
- class pylife.stress.rainflow.LoopValueRecorder[source]#
Record rainflow loop turning loads.
The recorder stores the load value where each closed hysteresis loop starts and the value where it turns back. These values can be exposed as an explicit load collective or binned into a two-dimensional histogram.
- property collective#
Return the recorded loops as an explicit load collective.
- Returns:
DataFrame with columns
fromandtocontaining loop turning loads, typically in MPa.- Return type:
- histogram(bins=10)[source]#
Calculate a pandas histogram of recorded loop loads.
An interval index is used to label the bins.
- Parameters:
bins (int, array_like or list, optional) – Bin specification passed to
numpy.histogram2d(). Default is10.- Returns:
Histogram counts with interval index levels
fromandto.- Return type:
- histogram_numpy(bins=10)[source]#
Calculate a NumPy histogram of recorded loop loads.
- Parameters:
bins (int, array_like or list, optional) – Bin specification passed to
numpy.histogram2d(). Default is10.- Returns:
H (numpy.ndarray) – Two-dimensional histogram of
fromandtoload values.xedges (numpy.ndarray) – Bin edges along the
fromload axis.yedges (numpy.ndarray) – Bin edges along the
toload axis.
- record_values(values_from, values_to)[source]#
Record loop turning loads.
- Parameters:
values_from (array_like) – Load values where loops start, typically in MPa.
values_to (array_like) – Load values where loops turn back, typically in MPa.
- property values_from#
Return the loads where recorded loops start.
- Returns:
Start load values, typically in MPa.
- Return type:
- property values_to#
Return the loads where recorded loops turn back.
- Returns:
Turn-back load values, typically in MPa.
- Return type: