Lanthanide doped strontium barium niobate: Optical spectroscopy and local structure at the impurity sites