py_eddy_tracker.eddy_feature.Contours¶
- 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 SSH
- eddy:
A tracklist object holding the SSH data
- grd:
A grid object
c_i : index to contours l_i : index to levels
Methods
Display contour
Get index from the nearest path in the level, if the bbox of the path contain pt
Select contour containing several eddies
Attributes
- DELTA_PREC = 1e-10¶
- DELTA_SUP = 0.01¶
- contour_index¶
- contours¶
- property cvalues¶
- display(ax, step=1, only_used=False, only_unused=False, only_contain_eddies=False, display_criterion=False, field=None, bins=None, cmap='Spectral_r', **kwargs)[source]¶
Display contour
- Parameters:
ax (matplotlib.axes.Axes) –
step (int) – display only contour every step
only_used (bool) – display only contour used in an eddy
only_unused (bool) – display only contour unused in an eddy
only_contain_eddies (bool) – display only contour which enclosed an eddiy
display_criterion (bool) –
display only unused contour with criterion color
Accepted (green)
Reject for shape error (red)
Masked value in contour (blue)
Under or over pixel limit bound (black)
Amplitude criterion (yellow)
field (str) – Must be ‘shape_error’, ‘x’, ‘y’ or ‘radius’. If defined display_criterion is not use. bins argument must be defined
bins (array) – bins used to colorize contour
cmap (str) – Name of cmap for field display
kwargs (dict) – look at
matplotlib.collections.LineCollection()
Eddy detection : MedEddy detection : Gulf streamEddy detection : Antartic Circumpolar Current
Eddy detection : Antartic Circumpolar Current
- 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??
- level_index¶
- property 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¶