Updated get_XANES Method