Rough

A simple package for calculating roughness parameters from numpy arrays and rasters.

Install

Installation is simple via pip or cloning of this repository. Rough should integrate seamlessly with most workflows and projects. A python enviroment manager is generally recommended, I use conda.

pip install rough

How to use

Rough is functional package which works on numpy arrays (or objects which can be coerced into arrays). This documentation follows a literate programming paradigm. The docs are the code base and full of examples. All sections are available as .ipynb notebooks and can be opened using your preferred notebook interface to work with your own data.

Calculating the Ra on a simple line or Profile:

import rough.profile as profile
line = [1,2,3,4,5,6,7]
profile.Ra(line, axis = 0)
1.7142857142857142

Or the Rms

profile.Rms(line, axis = 0)
2.0

Calculating the Sa on a simple 2D Area:

import rough.areal as areal
area = [line]*7
areal.Sa(area)
1.7142857142857142

Or the Sms

areal.Sms(area)
2.0