@@ -87,12 +87,8 @@ def eddy_id(args=None):
87
87
parser .add_argument ("--height_unit" , default = None , help = "Force height unit" )
88
88
parser .add_argument ("--speed_unit" , default = None , help = "Force speed unit" )
89
89
parser .add_argument ("--unregular" , action = "store_true" , help = "if grid is unregular" )
90
- parser .add_argument (
91
- "--sampling" ,
92
- default = 50 ,
93
- type = int ,
94
- help = "Array size used to build contour, first and last point will be the same" ,
95
- )
90
+ help = "Array size used to build contour, first and last point will be the same"
91
+ parser .add_argument ("--sampling" , default = 50 , type = int , help = help )
96
92
parser .add_argument (
97
93
"--sampling_method" ,
98
94
default = "visvalingam" ,
@@ -103,14 +99,20 @@ def eddy_id(args=None):
103
99
help = "Output will be wrote in zarr"
104
100
parser .add_argument ("--zarr" , action = "store_true" , help = help )
105
101
help = "Indexs to select grid : --indexs time=2, will select third step along time dimensions"
102
+ parser .add_argument ("--indexs" , nargs = "*" , help = help , action = DictAction )
103
+ help = "Number of pixel of grid detection which could be in an eddies, you must specify MIN and MAX."
106
104
parser .add_argument (
107
- "--indexs" ,
108
- nargs = "*" ,
109
- help = help ,
110
- action = DictAction ,
105
+ "--pixel_limit" , nargs = "+" , default = (5 , 2000 ), type = int , help = help
111
106
)
107
+ help = "Minimal number of amplitude in number of step"
108
+ parser .add_argument ("--nb_step_min" , default = 2 , type = int , help = help )
112
109
args = parser .parse_args (args ) if args else parser .parse_args ()
113
110
111
+ if len (args .pixel_limit ) != 2 :
112
+ raise Exception (
113
+ "You must define two value minimal number of pixel and maximal number of pixel"
114
+ )
115
+
114
116
cut_wavelength = args .cut_wavelength
115
117
nb_cw = len (cut_wavelength )
116
118
if nb_cw > 2 or nb_cw == 0 :
@@ -123,10 +125,11 @@ def eddy_id(args=None):
123
125
kwargs = dict (
124
126
step = args .isoline_step ,
125
127
shape_error = args .fit_errmax ,
126
- pixel_limit = ( 5 , 2000 ) ,
128
+ pixel_limit = args . pixel_limit ,
127
129
force_height_unit = args .height_unit ,
128
130
force_speed_unit = args .speed_unit ,
129
131
nb_step_to_be_mle = 0 ,
132
+ nb_step_min = args .nb_step_min ,
130
133
)
131
134
132
135
a , c = identification (
0 commit comments