Quantitative spectrographic analysis of the rare earth elements—IX. Determination of rare earth impurities commonly associated with purified samarium, gadolinium, terbium, and yttrium