grass-addons
grass-addons copied to clipboard
r.random.walk
I've implemented a simple 2D random walk module that I plan to continue expanding for use in other modules. The module currently allows for 4 and 8 directional walks for n number of steps over a given computational region. The module runs in parallel when computing an average walk from a single starting location or an average walk from multiple starting locations.
I'm planning to add more functionality, including a rules file to set directional probabilities and starting positions as an optional input.
@petrasovaa and @cwhite911, I noticed that this is awaiting workflow approvals. Is this fine otherwise to be merged? Or does it need more review?
I have activated the PR checks here: one test is failing:
Run flake8 --count --statistics --show-source --jobs=$(nproc) .
./src/raster/r.random.walk/testsuite/test_r_random_walk.py:25:1: E302 expected 2 blank lines, found 1
class TestRandomWalk(TestCase):
^
1 E302 expected 2 blank lines, found 1
1
Error: Process completed with exit code 1.
@cwhite911, others: may this be merged? (and then fwd-ported to the new grass8
addons branch?
@cwhite911 pls rebase this PR to the (new) grass8
branch
(wake up flake8 test)
Hi @cwhite911 Do you see a chance to complete this PR? Thanks!
@cwhite911 could you please trim white space from the included images? E.g. with ImageMagick:
convert input.png -trim output.png
Hi @cwhite911, do you have any plans to further work on this? It seems at least some issues are easy to solve. I am asking because I would like to give the addon a try. If you want, I can see if I which of the requested changes I can make?
@ecodiv I do have plans to continue building out the functionality and optimizing the code, but it is a low priority for me at the moment. So, feel free to continue working on this if you would like.
Some additional features I would still like to see include:
- Drawing steps from different probability distributions (Gaussian, uniform, etc..)
- Inf directional steps
- User provided starting locations
- Stratified random sampling of walker starting locations based on user provided input data (r.sample.category)
Then let's get this merged now and other can then pick it up.