Skip to content

Main content

Rotation Legume Duration Share Tool

Calculate rotation legume duration share from explicit caller-supplied inputs.

Loading tool…

Description

Sum legume durations and divide by all durations; if total is zero return share=0 and defined=false.

Ecological observation summaries depend on sampling effort, eligible time, classified counts and missingness policies. Flower-minutes, area-days and observed proportions have different denominators. Observation support is distinct from true abundance, detection probability or a causal biological-control effect.

Sum legume durations and divide by all durations; if total is zero return share=0 and defined=false.

When to use this tool

Use Rotation Legume Duration Share when checking the stated observation support, exposure, sample or seasonal-gap convention.

How to use the tool and how it works

  1. Enter durations, legume. Follow any array-alignment requirements below. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read legumeDuration, share, defined. Inspect defined before interpreting the associated values.

Require aligned nonnegative durations and legume flags. Sum legume durations and divide by all durations; if total is zero return share=0 and defined=false.1

Input fieldMeaning and unitsAccepted input
durationsDurationsRequired. Array of finite number; minimum 0; maximum items 256.
legumeLegumeRequired. Array of boolean; maximum items 256.
Output fieldInterpretationReturned shape
legumeDurationLegume DurationRequired. Finite number.
shareDimensionless share using the operation-specific denominator stated above; not a percentage number.Required. Finite number.
definedWhether the corresponding reporting denominator/value is defined; inspect before interpreting zero placeholders.Required. Boolean.
json
{
  "input": {
    "durations": [
      2,
      4
    ],
    "legume": [
      true,
      false
    ]
  },
  "output": {
    "legumeDuration": 2,
    "share": 0.3333333333333333,
    "defined": true
  }
}

Limitations and assumptions

  • Intervals are added as supplied, without merging overlap or verifying crop identity or ecological benefit.
  • 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

Use verified representative field records and suitable sampling/detection analysis for ecological inference, uncertainty and management.

References

  1. Calculation and input contract: agroecology/rotation-legume-duration-share — tool.io

Similar or alternative tools