Before my first year at Cornell, during the summer of 2002, I worked at Albany NanoTech testing micro-fabricated diffraction gratings. These were patterned SiO2 glass transmission gratings, periodic in 2 dimensions. To characterize these gratings, a HeNe laser beam was passed through the gratings and diffraction pattern was measured on an optical table with a power meter. This provided the geometric information and intensities of the diffraction peaks.
Since each of these diffraction gratings had a unique design (spacing of periodic structures, overlapping periodic structures, etc.), I wrote software to numerically simulate the diffraction patterns and intensities that these gratings should produce. This allowed us to compare the optical table measurements of these gratings to the diffraction patters that were expected from their design geometries.