Count rainflow cycles with original source indices
Count every cycle from a complete local CSV, preserve original sample/time positions and export the full range–mean matrix.
Before you start
Count every cycle from a complete local CSV, preserve original sample/time positions and export the full range–mean matrix.
How to use this tool
- Choose one complete CSV source and declare delimiter, header, physical numeric/time columns and unit.
- Choose displayed index base and explicit range/mean edge arrays.
- Run locally, review the bounded preview and every representation note.
- Copy the complete report or download the seven complete artifacts; use original indices/time to correlate a separately supplied signal.
Supported inputs and limits
Fixed faithful JavaScript port of rainflow 3.2.0 (MIT). All input and calculation stay in this browser; no runtime download or upload is required.
Choose one pasted CSV or exactly one native UTF-8 file, up to 64 MiB. Malformed UTF-8, unpaired Unicode, blank/invalid numeric records, inconsistent widths and extra/inactive input fields refuse the whole request. No filtering or downsampling.
A leading UTF-8 BOM is recorded and retained in original.csv. Each decoded CSV record, physical starting/ending line and UTF-16 source offsets remain in the report. A selected header stays in the report but is not a sample.
Numeric columns use finite IEEE-754 values from decimal/exponent tokens; exact token spellings stay in valueRaw. Required unit labels allow 256 UTF-8 bytes; filename/MIME labels allow 512/128 bytes. Optional time is exact decoded cell text, never a timestamp conversion.
Joint maxima: 1,000,000 samples, 1,000,000 cycle rows and 10,000,000 turning-point work steps. Input, conservative output/memory reservations and actual complete outputs must all fit; these maxima do not promise a simultaneously maximal request.
Each axis accepts 1–128 regular bins from explicit strictly increasing finite edges. Both add underflow/overflow; the complete dense matrix has at most 130×130 = 16,900 cells. Internal intervals are left-inclusive/right-exclusive; the final edge is included in the last regular bin.
All cycle rows retain weight 0.5 or 1, range, stable mean, both canonical and selected-base original sample indices, original CSV record/line positions, endpoint values/time and bin membership. Out-of-range rows still contribute their full weights.
Pinned upstream plateau behavior is retained: first sample and final sample for length ≥3 stay; interior plateaus use their last position at a reversal. A constant series of length ≥3 emits a zero-range endpoint half cycle. One sample or two equal samples emit no cycles; two distinct endpoints emit one half cycle.
Documented numeric deviations: compare derivative signs directly by value ordering; use x1/2+x2/2 for means; refuse any non-finite absolute range atomically. This extends the pinned counting core with original CSV/time retention and explicit range×mean bins.
Complete file bytes plus result text allow 128 MiB; compact typed JSON allows 64 MiB; their aggregate allows 192 MiB; binary plus complete wire metadata allows 256 MiB. A conservative 1,024 MiB memory reservation and a fixed 60-second absolute whole-task period also apply.
The task period starts before metadata/read/import/Worker construction and includes complete output checks, cleanup and first interface publication after await. Cancellation or expiry publishes no partial artifacts. Changing source or settings cancels and clears prior output. Every run uses a fresh Worker.
The preview shows at most 100 cycles, 2,000 characters per cell and 4,000 report characters. Complete copy and seven downloads retain every source record, sample, reversal, cycle, matrix cell, setting and warning. Derived CSV protects formula-leading cells; JSON and original.csv preserve original content.
Cycle counts are descriptive. No wear, damage, fatigue-life, NLR/BLADED interoperability or full ASTM compliance is inferred or promised.
Worked example
Example input
0 -2 1 -3 5 -1 3 -4 4 -2 0
Example options
indexBase=1; rangeEdges=[0,2,4,8,18]; meanEdges=[-3,-1,0,1,4]
Example output
9 complete cycle rows; total weight 5; first row range=2, mean=-1, count=0.5, original display indices 1→2.
When something does not work
Correct the complete active source or settings, then rerun. After cancellation, the same file and choices can be reused.
Frequently asked questions
Are these reversal indices or original sample indices?
Every cycle endpoint uses the original sample sequence. Canonical indices are 0-based, display indices follow your 0/1 choice, and CSV record/line labels remain separate.
Does it estimate damage?
No. Weights describe cycle counts. Any correlation or life model needs separate supplied evidence and is outside this tool.
What if a cycle is outside the edges?
Its complete row remains, with an explicit underflow/overflow membership, and its 0.5 or 1 weight stays in the full matrix and total.