Analysis of Ti:LiNbO3 waveguides using secondary ion mass spectrometry and near field method