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 and depth 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 and dive_min_duration.