from skued import diffread, autocenter
import matplotlib.pyplot as plt

im = diffread('data/Cr_1.tif')

mask = np.ones_like(im, dtype = bool)
mask[0:1250, 975:1225] = False

# Reduce size of images because of memory usage of ReadTheDocs
im = im[::3, ::3]
mask = mask[::3, ::3]

rc, cc = autocenter(im, mask=mask)

fig, ax1 = plt.subplots(figsize = (4.5, 4.5))
ax1.imshow(im, vmin = 0, vmax = 200, cmap='inferno')
ax1.scatter(cc, rc, color='r')

ax1.get_xaxis().set_visible(False)
ax1.get_yaxis().set_visible(False)

plt.tight_layout()
plt.show()