Fourier transform spectrometers in the near infrared-region, equipped with optical fiber bundles and driven by fast computers, can measure and identify drugs in a few seconds. A library with 37 spectra of drugs and other powders for stretching drugs, such as saccharoses, was generated. Assessment and optimization of a reference library by mathematical means is discussed. The method is simple, fast, and reliable and can be validated.