X-ray diffraction techniques for thin films