Correlation between the optical loss and crystalline quality in erbium-doped GaN optical waveguides.