Single-shot measurement of nonlinear absorption and nonlinear refraction.