Drug and cosmetic quality control with instrumentation