Bin it down by combining 2 pixels at a time (write a function, smooth_spectrum or something, that takes in a dataset object and returns a binned-down dataset object)
binned wl = (wl1 + wl2) / 2
binned flux = (ivar1 x flux1 + ivar2 x flux2) / (ivar1 + ivar2)
binned ivar = np.sqrt(ivar1^2 + ivar2^2)
Bin it down by combining 2 pixels at a time (write a function, smooth_spectrum or something, that takes in a dataset object and returns a binned-down dataset object)
binned wl = (wl1 + wl2) / 2 binned flux = (ivar1 x flux1 + ivar2 x flux2) / (ivar1 + ivar2) binned ivar = np.sqrt(ivar1^2 + ivar2^2)