Neatbo.

A counted cycle needs its original source positions

Original sample indices reconnect a counted cycle to its signal; half-cycle weights and out-of-range bins preserve a different kind of information.

What the original question needed

In rainflow issue #31, addarnr wanted original linear start/end indices to correlate a throttle signal with another independently available signal. Another participant discussed reversal indices; the author clarified the intended original positions and supplied two complete expected tables. The feature was released in v3.0.0, so this is a historical resolved source problem.

T356 uses the fixed MIT 3.2.0 counting core in a documented JavaScript port. It preserves source rows and optional time cells so an endpoint still points back to the original record after plateau removal and cycle extraction.

Row count and cycle weight answer different questions

The first complete source example emits nine rows with total cycle weight five; the second emits thirteen rows with total weight nine. A half cycle contributes 0.5, a full cycle contributes 1. Counting rows as full cycles would change both totals.

Check the retained meaning
InformationWhy retain it
Original sample and CSV record indicesLink an endpoint back to a separately supplied signal
Original time cellsKeep source timing labels without inventing synchronization
0.5/1 weightPreserve residual half cycles and actual totals
Underflow/overflow membershipsKeep cycles outside selected regular bins
All source bytes and settingsAllow independent readback of the exact request

Numeric and preview boundaries remain explicit

The port documents two-distinct-endpoint handling, direct derivative-sign comparison, stable half-sum means and atomic refusal for non-finite ranges. It retains complete data within simultaneous resource budgets and a 60-second whole-task deadline. Finite IEEE-754 calculations are not decimal-exact arithmetic; original numeric tokens remain available.

A bounded preview is useful for inspection. Every cycle, reversal, source record and matrix cell stays in complete JSON/CSV downloads. A cycle count alone is not a wear, damage or fatigue-life model, and no NLR/BLADED interoperability or full ASTM compliance is promised.

  • Keep the complete source and declared settings alongside a separately supplied comparison signal.
  • Use original endpoint indices and unchanged time cells when checking a correlation; do not substitute reversal ordinals.
  • Check half-cycle weights and out-of-range memberships before treating the matrix as a complete count.
  • Read every row in the full downloads when the preview ends; a count alone does not establish wear or fatigue life.

References

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

  1. Choose one complete CSV source and declare delimiter, header, physical numeric/time columns and unit.
  2. Choose displayed index base and explicit range/mean edge arrays.
  3. Run locally, review the bounded preview and every representation note.
  4. 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.
Open Count rainflow cycles with original source indices →