seabirdfilehandler.cast_borders module
- seabirdfilehandler.cast_borders.get_cast_borders(pressure_array, downcast_only=True, window=50, polyorder=3)[source]
Gets the borders of a given cast.
- Return type:
dict
- seabirdfilehandler.cast_borders.get_downcast_end(pressure, down_cast_start, min_descent_rate=0.01)[source]
Gets the downcast end of a given cast, accounting for heave due to waves. Returns the index of the highest pressure where the descent rate is below min_descent_rate.
- Return type:
int
Parameters:
- pressurenp.ndarray
The pressure array.
- down_cast_startint
The index where the downcast starts.
- windowint, optional
The window size for the Savitzky-Golay filter.
- polyorderint, optional
The polynomial order for the Savitzky-Golay filter.
- min_descent_ratefloat, optional
The minimum descent rate to consider as still descending.
Returns:
: The index of the end of the downcast.
- seabirdfilehandler.cast_borders.get_downcast_start(pressure, min_ascent_rate=0.01, min_sustained_points=5)[source]
Gets the downcast start of a given cast, removing soaking/waiting time. Returns the index where the CTD begins to continuously move downward.
- Return type:
int
Parameters:
- pressurenp.ndarray
The pressure array.
- windowint, optional
The window size for the Savitzky-Golay filter.
- polyorderint, optional
The polynomial order for the Savitzky-Golay filter.
- min_ascent_ratefloat, optional
The minimum ascent rate to consider as the start of descent.
- min_sustained_pointsint, optional
The number of consecutive points with increasing pressure to confirm the start.
Returns:
: The index of the start of the downcast.