added function to correct for W impurity when analyzing for Ni and Cu K-ratios