Radial and energy dependence of the dispersive contributions to the α + 16O and α + 40Ca potentials near the threshold anomaly