X ray absorption calculator