updated get_XANES and DoConvolution