airbornegeo.split_into_segments

airbornegeo.split_into_segments#

split_into_segments(data, threshold, column_name, min_points_per_segment=0)[source]#

Split dataframe into segments where there is a gap in the supplied values greater than the threshold. Data are sorted by column β€˜unixtime’. The values are chosen with column_name, and could be quantities such as time in seconds, cumulative distances, or aircraft bearings.

Parameters:
  • data (DataFrame) – _description_

  • threshold (float) – _description_, by default None

  • column_name (str) – Name of column supplying to data.

  • min_points_per_segment (int) – Segments with fewer points are giving a segment id of NaN, by default 0

Returns:

A series with new new segments identified with integers

Return type:

Series