Characterization of nonlinear optical parameters of polymethine dyes