Optical characterization of periodic patterns in nematic liquid crystals