Count rainflow cycles without losing original CSV positions
Declare CSV columns and bin edges, check endpoint positions and cycle weights, and save all seven exports with the unchanged source.
Declare the source before counting
Select one strict UTF-8 CSV or paste the complete text. Choose the delimiter, header, physical numeric column, optional time column and signal unit. Columns use 0-based physical positions; a header is retained but does not enter the sample sequence. Empty or invalid numeric records refuse the whole result.
Time is exact decoded cell text, including quotes, whitespace, repeated labels or embedded newlines. No timestamp parsing, sorting, resampling or interpolation is applied. original.csv retains every input byte, including a leading BOM.
Use original endpoints, not reversal ordinals
The source issue asks to correlate counted changes with an independently available signal. Its author explicitly clarified that the requested indices were original linear positions. The maintainer delivered indices in v3.0.0; T356 pins the complete MIT rainflow 3.2.0 core and retains its source and license.
The two complete author series contain 11 and 23 samples and 9 and 13 emitted cycle rows. Their 1-based expected endpoints and weights 5 and 9 are checked in full. The published abbreviated README example is not substituted for either full series.
| Field | Meaning |
|---|---|
| startIndex / endIndex | Original sample positions, always 0-based |
| startDisplayIndex / endDisplayIndex | Same positions with selected 0/1 base |
| startRecord / endRecord | Original CSV record ordinals, including header, 0-based |
| startLine / endLine | Physical starting lines of endpoint records, 1-based |
| startTime / endTime | Exact optional time cell text |
Keep all bins and weights
Supply finite strictly increasing edge arrays. Internal bins include their left edge and exclude the right; the final edge stays in the final regular bin. Explicit underflow/overflow bins preserve cycles outside your chosen regular intervals. Every emitted row contributes exactly 0.5 or 1 to the dense range×mean matrix.
One sample and two equal samples emit no cycles. Two distinct endpoints emit a half cycle. For at least three samples, pinned plateau behavior retains the original final sample, including a zero-range half cycle for a constant sequence. Direct sign comparisons avoid derivative-product underflow; stable half-sum means avoid avoidable addition overflow; a non-finite absolute range rejects the entire task.
Read complete downloads and joint limits
Seven artifacts contain the full report, every cycle, all source records, all turning points, every matrix cell, settings and original bytes. Copy uses the complete compact report JSON. The interface preview alone is capped at 100 rows, 2,000 characters per cell and 4,000 report characters. Derived CSV guards formula-leading cells; complete JSON preserves exact decoded cells.
The limits apply jointly: 64 MiB input; one million samples/cycles; ten million turning-point work steps; 128 regular bins per axis and 16,900 dense cells; 128 MiB files plus text, 64 MiB typed JSON, 192 MiB aggregate, 256 MiB binary/metadata wire, 1,024 MiB conservative memory reservation and one absolute 60-second period. Conservative complete-output reservations can refuse earlier than an isolated maximum. The deadline covers reading, import, counting, full validation, cleanup and the first UI publication after await. Cancellation or a source change clears output; rerun the same selected file after cancellation.
- Check the delimiter, header flag and 0-based numeric/time columns against source-records.csv before using an endpoint.
- Match startIndex/endIndex to the original sample sequence; check CSV record and physical line labels separately.
- Compare the sum of 0.5/1 cycle weights with the complete range–mean matrix, including underflow and overflow cells.
- Download all seven artifacts and retain original.csv with settings.json; after cancellation, rerun with the same selected file and choices.
References
- Original resolved source question and complete expected tables
Complete frozen source and fixed-version MIT core retained; no claim of author adoption.
- rainflow 3.2.0 fixed source
Complete frozen source and fixed-version MIT core retained; no claim of author adoption.
Tools in this category
Expand a tool to see its steps, options and supported formats, then open its workspace.
Count rainflow cycles with original source indicesCount every cycle from a complete local CSV, preserve original sample/time positions and export the full range–mean matrix.
Count every cycle from a complete local CSV, preserve original sample/time positions and export the full range–mean matrix.
Steps
- 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.
Available options
- Delimiter
- Comma · Semicolon · Tab · Pipe
Only comma, semicolon, tab or pipe; quoted fields preserve embedded delimiters and newlines.
- First record is a header
- Off by default
The header stays in source records and is excluded from the sample sequence.
- Numeric column (0-based)
- 0
Choose the physical column position. Every data record needs a finite decimal/exponent value.
- Time column (0-based; -1 = none)
- -1
Optional exact cell text, including empty or repeated times. It is never parsed, sorted or interpolated.
- Declared signal unit
- signal units
Required label, up to 256 UTF-8 bytes. No unit conversion is performed.
- Displayed sample index base
- 0 · 1
Canonical sample indices and CSV record ordinals remain 0-based; physical line labels are 1-based.
- Range edges: JSON array
- [0,2,4,8,18]
2–129 finite, strictly increasing edges. 1–128 regular bins plus underflow and overflow.
- Mean edges: JSON array
- [-3,-1,0,1,4]
Each cycle retains both bin indices. The final edge belongs to the last regular bin.
Capabilities 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.