VincyaneBadouard / TreeData_broken

Harmonization and correction forest data tool.
https://vincyanebadouard.github.io/TreeData/
0 stars 1 forks source link

Improve the calculation time of correction functions using data.table #59

Closed cpiponiot closed 1 year ago

cpiponiot commented 1 year ago

I have modified the correction functions (as detailed below) to make their calculation faster (mainly by using the features of data.table). I've tried not to change the structure of the functions too much, and to make sure that all functions give the same outputs. All the current tests pass, although not all the code has been covered by the tests, so there may be some issues I've missed.

Further improvements could probably be made by first detecting problem trees before applying the correction functions only to those trees. Further improvements in computation time could also be made by moving some of the operations from tree-by-tree functions to global functions (in StatusCorrection, DiameterCorrection, RecruitmentCorrection functions).