@@ -475,6 +475,13 @@ def add_grid(self, varname, grid):
475475
476476 def grid (self , varname , indexs = None ):
477477 """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
478485 """
479486 if indexs is None :
480487 indexs = dict ()
@@ -578,7 +585,7 @@ def eddy_identification(
578585 precision = None ,
579586 force_height_unit = None ,
580587 force_speed_unit = None ,
581- mle = 1 ,
588+ ** kwargs ,
582589 ):
583590 """
584591 Compute eddy identification on specified grid
@@ -595,6 +602,7 @@ def eddy_identification(
595602 :param float,None precision: Truncate value at the defined precision in m
596603 :param str force_height_unit: Unit to used for height unit
597604 :param str force_speed_unit: Unit to used for speed unit
605+ :param dict kwargs: Argument give to amplitude
598606
599607 :return: Return a list of 2 elements: Anticyclone and Cyclone
600608 :rtype: py_eddy_tracker.observations.observation.EddiesObservations
@@ -744,8 +752,8 @@ def eddy_identification(
744752 data ,
745753 anticyclonic_search = anticyclonic_search ,
746754 level = self .contours .levels [corrected_coll_index ],
747- step = step ,
748- mle = mle ,
755+ interval = step ,
756+ ** kwargs ,
749757 )
750758 # If we have a valid amplitude
751759 if (not amp .within_amplitude_limits ()) or (amp .amplitude == 0 ):
@@ -974,13 +982,7 @@ def _gaussian_filter(data, sigma, mode="reflect"):
974982
975983 @staticmethod
976984 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
984986 ):
985987 # Instantiate Amplitude object
986988 amp = Amplitude (
@@ -990,17 +992,12 @@ def get_amplitude(
990992 contour_height = contour_height ,
991993 # All grid
992994 data = data ,
993- # Step by level
994- interval = step ,
995- # Set number max of local maxima
996- mle = mle ,
995+ ** kwargs ,
997996 )
998-
999997 if anticyclonic_search :
1000998 reset_centroid = amp .all_pixels_above_h0 (level )
1001999 else :
10021000 reset_centroid = amp .all_pixels_below_h0 (level )
1003-
10041001 return reset_centroid , amp
10051002
10061003
0 commit comments