02_user_tutorials:exercises:apple_scab_and_canker_on_a_virtual_plant
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| 02_user_tutorials:exercises:apple_scab_and_canker_on_a_virtual_plant [2026/09/30 21:55] – barley1965 | 02_user_tutorials:exercises:apple_scab_and_canker_on_a_virtual_plant [2026/09/30 22:15] (current) – barley1965 | ||
|---|---|---|---|
| Line 83: | Line 83: | ||
| During an infection period, every leaf is infected with a probability: | During an infection period, every leaf is infected with a probability: | ||
| <code java> | <code java> | ||
| - | float sus = (lf[age] < SUSC_AGE) ? 1 - (float) lf[age] / SUSC_AGE : 0; // young leaves are most susceptible | + | float scabInfectionProb(Leaf lf) { |
| - | pressure | + | float sus = (lf[age] < SUSC_AGE) ? 1 - (float) lf[age] / SUSC_AGE : 0; // young leaves are most susceptible |
| - | + sum over sporulating | + | if (sus <= 0) return 0; |
| - | SECONDARY_INOCULUM * nLesions * direction | + | float zLeaf = (float) location(lf).z; |
| - | probability = (1 - RESISTANCE) * sus * (1 - exp(-pressure)); | + | float |
| - | </ | + | // primary inoculum: ascospores from the leaf litter, decreasing with height |
| - | (simplified from the function '' | + | if (time >= PRIMARY_START && time <= PRIMARY_END) { |
| + | pressure += PRIMARY_INOCULUM * (float) Math.exp(-zLeaf / ASCO_HEIGHT); | ||
| + | } | ||
| + | // secondary inoculum: conidia splashed | ||
| + | for ((* src:Leaf, (src[nLesions] > 0) *)) { | ||
| + | float d = (float) distance(lf, | ||
| + | float dir = (location(src).z >= zLeaf) ? 1f : UPWARD_SPLASH; | ||
| + | pressure += SECONDARY_INOCULUM * src[nLesions] * dir * (float) Math.exp(-d / SPLASH_DIST); | ||
| + | } | ||
| + | return | ||
| + | }</ | ||
| + | Ascospores are only released between '' | ||
| * **Q6.** Calculate the infection probability of a leaf aged 0 h at ground level, during the ascospore season, when no leaf is sporulating yet ('' | * **Q6.** Calculate the infection probability of a leaf aged 0 h at ground level, during the ascospore season, when no leaf is sporulating yet ('' | ||
02_user_tutorials/exercises/apple_scab_and_canker_on_a_virtual_plant.txt · Last modified: by barley1965
