Description
Return log2(first/second) using log1p for a representable relative difference and a difference of logarithms otherwise.
Sediment and soil calculations distinguish mass basis, solid density, bulk volume, and grain-size conventions. Changing moisture or grain-size scale changes the denominator or coordinate, not the physical sample itself.
Return log2(first/second) using log1p for a representable relative difference and a difference of logarithms otherwise.
When to use this tool
Use Grain Size Phi Step when you need an explicit sediment or material-basis conversion.
How to use the tool and how it works
- Enter firstDiameter, secondDiameter. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read phiDifference. Use the output convention below.
Require positive firstDiameter and secondDiameter. Return log2(first/second) using log1p for a representable relative difference and a difference of logarithms otherwise.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| firstDiameter | First Diameter | Required. Finite number; strictly above 0. |
| secondDiameter | Second Diameter | Required. Finite number; strictly above 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| phiDifference | Phi(second)-phi(first)=log2(firstDiameter/secondDiameter), dimensionless. | Required. Finite number. |
{
"input": {
"firstDiameter": 2,
"secondDiameter": 1
},
"output": {
"phiDifference": 1
}
} Limitations and assumptions
- Both diameters share a unit; the result is second-phi minus first-phi, not the opposite sign, and no absolute phi value or size classification is inferred.
- 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 a traceable laboratory and sampling method for the required material property. Align wet/dry basis, solid versus bulk density, grain-size scale, and interval definitions before comparing samples.
References
Similar or alternative tools
- Grain Size Phi Uncertainty Width Transform
Compute phi as negative log2 of the numeric diameter in millimeters, reverse diameter extrema for phi bounds, and return logarithmic width.
- Sediment Bin Width Factor
Use upperSize-lowerSize for linear width or ln(upperSize/lowerSize) for log width, then divide mass by that width.