surface.py¶
Surfaces
¶
flowchart TD
erosionfront.geomorphic.surface.Surfaces[Surfaces]
click erosionfront.geomorphic.surface.Surfaces href "" "erosionfront.geomorphic.surface.Surfaces"
Surface-type enumeration.
Attributes¶
SL: str = "straight-line" Segmented flat-ramp-flat straight-line model. ERF: str = "error-function" Smooth-step model computed using an error function. SCA: str = "semicircular-arc" 180º half-circle arc, i.e., with 50% overhang. SCA: str = "quartercircular-arc" 90º quarter-circle arc.
SurfaceMethods
dataclass
¶
SurfaceMethods(
type: str = "",
label: str = "",
n_pts: int = 1001,
height: float = 1,
steepness: float = 10,
x_left: float = -1,
x_right: float = +1,
x_center: float = 0,
do_anchor_ends: bool = True,
x: NDArray | None = None,
z: NDArray | None = None,
)
Base class providing geometric tools for surface model classes.
Parameters¶
n_pts: int = 1001
Number of sample points along the surface.
height: float = 1
Maximum height of surface function above zero base-level.
steepness: float = 10
Steepness factor used in straight-line and error-function surfaces.
x_left: float = -1
Left-most x coordinate for sampling
x_right: float = +1
Right-most x coordinate for sampling.
x_center: float = 0
Central x coordinate in error-function surface (point of symmetry).
do_anchor_ends: bool = True
Fix the left and right end z-values at 0 and height respectively.
Attributes¶
type: str = ""
Surface type (long-form).
One of: straight-line, error-function, semicircular-arc, quartercircular-arc.
Set by choose_surface.
label: str = ""
Surface type (short-form).
Set by choose_surface.
n_pts: int = 1001
Number of sample points along the surface.
height: float = 1
Maximum height of surface function above zero base-level.
steepness: float = 10
Steepness factor used in straight-line and error-function surfaces.
x_left: float = -1
Left-most x coordinate for sampling
x_right: float = +1
Right-most x coordinate for sampling.
x_center: float = 0
Central x coordinate in error-function surface (point of symmetry).
do_anchor_ends: bool = True
Fix the left and right end z-values at 0 and height respectively.
x: NDArray | None = None
Sample x coordinates along the surface.
z: NDArray | None = None
Sample z coordinates along the surface.
Methods:
-
__post_init__–Complete instantiation by computing surface angle β along the curve.
-
get_points_xz–Stack x,z arrays of N points into a single (N,2) array.
__post_init__
¶
Complete instantiation by computing surface angle β along the curve.
Attributes¶
β: NDArray Angle of surface computed by taking arctan of gradient of x and z coordinates wrt index.
Source code in erosionfront/geomorphic/surface.py
StraightLineSurface
dataclass
¶
StraightLineSurface(
type: str = "",
label: str = "",
n_pts: int = 1001,
height: float = 1,
steepness: float = 10,
x_left: float = -1,
x_right: float = +1,
x_center: float = 0,
do_anchor_ends: bool = True,
x: NDArray | None = None,
z: NDArray | None = None,
)
flowchart TD
erosionfront.geomorphic.surface.StraightLineSurface[StraightLineSurface]
erosionfront.geomorphic.surface.SurfaceMethods[SurfaceMethods]
erosionfront.geomorphic.surface.SurfaceMethods --> erosionfront.geomorphic.surface.StraightLineSurface
click erosionfront.geomorphic.surface.StraightLineSurface href "" "erosionfront.geomorphic.surface.StraightLineSurface"
click erosionfront.geomorphic.surface.SurfaceMethods href "" "erosionfront.geomorphic.surface.SurfaceMethods"
Synthesize a very simple straight line surface.
Attributes¶
Modifies x,z atributes.
See Methods parent class for more details.
-
Python package
geomorphic
choose_surface
- Python package
Methods:
-
__post_init__–Generate x and z arrays for the surface.
-
get_points_xz–Stack x,z arrays of N points into a single (N,2) array.
__post_init__
¶
Generate x and z arrays for the surface.
Attributes¶
Uses model parameter attributes and modifies x,z array attributes.
Source code in erosionfront/geomorphic/surface.py
ErrorFunctionSurface
dataclass
¶
ErrorFunctionSurface(
type: str = "",
label: str = "",
n_pts: int = 1001,
height: float = 1,
steepness: float = 10,
x_left: float = -1,
x_right: float = +1,
x_center: float = 0,
do_anchor_ends: bool = True,
x: NDArray | None = None,
z: NDArray | None = None,
trend: float = 0,
)
flowchart TD
erosionfront.geomorphic.surface.ErrorFunctionSurface[ErrorFunctionSurface]
erosionfront.geomorphic.surface.SurfaceMethods[SurfaceMethods]
erosionfront.geomorphic.surface.SurfaceMethods --> erosionfront.geomorphic.surface.ErrorFunctionSurface
click erosionfront.geomorphic.surface.ErrorFunctionSurface href "" "erosionfront.geomorphic.surface.ErrorFunctionSurface"
click erosionfront.geomorphic.surface.SurfaceMethods href "" "erosionfront.geomorphic.surface.SurfaceMethods"
Synthesize a smoothed-step surface profile using an error function.
Parameters¶
gradient: float = 0 do_anchor_ends: bool = True
Attributes¶
Set by parameters.
-
Python package
geomorphic
choose_surface
- Python package
Methods:
-
__post_init__–Generate x and z arrays for the model surface.
-
get_points_xz–Stack x,z arrays of N points into a single (N,2) array.
-
shape_fn–Compute z(x) value(s) for a error-function surface profile.
__post_init__
¶
Generate x and z arrays for the model surface.
Attributes¶
Uses model parameter attributes and modifies x,z array attributes.
Source code in erosionfront/geomorphic/surface.py
get_points_xz
¶
shape_fn
staticmethod
¶
Compute z(x) value(s) for a error-function surface profile.
Parameters¶
x: float | NDArray x0: float s: float t: float
Returns¶
float | NDArray: Array (or single value) for z(x) for erf-type step function.
Source code in erosionfront/geomorphic/surface.py
SemiCircularArcSurface
dataclass
¶
SemiCircularArcSurface(
type: str = "",
label: str = "",
n_pts: int = 1001,
height: float = 1,
steepness: float = 10,
x_left: float = -1,
x_right: float = +1,
x_center: float = 0,
do_anchor_ends: bool = True,
x: NDArray | None = None,
z: NDArray | None = None,
)
flowchart TD
erosionfront.geomorphic.surface.SemiCircularArcSurface[SemiCircularArcSurface]
erosionfront.geomorphic.surface.SurfaceMethods[SurfaceMethods]
erosionfront.geomorphic.surface.SurfaceMethods --> erosionfront.geomorphic.surface.SemiCircularArcSurface
click erosionfront.geomorphic.surface.SemiCircularArcSurface href "" "erosionfront.geomorphic.surface.SemiCircularArcSurface"
click erosionfront.geomorphic.surface.SurfaceMethods href "" "erosionfront.geomorphic.surface.SurfaceMethods"
Synthesize a circular arc surface.
Attributes¶
Modifies x,z atributes.
See Methods parent class for more details.
-
Python package
geomorphic
choose_surface
- Python package
Methods:
-
__post_init__–Generate x and z arrays for the surface.
-
get_points_xz–Stack x,z arrays of N points into a single (N,2) array.
__post_init__
¶
Generate x and z arrays for the surface.
Attributes¶
Uses model parameter attributes and modifies x,z array attributes.
Source code in erosionfront/geomorphic/surface.py
QuarterCircularArcSurface
dataclass
¶
QuarterCircularArcSurface(
type: str = "",
label: str = "",
n_pts: int = 1001,
height: float = 1,
steepness: float = 10,
x_left: float = -1,
x_right: float = +1,
x_center: float = 0,
do_anchor_ends: bool = True,
x: NDArray | None = None,
z: NDArray | None = None,
)
flowchart TD
erosionfront.geomorphic.surface.QuarterCircularArcSurface[QuarterCircularArcSurface]
erosionfront.geomorphic.surface.SurfaceMethods[SurfaceMethods]
erosionfront.geomorphic.surface.SurfaceMethods --> erosionfront.geomorphic.surface.QuarterCircularArcSurface
click erosionfront.geomorphic.surface.QuarterCircularArcSurface href "" "erosionfront.geomorphic.surface.QuarterCircularArcSurface"
click erosionfront.geomorphic.surface.SurfaceMethods href "" "erosionfront.geomorphic.surface.SurfaceMethods"
Synthesize a circular arc surface.
Attributes¶
Modifies x,z atributes.
See Methods parent class for more details.
-
Python package
geomorphic
choose_surface
- Python package
Methods:
-
__post_init__–Generate x and z arrays for the surface.
-
get_points_xz–Stack x,z arrays of N points into a single (N,2) array.
__post_init__
¶
Generate x and z arrays for the surface.
Attributes¶
Uses model parameter attributes and modifies x,z array attributes.
Source code in erosionfront/geomorphic/surface.py
choose_surface
¶
choose_surface(
parameters: dict,
) -> (
StraightLineSurface
| ErrorFunctionSurface
| SemiCircularArcSurface
| QuarterCircularArcSurface
)
Choose initial surface function.
Parameters¶
dict:
Dictionary of keyword arguments to be passed to instantiate
a surface class. Choice of surface type is specified in
the parameters['type'] element.
Returns¶
StraightLineSurface | ErrorFunctionSurface | SemiCircularArcSurface | QuarterCircularArcSurface:
One of these surface function classes.
Instantiation takes **parameters as keyword arguments.