Method of analysis of a heterogeneous product comprising: a) obtaining a one-dimensional, complex spectrum of the heterogeneous product to be tested (Test sample), b) obtaining a library of spectra of verified heterogeneous products (Library 1), c) obtaining a second library of spectra of verified heterogeneous products (Library 2), wherein Library 2 contains a number of spectra x and Library 1 contains a number of spectra n, where n>x and n is more than 2, preferably more than 50, d) comparing said Library 1 against said Library 2 by comparative two-dimensional correlation spectroscopic filtering (comparative 2D-COS-f), e) comparing the Test sample spectrum against said Library 1 by comparative 2D-COS-f, f) identifying the features of said Test sample spectrum which are not consistent to Library 1, wherein the steps to perform comparative 2D-COS-f comprise: i. mean-centering Library 1 (X (library1)) by subtracting the mean spectra of Library 1 from each of the spectra in Library 1, obtaining the mean-centered data set x; x = x library 1 ij − x library 1 average i, ii. determining the covariance matrix of the mean-centered Library 1 (COV LIB), where COV LIB =1/(n-1)*xx T iii. repeating steps i-ii with Library 1 plus one of the spectra from Library 2 obtaining the covariance matrix (COV LIBTEST), iv. subtracting COV LIB from COV LIBTEST obtaining the difference covariance matrix ΔCOV LIBTEST-LIB, v. repeating steps iii-iv for each of the spectra that are within Library 2, vi. repeating steps i-ii with Library 1 plus the spectrum of the Test sample obtaining the covariance matrix (COV TEST); vii. subtracting COV LIB from COV TEST obtaining the difference covariance matrix ΔCOV TEST-LIB wherein the Test sample is considered not consistent with the Library 1 of verified heterogeneous products when it has one or more features within ΔCOV TEST-LIB whose amplitude is greater than any of the features within ΔCOV LIBTEST-LIB. a) obtaining a one-dimensional, complex spectrum of the heterogeneous product to be tested (Test sample), b) obtaining a library of spectra of verified heterogeneous products (Library 1), c) obtaining a second library of spectra of verified heterogeneous products (Library 2), wherein Library 2 contains a number of spectra x and Library 1 contains a number of spectra n, where n>x and n is more than 2, preferably more than 50, d) comparing said Library 1 against said Library 2 by comparative two-dimensional correlation spectroscopic filtering (comparative 2D-COS-f), e) comparing the Test sample spectrum against said Library 1 by comparative 2D-COS-f, f) identifying the features of said Test sample spectrum which are not consistent to Library 1, wherein the steps to perform comparative 2D-COS-f comprise: i. mean-centering Library 1 (X (library1)) by subtracting the mean spectra of Library 1 from each of the spectra in Library 1, obtaining the mean-centered data set x; x = x library 1 ij − x library 1 average i, ii. determining the covariance matrix of the mean-centered Library 1 (COV LIB), where COV LIB =1/(n-1)*xx T iii. repeating steps i-ii with Library 1 plus one of the spectra from Library 2 obtaining the covariance matrix (COV LIBTEST), iv. subtracting COV LIB from COV LIBTEST obtaining the difference covariance matrix ΔCOV LIBTEST-LIB, v. repeating steps iii-iv for each of the spectra that are within Library 2, vi. repeating steps i-ii with Library 1 plus the spectrum of the Test sample obtaining the covariance matrix (COV TEST); vii. subtracting COV LIB from COV TEST obtaining the difference covariance matrix ΔCOV TEST-LIB wherein the Test sample is considered not consistent with the Library 1 of verified heterogeneous products when it has one or more features within ΔCOV TEST-LIB whose amplitude is greater than any of the features within ΔCOV LIBTEST-LIB. i. mean-centering Library 1 (X (library1)) by subtracting the mean spectra of Library 1 from each of the spectra in Library 1, obtaining the mean-centered data set x; x = x library 1 ij − x library 1 average i, ii. determining the covariance matrix of the mean-centered Library 1 (COV LIB), where COV LIB =1/(n-1)*xx T iii. repeating steps i-ii with Library 1 plus one of the spectra from Library 2 obtaining the covariance matrix (COV LIBTEST), iv. subtracting COV LIB from COV LIBTEST obtaining the difference covariance matrix ΔCOV LIBTEST-LIB, v. repeating steps iii-iv for each of the spectra that are within Library 2, vi. repeating steps i-ii with Library 1 plus the spectrum of the Test sample obtaining the covariance matrix (COV TEST); vii. subtracting COV LIB from COV TEST obtaining the difference covariance matrix ΔCOV TEST-LIB wherein the Test sample is considered not consistent with the Library 1 of verified heterogeneous products when it has one or more features within ΔCOV TEST-LIB whose amplitude is greater than any of the features within ΔCOV LIBTEST-LIB.