3.12. cpforager.processing.add_dive
- cpforager.processing.add_dive(df, params)
Add to the dataframe an additional
dive
column that gives the dive id number.- Parameters:
df (pandas.DataFrame) – dataframe with
datetime
anddepth
columns.params (dict) – parameters dictionary.
- Returns:
the dataframe with an additional
dive
column that gives the dive id number.- Return type:
pandas.DataFrame
The idea is to segment the full recording of pressure in foraging dives by labelling every measure with a dive id.
Note
The required fields in the parameters dictionary are
diving_depth_threshold
anddive_min_duration
.