X-ray Diffraction and Scanning Probe Microscopy