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!
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 becausedr_i
was changed todt_i
when deposition (R) was changed to trapping (T) to avoid confusion with the R factor in RUSLE. AndE'_i
is not part of the equation fort_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 top(j,i)
to denote the flow from pixels j to i.line 361 and 365 currently include
dr_i
, which should be changed todt_i
, for the reason noted above.line 361 currently also includes
p(i,j)
, which should be changed top(j,i)
for the reason noted above.It looks like the old variable name
dr_i
is retained in the code in lines 644-662. Perhaps this should be changed totr_i
to 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!