grass-addons icon indicating copy to clipboard operation
grass-addons copied to clipboard

r.random.walk

Open cwhite911 opened this issue 3 years ago • 7 comments

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.

cwhite911 avatar Sep 05 '21 21:09 cwhite911

@petrasovaa and @cwhite911, I noticed that this is awaiting workflow approvals. Is this fine otherwise to be merged? Or does it need more review?

ecodiv avatar Nov 09 '21 16:11 ecodiv

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.

neteler avatar Nov 09 '21 19:11 neteler

@cwhite911, others: may this be merged? (and then fwd-ported to the new grass8 addons branch?

neteler avatar Dec 05 '21 09:12 neteler

@cwhite911 pls rebase this PR to the (new) grass8 branch

neteler avatar Dec 11 '21 11:12 neteler

(wake up flake8 test)

neteler avatar Dec 22 '21 14:12 neteler

Hi @cwhite911 Do you see a chance to complete this PR? Thanks!

neteler avatar Apr 24 '22 14:04 neteler

@cwhite911 could you please trim white space from the included images? E.g. with ImageMagick:

convert input.png -trim output.png

neteler avatar Oct 01 '22 12:10 neteler

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 avatar Mar 21 '23 16:03 ecodiv

@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)

cwhite911 avatar Apr 20 '23 20:04 cwhite911

Then let's get this merged now and other can then pick it up.

wenzeslaus avatar Apr 21 '23 15:04 wenzeslaus