natcap / invest

InVEST®: models that map and value the goods and services from nature that sustain and fulfill human life.
Apache License 2.0
170 stars 70 forks source link

Small typos/mis-match with user's guide in sdr_core.pyx comments? #1629

Closed lmandle closed 1 month ago

lmandle commented 2 months ago

I think there are a few small typos/updates to notation needed in sdr_core.pyx in the comment block starting on line 355.

Specifically: line 359 currently reads: t_i = dr_i * (sum over j ∈ J of f_j * p(i,j)) + E'_i I think it should read: t_i = dt_i * (sum over j ∈ J of f_j * p(j,i)) This is because dr_i was changed to dt_iwhen deposition (R) was changed to trapping (T) to avoid confusion with the R factor in RUSLE. And E'_i is not part of the equation for t_i(see eq. 81 in the user's guide). It looks like E'_i is correctly not included in the actual calculation implemented in the code below (line 653). p(i,j)should be changed to p(j,i) to denote the flow from pixels j to i.

line 361 and 365 currently include dr_i, which should be changed to dt_i, for the reason noted above.

line 361 currently also includes p(i,j), which should be changed to p(j,i) for the reason noted above.

It looks like the old variable name dr_iis retained in the code in lines 644-662. Perhaps this should be changed totr_ito be consistence with the user's guide notation? But maybe that's more complicated than I am imagining.

And I'd welcome feedback on how to write an issue that's easy to follow! Thanks!