Methods for determining the most likely composition of sample are
disclosed. The methods can include: obtaining data from a sample, where
the data includes a representation of a measured spectrum; determining a
precision state of the representation of the measured spectrum; providing
a plurality of library candidates; for each library candidate, providing
data representing each library candidate, where the data includes a
representation of a library spectrum; determining a representation of the
similarity of the sample to each library candidate; determining the most
likely composition of the sample based upon the determined
representations of similarity of the sample to each library candidate;
and displaying the most likely composition of the sample to a user.