@@ -345,6 +345,9 @@ def _fit_circle_path(self):
345
345
c_x , c_y = proj (self .lon , self .lat )
346
346
try :
347
347
centlon_e , centlat_e , eddy_radius_e , aerr = fit_circle_c (c_x , c_y )
348
+ centlon_e , centlat_e = proj (centlon_e , centlat_e , inverse = True )
349
+ centlon_e = (centlon_e - lon_mean + 180 ) % 360 + lon_mean - 180
350
+ self ._circle_params = centlon_e , centlat_e , eddy_radius_e , aerr
348
351
except ZeroDivisionError :
349
352
# Some time, edge is only a dot of few coordinates
350
353
if len (unique (self .lon )) == 1 and len (unique (self .lat )) == 1 :
@@ -353,10 +356,6 @@ def _fit_circle_path(self):
353
356
self .lat )
354
357
self ._circle_params = 0 , - 90 , nan , nan
355
358
356
- centlon_e , centlat_e = proj (centlon_e , centlat_e , inverse = True )
357
- centlon_e = (centlon_e - lon_mean + 180 ) % 360 + lon_mean - 180
358
- self ._circle_params = centlon_e , centlat_e , eddy_radius_e , aerr
359
-
360
359
BasePath .fit_circle = fit_circle_path
361
360
BasePath ._fit_circle_path = _fit_circle_path
362
361
@@ -369,8 +368,6 @@ def collection_loop(contours, grd, rtime, eddy,
369
368
if eddy .diagnostic_type not in ['Q' , 'SLA' ]:
370
369
raise Exception ('Unknown Diagnostic : %s' % eddy .diagnostic_type )
371
370
372
- has_ts = False
373
-
374
371
sign_type = eddy .sign_type
375
372
anticyclonic_search = 'Anticyclonic' in sign_type
376
373
iterator = 1 if anticyclonic_search else - 1
@@ -547,8 +544,8 @@ def collection_loop(contours, grd, rtime, eddy,
547
544
contlon_s , contlat_s ,
548
545
fixed_size = eddy .track_array_variables_sampling )
549
546
550
- if not has_ts : # for AVISO
551
- eddy .update_eddy_properties (properties )
547
+ # for AVISO
548
+ eddy .update_eddy_properties (properties )
552
549
553
550
# Mask out already found eddies
554
551
eddy .sla [eddy .slice_j , eddy .slice_i ][
0 commit comments