Real Space Green's Function Approach to RIXS