Grazing incidence synchrotron x-ray diffraction method for analyzing thin films