# Generated by pandoc-plot 1.8.0
import matplotlib.pyplot as plt
import numpy as np

np.random.seed(2019)

from skued import diffread, autocenter
from pathlib import Path

im = diffread(Path("images") / "autocenter" / "ewald_walkoff.tif")
mask = diffread(Path("images") / "autocenter" / "ewald_walkoff_mask.tif")

fig, ax = plt.subplots(1, 1, figsize=(3,3))

r, c = autocenter(im=im, mask=mask)
ax.imshow(im, vmin=0, vmax=1400, cmap='inferno')
ax.scatter(c, r, color='r')
ax.axhline(y=r, linestyle='dashed', linewidth=1, color='w')
ax.axvline(x=c, linestyle='dashed', linewidth=1, color='w')
ax.axis('off')

plt.tight_layout()
Click here to see how this plot was generated.