Characterization of quasi-phase-matching gratings in quadratic media through double-pass second-harmonic power measurements