Stages in molecular beam epitaxy growth of GaAs nanowires studied by x-ray diffraction