The characterization of gratings using the optical scatterometer