Refractive index measurement and room-temperature self-frequency-doubled laser operation of the Nd:MgO:LiNbO3 crystal