Crystal structure and optical properties of GaAs nanowires