python - find average shape from seed points -


i wondering if there way can take array of xy coordinates , find best fit shape those. example have circular map of angles ranging -90 90 in disk-like shape negative angles ring on outside, 0 in middle , positive toward inside. however, these not uniform or circular, , want able fit similar values shape. far have bit of code pluck out values close zero:

slicedim = 7 x = r_[61] y = r_[55] in range (61,140): j in range (55,131):      if fa[i,j,slicedim] < 0.2:         continue     if ha_array[i,j,slicedim] < 10 , ha_array[i,j,slicedim] > -10:         i_array = np.array([i])         j_array = np.array([j])         x = concatenate((x,i_array))         y = concatenate((y,j_array)) 

so have array of x , y values correlate zero. , far have been able use these values give best fit circle. , generate image:

fit circle

but can see more of oval shape. there make shape more accurately reflects data?


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

django - CSRF verification failed. Request aborted. CSRF cookie not set -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -