Added transition dipole moment function