@@ -475,6 +475,13 @@ def add_grid(self, varname, grid):
475
475
476
476
def grid (self , varname , indexs = None ):
477
477
"""give grid required
478
+
479
+ :param str varname: Variable to get
480
+ :param dict,None indexs: If defined dict must have dimensions name like key
481
+ :return: array asked reduce with indexs
482
+ :rtype: array
483
+
484
+ .. minigallery:: py_eddy_tracker.GridDataset.grid
478
485
"""
479
486
if indexs is None :
480
487
indexs = dict ()
@@ -578,7 +585,7 @@ def eddy_identification(
578
585
precision = None ,
579
586
force_height_unit = None ,
580
587
force_speed_unit = None ,
581
- mle = 1 ,
588
+ ** kwargs ,
582
589
):
583
590
"""
584
591
Compute eddy identification on specified grid
@@ -595,6 +602,7 @@ def eddy_identification(
595
602
:param float,None precision: Truncate value at the defined precision in m
596
603
:param str force_height_unit: Unit to used for height unit
597
604
:param str force_speed_unit: Unit to used for speed unit
605
+ :param dict kwargs: Argument give to amplitude
598
606
599
607
:return: Return a list of 2 elements: Anticyclone and Cyclone
600
608
:rtype: py_eddy_tracker.observations.observation.EddiesObservations
@@ -744,8 +752,8 @@ def eddy_identification(
744
752
data ,
745
753
anticyclonic_search = anticyclonic_search ,
746
754
level = self .contours .levels [corrected_coll_index ],
747
- step = step ,
748
- mle = mle ,
755
+ interval = step ,
756
+ ** kwargs ,
749
757
)
750
758
# If we have a valid amplitude
751
759
if (not amp .within_amplitude_limits ()) or (amp .amplitude == 0 ):
@@ -974,13 +982,7 @@ def _gaussian_filter(data, sigma, mode="reflect"):
974
982
975
983
@staticmethod
976
984
def get_amplitude (
977
- contour ,
978
- contour_height ,
979
- data ,
980
- anticyclonic_search = True ,
981
- level = None ,
982
- step = None ,
983
- mle = 1 ,
985
+ contour , contour_height , data , anticyclonic_search = True , level = None , ** kwargs
984
986
):
985
987
# Instantiate Amplitude object
986
988
amp = Amplitude (
@@ -990,17 +992,12 @@ def get_amplitude(
990
992
contour_height = contour_height ,
991
993
# All grid
992
994
data = data ,
993
- # Step by level
994
- interval = step ,
995
- # Set number max of local maxima
996
- mle = mle ,
995
+ ** kwargs ,
997
996
)
998
-
999
997
if anticyclonic_search :
1000
998
reset_centroid = amp .all_pixels_above_h0 (level )
1001
999
else :
1002
1000
reset_centroid = amp .all_pixels_below_h0 (level )
1003
-
1004
1001
return reset_centroid , amp
1005
1002
1006
1003
0 commit comments