1. A method of measuring a characteristic of a sample using light that interacts with the sample and is detected from which data is collected, the method comprising: collecting data from the sample at a plurality of focal positions; determining a peak value based on the collected data; and determining the characteristic of the sample based on the peak value, wherein the light is polychromatic light, the collected data is spectral data, and determining a peak value comprises determining a peak value for each of a plurality of wavelengths in the polychromatic light based on the collected spectral data, the method further comprising generating a spectrum using the determined peak value for each of the plurality of wavelengths, and wherein determining the characteristic of the sample based on the peak value comprises determining the characteristic of the sample based on the generated spectrum.