lsforce.lstrajectory module
- class lsforce.lstrajectory.LSTrajectory(force, mass=None, target_length=None, start=None, duration=None, detrend_velocity=None, zeroacc=None)[source]
Bases:
object
Class for force inversion derived trajectories.
- jackknife
Jackknifed trajectory results
- Type:
- acceleration
[m^2/s] Computed acceleration with Z, E, N components as attributes
- Type:
- velocity
[m/s] Computed velocity with Z, E, N components as attributes
- Type:
- displacement
[m] Computed displacement with Z, E, N components as attributes
- Type:
Create an LSTrajectory object.
- Parameters:
force (
LSForce
) – Completed force inversionmass (int or float) – [kg] Mass of event. If None, the mass is computed using target_length, which must be specified
target_length (int or float) – [km] Center-of-mass runout length of event. If None, mass must be specified
start (int or float) – [s] If not None, only use the force time series from start seconds in the trajectory calculation
duration (int or float) – [s] If not None, only use the force time series from 0–duration seconds in the trajectory calculation
detrend_velocity – [s] If provided, require the velocity to linearly go to zero at this time; if None, don’t detrend
zeroacc – [s] If provided, require the acceleration to be zero after this time, usually when forces are indistinguishable from zero, to reduce noise at end of trajectory. This is best used with the detrend_velocity option to avoid allowing the landslide to slide forever.
- plot_trajectory(elevation_profile=False, plot_jackknife=False, image=None, dem=None, reference_point=None)[source]
Plot trajectory results with context.
- Parameters:
elevation_profile (bool) – If True, plot vertical displacement versus horizontal runout distance (\(H\) vs. \(L\)) instead of a map view
plot_jackknife (bool) – Toggle plotting jackknifed displacements as well (if available)
image (
DataArray
) – An image with coordinates defined in km with the origin (0, 0) being the start location of the trajectorydem (str) – A UTM-projected DEM GeoTIFF to slice thru for elevation profile plot
reference_point (int or float or list) – If not None, plot a dot on trajectory, and line on colorbar, at this specified time(s) for reference
- Returns:
Output figure handle
- Return type: