Correcting for ray refraction in velocity and attenuation tomography: a perturbation approach.