Framework for alternating-least-squares-based multivariate curve resolution with application to time-of-flight secondary ion mass spectrometry imaging