Eddy Features

py-eddy-tracker is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

py-eddy-tracker is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with py-eddy-tracker. If not, see <http://www.gnu.org/licenses/>.

Copyright (c) 2014-2020 by Evan Mason Email: evanmason@gmail.com ===========================================================================

class py_eddy_tracker.eddy_feature.Amplitude(contour, contour_height, data, interval)[source]

Bases: object

Class to calculate amplitude and counts of local maxima/minima within a closed region of a sea level anomaly field.

EPSILON = 1e-08
all_pixels_above_h0(level)[source]

Check CSS11 criterion 1: The SSH values of all of the pixels are above a given SSH threshold for anticyclonic eddies.

all_pixels_below_h0(level)[source]

Check CSS11 criterion 1: The SSH values of all of the pixels are below a given SSH threshold for cyclonic eddies.

amplitude
contour
grid_extract
h_0
interval_min
mle
nb_pixel
pixel_mask
sla
within_amplitude_limits()[source]

Need update

class py_eddy_tracker.eddy_feature.Contours(x, y, z, levels, wrap_x=False, keep_unclose=False)[source]

Bases: object

Class to calculate average geostrophic velocity along a contour, uavg, and return index to contour with maximum uavg within a series of closed contours.

Attributes:
contour:
A matplotlib contour object of high-pass filtered SLA
eddy:
A tracklist object holding the SLA data
grd:
A grid object

c_i : index to contours l_i : index to levels

DELTA_PREC = 1e-10
DELTA_SUP = 0.01
check_closing(path)[source]
contour_index
contours
cvalues
display(ax, step=1, only_used=False, only_unused=False, only_contain_eddies=False, **kwargs)[source]
find_wrapcut_path_and_join(x0, x1)[source]
get_index_nearest_path_bbox_contain_pt(level, xpt, ypt)[source]

Get index from the nearest path in the level, if the bbox of the path contain pt

overhead of python is huge with numba, cython little bit best??

get_next(origin, paths_left, paths_right)[source]
iter(start=None, stop=None, step=None)[source]
label_contour_unused_which_contain_eddies(eddies)[source]

Select contour which contain several eddies

level_index
levels
nb_contour_per_level
nb_pt_per_contour
x_max_per_contour
x_min_per_contour
x_value
y_max_per_contour
y_min_per_contour
y_value
py_eddy_tracker.eddy_feature.detect_local_minima_[source]

Take an array and detect the troughs using the local maximum filter. Returns a boolean mask of the troughs (i.e., 1 when the pixel’s value is the neighborhood maximum, 0 otherwise) http://stackoverflow.com/questions/3684484/peak-detection-in-a-2d-array/3689710#3689710

py_eddy_tracker.eddy_feature.index_from_nearest_path_with_pt_in_bbox_[source]

Get index from nearest path in edge bbox contain pt