Patent ID: 8666665

Claim:
A computer-implemented method of generating reference spectra, comprising: polishing a first substrate in a polishing apparatus; measuring a first sequence of spectra from the first substrate during polishing with an in-situ optical monitoring system; for each spectrum in the first sequence of spectra, determining a best matching reference spectrum from a first set of reference spectra to generate a first sequence of reference spectra, the first set of reference spectra including a first plurality of reference spectra of a first library generated prior to polishing of the first substrate; calculating a value of a metric of fit of the first sequence of spectra to the first sequence of reference spectra; comparing the value of the metric of fit to a threshold value and determining whether to generate a second library based on the comparison; prior to polishing a second substrate, if the second library is determined to be generated, storing the first sequence of spectra as a second plurality of reference spectra; polishing a second substrate in the polishing apparatus; measuring a second sequence of spectra from the second substrate during polishing with the in-situ monitoring system; and for each spectrum in the second sequence of spectra, determining a best matching reference spectrum from a second set of reference spectra to generate a second sequence of reference spectra, the second set of reference spectra including the second plurality of reference spectra.