# merge_wavelengths¶

synphot.utils.merge_wavelengths(waveset1, waveset2, threshold=1e-12)[source]

Return the union of the two sets of wavelengths using numpy.union1d().

The merged wavelengths may sometimes contain numbers which are nearly equal but differ at levels as small as 1e-14. Having values this close together can cause problems down the line. So, here we test whether any such small differences are present, with a small difference defined as less than threshold. If a small difference is present, the lower of the too-close pair is removed.

Parameters
waveset1, waveset2array-like or None

Wavelength values, assumed to be in the same unit already. Also see get_waveset().

thresholdfloat, optional

Merged wavelength values are considered “too close together” when the difference is smaller than this number. The default is 1e-12.

Returns
out_wavelengthsarray-like or None

Merged wavelengths. None if undefined.