Synchrotron-based impurity mapping