X-ray powder diffraction for the measurement of microstructure and local strain effects