User Tools

Site Tools


02_user_tutorials:exercises:apple_scab_and_canker_on_a_virtual_plant

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
02_user_tutorials:exercises:apple_scab_and_canker_on_a_virtual_plant [2026/09/30 21:55] – barley196502_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  = PRIMARY_INOCULUM * exp(-height / ASCO_HEIGHT)                 // ascospores from the ground + float sus = (lf[age] < SUSC_AGE) ? 1 - (float) lf[age] / SUSC_AGE : 0;   // young leaves are most susceptible 
-          + sum over sporulating leaves of + if (sus <= 0) return 0; 
-            SECONDARY_INOCULUM * nLesions * direction * exp(-distance / SPLASH_DIST);   // conidia + float zLeaf = (float) location(lf).z; 
-probability = (1 - RESISTANCE) * sus * (1 - exp(-pressure)); + float pressure = 0; 
-</code> + // primary inoculum: ascospores from the leaf litter, decreasing with height 
-(simplified from the function ''scabInfectionProb''). Ascospores are only released between ''PRIMARY_START'' and ''PRIMARY_END''. ''direction'' is 1 if the source leaf is above the target leaf, and ''UPWARD_SPLASH'' (0.3) otherwise.+ if (time >= PRIMARY_START && time <= PRIMARY_END) { 
 + pressure += PRIMARY_INOCULUM * (float) Math.exp(-zLeaf / ASCO_HEIGHT); 
 + } 
 + // secondary inoculum: conidia splashed from sporulating lesions, mostly downwards 
 + for ((* src:Leaf, (src[nLesions] > 0) *)) { 
 + float d = (float) distance(lf, src); 
 + float dir = (location(src).z >= zLeaf) ? 1f : UPWARD_SPLASH; 
 + pressure += SECONDARY_INOCULUM * src[nLesions] * dir * (float) Math.exp(-d / SPLASH_DIST); 
 + } 
 + return (1 - RESISTANCE) * sus * (float) (1 - Math.exp(-pressure)); 
 +}</code> 
 +Ascospores are only released between ''PRIMARY_START'' and ''PRIMARY_END''. ''direction'' is 1 if the source leaf is above the target leaf, and ''UPWARD_SPLASH'' (0.3) otherwise.
  
   * **Q6.** Calculate the infection probability of a leaf aged 0 h at ground level, during the ascospore season, when no leaf is sporulating yet (''PRIMARY_INOCULUM'' = 0.5, ''RESISTANCE'' = 0). Same for a leaf aged 75 h.   * **Q6.** Calculate the infection probability of a leaf aged 0 h at ground level, during the ascospore season, when no leaf is sporulating yet (''PRIMARY_INOCULUM'' = 0.5, ''RESISTANCE'' = 0). Same for a leaf aged 75 h.
02_user_tutorials/exercises/apple_scab_and_canker_on_a_virtual_plant.txt · Last modified: by barley1965