add "exclude_spectral_ends" option to (drastically) improve
normalization when making off templates