scarplet.WindowedTemplate module

Class for windowed template matching over a spatial grid

class scarplet.WindowedTemplate.Channel(d, f, alpha, nx, ny, de)[source]

Bases: scarplet.WindowedTemplate.Ricker

Duplicate class for Ricker wavelet used for fluvial channels

Methods

template() Template function for windowed Ricker wavelet
get_coordinates  
get_mask  
get_window_limits  
class scarplet.WindowedTemplate.Crater(r, kt, nx, ny, de)[source]

Bases: scarplet.WindowedTemplate.WindowedTemplate

Template for radially symmetric crater

Attributes:
r : float

Radius of crater in pixels

kt : float

Morphologic age of template crater rim in m2

nx : int

Number of columns in template array

ny : int

Number of rows in template array

de : float

Spacing of template grid cells in dat projection units

Methods

template() Template function for radially symmetric crater
get_coordinates  
get_mask  
get_window_limits  
template()[source]

Template function for radially symmetric crater

Returns:
W : numpy array

Windowed template function

class scarplet.WindowedTemplate.LeftFacingUpperBreakScarp(d, kt, alpha, nx, ny, de)[source]

Bases: scarplet.WindowedTemplate.Scarp

Template for upper slope break of vertical scarp (left-facting)

Attributes:
d : float

Scale of windowed template function in data projection units

alpha : float

Orientation of windowed template function in radians

kt : float

Morphologic age of template in m2

nx : int

Number of columns in template array

ny : int

Number of rows in template array

de : float

Spacing of template grid cells in dat projection units

Methods

get_error_mask(): Return mask array that masks the lower slope break of scarp
get_err_mask()[source]

Return mask array masking the lower half of scarp

Returns:
mask : numpy array

Mask array for lower hald of scarp

class scarplet.WindowedTemplate.Ricker(d, f, alpha, nx, ny, de)[source]

Bases: scarplet.WindowedTemplate.WindowedTemplate

Template using 2D Ricker wavelet

References

This implements a Ricker wavelet similar to thet used in the following work

Lashermes, B., Foufoula‐Georgiou, E., and Dietrich, W. E., 2007, Channel network extraction from high resolution topography using wavelets. Geophysical Research Letters, 34(23). https://doi.org/10.1029/2007GL031140

Attributes:
d : float

Scale of windowed template function in data projection units

alpha : float

Orientation of windowed template function in radians

kt : float

Morphologic age of template in m2

nx : int

Number of columns in template array

ny : int

Number of rows in template array

de : float

Spacing of template grid cells in dat projection units

Methods

template(): Returns array of windowed template function
get_window_limits()[source]
template()[source]

Template function for windowed Ricker wavelet

Returns:
W : numpy array

Windowed template function

class scarplet.WindowedTemplate.RightFacingUpperBreakScarp(d, kt, alpha, nx, ny, de)[source]

Bases: scarplet.WindowedTemplate.Scarp

Template for upper slope break of vertical scarp (right-facting)

Overrides template function to correct facign direction

Attributes:
d : float

Scale of windowed template function in data projection units

alpha : float

Orientation of windowed template function in radians

kt : float

Morphologic age of template in m2

nx : int

Number of columns in template array

ny : int

Number of rows in template array

de : float

Spacing of template grid cells in dat projection units

Methods

get_error_mask(): Return mask array that masks the lower slope break of scarp
template(): Returns array of windowed template function
get_err_mask()[source]

Return mask array masking the lower half of scarp

Returns:
mask : numpy array

Mask array for lower half of scarp

template()[source]

Return template function (uses numexpr where possible)

Returns:
W : numpy array

Windowed template function

class scarplet.WindowedTemplate.Scarp(d, kt, alpha, nx, ny, de)[source]

Bases: scarplet.WindowedTemplate.WindowedTemplate

Curvature template for vertical scarp

References

Adapted from template derived in

Hilley, G.E., DeLong, S., Prentice, C., Blisniuk, K. and Arrowsmith, J.R., 2010. Morphologic dating of fault scarps using airborne laser swath mapping (ALSM) data. Geophysical Research Letters, 37(4). https://dx.doi.org/10.1029/2009GL042044

Based on solutions to the diffusion equation published in

Hanks, T.C., 2000. The age of scarplike landforms from diffusion‐equation analysis. Quaternary geochronology, 4, pp.313-338.

and many references therein.

Attributes:
d : float

Scale of windowed template function in data projection units

alpha : float

Orientation of windowed template function in radians

kt : float

Morphologic age of template in m2

nx : int

Number of columns in template array

ny : int

Number of rows in template array

de : float

Spacing of template grid cells in dat projection units

Methods

template(): Returns array of windowed template function
template_numexpr(): Returns array of windowed template function optimized using numexpr
template()[source]

Return template function

Returns:
W : numpy array

Windowed template function

template_numexpr()[source]

Return template function (uses numexpr where possible)

Returns:
W : numpy array

Windowed template function

class scarplet.WindowedTemplate.ShiftedLeftFacingUpperBreakScarp(*args, **kwargs)[source]

Bases: scarplet.WindowedTemplate.ShiftedTemplateMixin, scarplet.WindowedTemplate.LeftFacingUpperBreakScarp

Methods

get_err_mask() Return mask array masking the lower half of scarp
set_offset(dx, dy) Set offset values
shift_template(W, dx, dy) Shift template
template() Template function for shifted template
template_numexpr() Return template function (uses numexpr where possible)
get_coordinates  
get_mask  
get_window_limits  
class scarplet.WindowedTemplate.ShiftedRightFacingUpperBreakScarp(*args, **kwargs)[source]

Bases: scarplet.WindowedTemplate.ShiftedTemplateMixin, scarplet.WindowedTemplate.RightFacingUpperBreakScarp

Methods

get_err_mask() Return mask array masking the lower half of scarp
set_offset(dx, dy) Set offset values
shift_template(W, dx, dy) Shift template
template() Template function for shifted template
template_numexpr() Return template function (uses numexpr where possible)
get_coordinates  
get_mask  
get_window_limits  
class scarplet.WindowedTemplate.ShiftedTemplateMixin(*args, **kwargs)[source]

Bases: scarplet.WindowedTemplate.WindowedTemplate

Mix-in for template that is offset from the window center

Overrides template function to shift template

Attributes:
d : float

Scale of windowed template function in data projection units

alpha : float

Orientation of windowed template function in radians

kt : float

Morphologic age of template in m2

nx : int

Number of columns in template array

ny : int

Number of rows in template array

de : float

Spacing of template grid cells in dat projection units

dx : float

X Offset of template center in data projection units

dy : float

Y Offset of template center data projection units

Methods

set_offset(dx, dy): Set offset attrivutes t odx and dy
shift_template(W, dx, dy): Shift template array W by dx and dy
template(): Returns array of windowed template function
set_offset(dx, dy)[source]

Set offset values

Parameters:
dx : float

X Offset of template center in data projection units

dy : float

Y Offset of template center data projection units

shift_template(W, dx, dy)[source]

Shift template

Parameters:
W : numpy array

Windowed template function

dx : float

X Offset of template center in data projection units

dy : float

Y Offset of template center data projection units

Returns:
W : numpy array

Shifted windowed template function

template()[source]

Template function for shifted template

Returns:
W : numpy array

Shifted windowed template function

class scarplet.WindowedTemplate.WindowedTemplate[source]

Bases: object

Base class for windowed template function

Attributes:
d : float

Scale of windowed template function in data projection units

alpha : float

Orientation of windowed template function in radians

c : float

Curvature limit of template

nx : int

Number of columns in template array

ny : int

Number of rows in template array

de : float

Spacing of template grid cells in dat projection units

Methods

get_coordinates(): Get arrays of coordinates for template grid points
get_mask(): Get mask array giving curvature extent of template window
get_window_limits(): Get mask array giving window extent
get_coordinates()[source]
get_mask()[source]
get_window_limits()[source]