Algorithmic foundation of spectral rarefaction for measuring satellite imagery heterogeneity at multiple spatial scales