Specfun: off-diagonal elements electron-phonon self-energy

Dear all,

for the spectral function the self-energy is taken as diagonal in nn’. Giustino’s El-Ph paper notes that

[quote:2u7t51d0] […] we are considering for simplicity non-degenerate electronic states, and making the assumption that the off-diagonal elements of the self-energy can be neglected. In more general situations the right-hand side of Eq. (163) needs to be to diagonalized, or alternatively the off-diagonal terms need to be treated perturbatively.[/quote:2u7t51d0]

I was browsing through the code and I was wondering if EPW checks for the magnitude of the off-diagonal elements at some point (as I would be interested in see if in some cases these are large or small)?

specfun has in the header
[quote:2u7t51d0] !! We take the trace of the spectral function to simulate the photoemission
!! intensity. I do not consider the c-axis average for the time being.
!! The main approximation is constant dipole matrix element and diagonal
!! selfenergy. The diagonality can be checked numerically. [/quote:2u7t51d0]

But I do not see where this is done (I blame my very rusty Fortran)…

If someone could point to me how/where this is (or could be) evaluated I would be very grateful!

Thank you all in advance for your support!

Chris