see https://github.com/taxonomicallyinformedannotation/tima-r/blob/3794973db36c4fad639a6040128b21542082107d/R/annotate_spectra.R#L100-L110