debugged so fxn can be applied to data frames that don't use a column called wavelength.pairs