--- id: rainflow version: "3.2.0" license: MIT license_treatment: permissive maintenance: abandoned --- # rainflow — Implementation of ASTM E1049-85 rainflow cycle counting algorithm License: permissive · Maintenance: abandoned · Downloads: 116.9K/mo ## What it is and what it does Rainflow is a Python library that implements the ASTM E1049-85 rainflow cycle counting algorithm, a standard method in fatigue analysis for identifying and counting stress cycles in time-series data. It takes a sequence of numerical values (lists, numpy arrays, or pandas Series) and extracts cycles with their ranges, mean values, and occurrence counts—information essential for predicting material fatigue life and damage accumulation. The library provides two main functions: `count_cycles` for a summary of cycle ranges and frequencies (with optional binning or rounding), and `extract_cycles` for detailed cycle information including start and end indices. It has no external runtime dependencies, making installation straightforward, but the project is no longer actively maintained as of April 2023, though it remains classified as Production/Stable. Use it for: - Analyze stress-strain time series from mechanical testing or field measurements to predict component fatigue life. - Process vibration or load data to identify and count significant stress reversals for damage assessment. - Bin and aggregate cycle counts by range for S-N curve (stress-life) or Goodman diagram fatigue calculations. - Extract cycle statistics (range, mean, count, position) for custom fatigue models or post-processing workflows. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Rainflow implements the ASTM E1049-85 rainflow cycle counting algorithm for fatigue analysis, processing time-series data to extract and count stress cycles. Yes, if you need rainflow cycle counting for fatigue analysis and can accept a stable but unmaintained library. The implementation is straightforward, has no dependencies, and the algorithm itself is a fixed standard. However, verify that the ASTM E1049-85 implementation meets your validation requirements, and be aware that no active support or updates are available for compatibility issues with newer Python or dependencies in your broader stack. ## Install pip install rainflow uv add rainflow poetry add rainflow ## Installing rainflow Before you install: Low install friction with no runtime dependencies. Marked as abandoned (last commit 2023-04-17, 1215 days ago), though classified as Production/Stable and supporting Python 3.7–3.11. License in practice: MIT license is permissive; you may use, modify, and distribute this package freely with minimal restrictions. Quickstart: pip install rainflow import rainflow signal = [0.2, 0.5, 0.3, 0.8, 0.4, 0.1] rainflow.count_cycles(signal) # Returns: [(range, count), ...] Verify before relying: - Whether the package remains compatible with Python versions released after the last commit in April 2023. - Whether the ASTM E1049-85 algorithm implementation has been validated against the standard or peer-reviewed work. - Active maintenance status and responsiveness to bug reports or pull requests, given the abandoned label. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 116.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags rainflow cycle counting, fatigue analysis algorithm, ASTM E1049-85 implementation, stress cycle extraction, time series fatigue, cycle counting, fatigue damage assessment, fatigue-analysis, materials-science, signal-processing [View on SkillFed](https://skillfed.io/packages/rainflow) · [View on PyPI](https://pypi.org/project/rainflow/)