setCookedYield
Convert batch macro totals into per-100 g cooked values using measured cooked weight, your own yield factor, or a USDA yield lookup.
Instructions
Convert batch totals into per-100 g cooked values. Pass the measured cooked weight when you have it. Failing that, pass a yield factor you measured yourself, or a yieldHint to look one up in the bundled USDA tables. A hint matching several rows returns unresolved with candidates rather than choosing one. Note that rice and dried legumes gain weight: their yield factors are above 1.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rawG | Yes | ||
| cookedG | No | Measured cooked weight. Wins over everything else. | |
| yieldHint | No | Look a factor up in the bundled USDA tables. Used only when neither cookedG nor yieldFactor is given, and only when exactly one row matches. | |
| totalMacros | Yes | ||
| yieldFactor | No | Your own measured factor. Second choice. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rawG | Yes | ||
| basis | Yes | ||
| status | Yes | ||
| cookedG | Yes | ||
| warnings | Yes | ||
| yieldRow | Yes | ||
| arithmetic | Yes | ||
| candidates | Yes | ||
| yieldFactor | Yes | ||
| per100gCooked | Yes |