Skip to content

r.surf.volcano: port from grass6 addons shell script#1202

Open
HamishB wants to merge 6 commits into
OSGeo:grass8from
HamishB:rsvolc_port_from_g6a
Open

r.surf.volcano: port from grass6 addons shell script#1202
HamishB wants to merge 6 commits into
OSGeo:grass8from
HamishB:rsvolc_port_from_g6a

Conversation

@HamishB

@HamishB HamishB commented Sep 8, 2024

Copy link
Copy Markdown
Contributor

I find this module quite useful for creating synthetic surfaces for testing a variety of other modules.

Comment thread src/raster/r.surf.volcano/r.surf.volcano.html Outdated
@neteler

neteler commented Sep 8, 2024

Copy link
Copy Markdown
Member

Nice!
Do you see a chance to also add a small test?

MN: for addons, the full URL to core modules is needed here

Co-authored-by: Markus Neteler <markus@neteler.org>
@HamishB

HamishB commented Sep 8, 2024

Copy link
Copy Markdown
Contributor Author

Nice! Do you see a chance to also add a small test?

Hi Markus,

What do you like that to look like? Just some dummy values to see if it completes with exit code 0 or some r.univar or 'r.stats -Ac nsteps=10' analysis to see that the output is within expected bounds?

@neteler

neteler commented Sep 8, 2024

Copy link
Copy Markdown
Member

Yes, something simple would be great. This quite helps to be able to quickly test also other changes which might indirectly affect this addon.

@wenzeslaus wenzeslaus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to see this one back.

# # FIXME: ok, it isn't really kurtosis but it's similar and I couldn't
# # think of a better name.
# %Option
# % key: kurtosis

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about slope_steepness?

sigma = options["sigma"]
kurtosis = options["kurtosis"]

tmp_base = "tmp__rsv_%d" % os.getpid()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gs.append_node_pid will work on clusters.

Comment on lines +89 to +90
from grass.script import core as gc
from grass.script import raster as gr

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
from grass.script import core as gc
from grass.script import raster as gr
import grass.script as gs

is what is usually used for simplicity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants