DeepDive Class¶
The Dive class is used to encapsulate all the attriubtes of a dive from a
non-surfacing animal and the data needed to reconstruct a plot of the dive.
The at_depth_threshold defaults t0 0.15 which means anything below
85% of the relative depth of the dive is considered to be at depth.
-
class
DeepDive.DeepDive(data, columns={'depth': 'depth', 'time': 'time'}, at_depth_threshold=0.15)¶ Variables: - max_depth – the max depth in the dive
- min_depth – the max depth in the dive
- dive_start – the timestamp of the first point in the dive
- dive_end – the timestamp of the last point in the dive
- td_total_duration – a timedelta (in seconds since 1970-01-01) containing the duration of the dive
- depth_variance – the variance of the depth for the entire dive.
- average_vertical_velocity – the mean velocity of the animal over the entire dive with negative value indicating upward movement
- average_descent_velocity – the average velocity of any downward movement as positive value
- average_ascent_velocity – the average velocity of any upward movement as positive value
- number_of_descent_transitions – the number of times and animal moves descends any distance in the dive period
- number_of_ascent_transitions – the number of times and animal moves ascends any distance in the dive period
- total_descent_distance_traveled – the total absolute distance in meters in which the anaimal moves down
- total_ascent_distance_traveled – the total absolute distance in meters in which the anaimal moves up
- overall_change_in_depth – the difference between the minimum and maximum depth within the dive period
- td_time_at_depth – the duration in seconds at which the animal spends in the deepest part of the vertical movement (< 85% depth)
- td_time_pre_depth – the duration in seconds befor the deepest part of the vertical movement (< 85% depth)
- td_time_post_depth – the duration in seconds after the deepest part of the vertical movement (< 85% depth)
- peaks – the number of peaks found in the dive profile
- left_skew – a boolean of 1 or 0 indicating if the dive is left skewed
- right_skew – a boolean of 1 or 0 indicating if the dive is right skewed
- no_skew – a boolean of 1 or 0 indicating if the dive is not skewed
-
get_ascent_vertical_distance()¶ Returns: the total vertical distance travelled downwards in meters
-
get_average_ascent_velocity()¶ Returns: the average upwards velocity in m/s
-
get_average_descent_velocity()¶ Returns: the average downwards velocity in m/s
-
get_descent_vertical_distance()¶ Returns: the total vertical distance travelled upwards in meters
-
get_peaks()¶ Returns: number of peaks found within a dive
-
get_time_at_depth(at_depth_threshold=0.15)¶ Parameters: at_depth_threshold – a value from 0 - 1 indicating distance from the bottom of the dive at which the animal is considered to be at depth Returns: the duration at depth in seconds
-
get_time_post_depth(at_depth_threshold=0.15)¶ Parameters: at_depth_threshold – a value from 0 - 1 indicating distance from the bottom of the dive at which the animal is considered to be at depth Returns: the duration after depth in seconds
-
get_time_pre_depth(at_depth_threshold=0.15)¶ Parameters: at_depth_threshold – a value from 0 - 1 indicating distance from the bottom of the dive at which the animal is considered to be at depth Returns: the duration before depth in seconds
-
plot()¶ Returns: a plotly graph showing the phases of the dive
-
set_skew()¶ Sets the objects skew as left, right, or no skew
-
to_dict()¶ Returns: a dictionary of the dive profile