Description
Return startIndex + (windowLength - 1) / 2 for centerIndex and subtract referenceIndex for offset.
A list window uses a start and exclusive end or a center and radius. Boundary clamping, padding, and half-integer centers are separate conventions.
Return startIndex + (windowLength - 1) / 2 for centerIndex and subtract referenceIndex for offset.
When to use this tool
Use List Window Center Offset when you need an explicit window position or edge-padding budget.
How to use the tool and how it works
- Enter startIndex, windowLength, referenceIndex. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read centerIndex, offset. Use the output convention below.
Return startIndex + (windowLength - 1) / 2 for centerIndex and subtract referenceIndex for offset.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| startIndex | Start Index | Required. Safe integer; minimum 0. |
| windowLength | Window Length | Required. Safe integer; minimum 1. |
| referenceIndex | Reference Index | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| centerIndex | Geometric center coordinate; may be half-integer for an even window. | Required. Finite number. |
| offset | Offset | Required. Finite number. |
{
"input": {
"startIndex": 3,
"windowLength": 4,
"referenceIndex": 3
},
"output": {
"centerIndex": 4.5,
"offset": 1.5
}
} Limitations and assumptions
- Even window lengths have half-integer centers; no rounding or list-bound validation beyond the supplied start and length is performed.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Inspect actual list bounds and choose whether to shift, truncate, or pad windows before extracting data.
References
Similar or alternative tools
- List Window Start End Bias
Choose anchor as the desired start or anchor - size as the desired start for end bias.
- List Window Centered Padding Budget
For a valid center and nonnegative radius, return max(0, radius - center) left padding and max(0, center + radius - length + 1) right padding.