hybrid_jp.shock module#

class hybrid_jp.shock.ChangePoints(shock_index: 'list[int]', change_points: 'list[list[int]]')[source]#

Bases: object

change_points: list[list[int]]#
shock_index: list[int]#
class hybrid_jp.shock.ChangePointsXResult(shock_index: 'int', change_points: 'list[int]')[source]#

Bases: object

change_points: list[int]#
shock_index: int#
class hybrid_jp.shock.MovingAvgResult(t: 'np.ndarray', shock: 'np.ndarray', start_STR: 'np.ndarray', end_STR: 'np.ndarray')[source]#

Bases: object

end_STR: ndarray#
shock: ndarray#
start_STR: ndarray#
t: ndarray#
class hybrid_jp.shock.Shock(sdfs: 'list[Path]', skip: 'int', boundary_buffer: 'int', grid: 'Grid', mid_grid: 'Grid', deck: 'Deck')[source]#

Bases: object

boundary_buffer: int#
deck: Deck#
grid: Grid#
mid_grid: Grid#
sdfs: list[pathlib.Path]#
skip: int#
property t: ndarray#
hybrid_jp.shock.extrapolate_to_larger_arr(original_t: ndarray, changes: MovingAvgResult) MovingAvgResult[source]#

Remap the changes to the original time.

Note

since bounds of original_t are necessarily outside of changes.t, the values are extrapolated.

Parameters:
  • original_t (np.ndarray) – original time.

  • changes (MovingAverageResult) – changes to remap.

Returns:

remapped changes.

Return type:

MovingAverageResult

hybrid_jp.shock.get_change_points_x(path_to_sdf: Path, trim_x: slice) ChangePointsXResult[source]#
hybrid_jp.shock.load(folder: Path, skip_at_start: int = 0) Shock[source]#
hybrid_jp.shock.memory_clear()[source]#
hybrid_jp.shock.moving_avg(shock: Shock, changes: ChangePoints) MovingAvgResult[source]#
hybrid_jp.shock.shock_and_changes(shock: Shock, trim: slice)[source]#