shock.py¶
ChangepointMethods
¶
flowchart TD
erosionfront.levelset.shock.ChangepointMethods[ChangepointMethods]
click erosionfront.levelset.shock.ChangepointMethods href "" "erosionfront.levelset.shock.ChangepointMethods"
ruptures package changepoint method choices.
-
Python package
levelset
choose_changepoint_method
- Python package levelset
choose_changepoint_method
¶
choose_changepoint_method(method: str = 'Binseg') -> ChangepointMethods
ruptures package changepoint method selector.
Parameters¶
method: str="Binseg" One of "Pelt", "Window", "Binseg".
Returns¶
ChangepointMethods:
One of the enumerated set of methods: PELT, WINDOW, BINSEG.
Source code in erosionfront/levelset/shock.py
ShocksMixin
¶
Mixin providing shock (break-in-slope) detection methods.
Parameters¶
T_slices: dict All the time-sliced surfaces (x,z coordinate arrays).
Methods:
-
find_shock–Locate main break-in-slope by smoothing & changepoint detection.
-
find_shocks–Find breaks-in-slope in the set of T-sliced surfaces.
find_shock
¶
find_shock(
i_step: int,
method: ChangepointMethods = BINSEG,
i_max: int = 300,
n_filterwidth: int = 50,
which_changepoint: int = 1,
do_plot: bool = False,
) -> tuple[float, float]
Locate main break-in-slope by smoothing & changepoint detection.
Parameters¶
i_step: int
method: ChangepointMethods=ChangepointMethods.BINSEG
i_max: int=300
n_filterwidth: int=50
which_changepoint: int=1
do_plot: bool=False
Returns¶
tuple[float, float]: x, z coordinate of break-in-slope shock changepoint.
Source code in erosionfront/levelset/shock.py
find_shocks
¶
find_shocks(
method: ChangepointMethods = BINSEG,
subset: slice = s_[100:1000:50],
i_max: int = 1000,
n_filterwidth: int = 50,
which_changepoint=0,
i_plot: int = 200,
i_plot_offset: int = 50,
) -> None
Find breaks-in-slope in the set of T-sliced surfaces.
Parameters¶
method: ChangepointMethods=ChangepointMethods.BINSEG
subset: slice=np.s_[100:1000:50]
i_max: int=1000
n_filterwidth: int=50
which_changepoint=0,
i_plot: int=200
i_plot_offset: int=50
Attributes¶
Modifies shocks_xz with estimated locations of breaks-in-slope.