I have this Green's function matrix $G^r= (E \mathbb{I} - \hat{H})^{-1}$ in the $|\textrm{site}\rangle\otimes|\textrm{orbital}\rangle\otimes|\textrm{spin}\rangle$ Hilbert space, and I am curious if there is a way to pull the density of states of the projection onto different quantum operators.
It would be easy to get the density of states for an operator within the same basis, say $S_z$, by simply summing up all of the $m = 1/2$ states and $m = -1/2$ states separately, instead of just taking $\frac{-1}{\pi}\textrm{Tr}(\textrm{Im}(G^r))$.
But I am curious if one could do more with the green's function to get the density of states of $S_x$, for example.
Any insight or resources would be appreciated!