src.toolbox.steps.custom.find_profiles_beta#
Attributes#
Classes#
Functions#
|
Identifies and classifies vertical and horizontal profiles from depth-time data. |
Module Contents#
- src.toolbox.steps.custom.find_profiles_beta.find_profiles_beta(df_sorted, cadence, filter_win_sizes, gradient_thresholds, horiz_grad_thresh, edge_squeeze, dive_scale, max_depth_gap, min_horizontal_duration, min_horizontal_depth, depth_col)[source]#
Identifies and classifies vertical and horizontal profiles from depth-time data.
This function applies compound smoothing and velocity thresholds to classify vehicle movements into descending (+1), ascending (-1), horizontal (0), or turning (NaN) segments. Vertical profiles are identified first based on steep vertical velocities and depth spans. Unassigned data is then evaluated for horizontal profiles based on flatter velocities, minimum depth, and duration. Final profile IDs are assigned chronologically.
- Parameters:
df_sorted (pandas.DataFrame) – Time-indexed dataframe containing the depth measurements.
cadence (str) – Resampling frequency string (e.g., ’30s’) used to regularise the time series.
filter_win_sizes (list) – Two-element list defining the rolling median and mean window sizes.
gradient_thresholds (list) – [positive_threshold, negative_threshold] for vertical velocity bounds (m/s).
horiz_grad_thresh (float) – Maximum absolute velocity (m/s) to be considered a horizontal profile.
edge_squeeze (int) – Number of points to iteratively erode from the edges of turning regions.
dive_scale (float) – Minimum total vertical distance (m) required for a valid vertical profile.
max_depth_gap (float) – Maximum allowable depth gap (m) between consecutive points in a profile.
min_horizontal_duration (str) – Minimum time duration string (e.g., ‘20min’) for a horizontal profile.
min_horizontal_depth (float) – Minimum depth (m) required to evaluate a horizontal profile.
depth_col (str) – Name of the column containing depth or pressure data.
- Returns:
df_out (pandas.DataFrame) – Dataframe aligned to original indices with added ‘PROFILE_ID’, ‘DIRECTION’, and ‘GRADIENT’.
df (pandas.DataFrame) – The resampled and smoothed diagnostic dataframe.