update images for all objects
This commit is contained in:
@@ -384,9 +384,9 @@ def get_error(data_array, sub_shape=(15,15), display=False, headers=None,
|
||||
minima = np.unravel_index(np.argmin(temp.sum(axis=0)),temp.shape[1:])
|
||||
|
||||
for i, image in enumerate(data):
|
||||
rectangle[i] = minima[1], minima[0], sub_shape[0], sub_shape[1]
|
||||
rectangle[i] = minima[1], minima[0], sub_shape[1], sub_shape[0]
|
||||
# Compute error : root mean square of the background
|
||||
sub_image = image[minima[1]:minima[1]+sub_shape[0],minima[0]:minima[0]+sub_shape[1]]
|
||||
sub_image = image[minima[0]:minima[0]+sub_shape[0],minima[1]:minima[1]+sub_shape[1]]
|
||||
#error = np.std(sub_image) # Previously computed using standard deviation over the background
|
||||
error = np.sqrt(np.sum(sub_image**2)/sub_image.size)
|
||||
error_array[i] *= error
|
||||
|
||||
Reference in New Issue
Block a user