Measurement of oxygen and nitrogen profiles in steel