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

image = diffread('data/Cr_1.tif')
mask = auto_masking(image, threshold = 0.1)

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

fig , (ax1, ax2) = plt.subplots(1,2, figsize = (9,3))
ax1.imshow(image, vmin=0, vmax=150, cmap='inferno')
ax2.imshow(mask, vmin=0, vmax=1, cmap='inferno')

for ax in (ax1, ax2):
        ax.xaxis.set_visible(False)
        ax.yaxis.set_visible(False)

ax1.set_title('Cr_1')
ax2.set_title('Mask')

plt.tight_layout()
plt.show()