Suppose I have a wavelength array for a spectrum in units of Angstroms. Suppose further that the wavelength has "uniform logarithmic spacing" such that if I just take the difference in Angstroms between neighboring array elements i and i+1, this won't be the same as the difference in Angstroms between any other two neighboring elements j and j+1. However, if I first took the log10 of the wavelength array, then the difference between any two neighboring logarithmic array elements i and i+1 would be equal to the difference between any other logarithmic array elements j and j+1.

Now, I know a priori that this wavelength array has a velocity offset of X km/s, which I basically want to remove. How do I apply a velocity shift of -X km/s to this wavelength array which has uniform logarithmic spacing?


1 Answer 1


If you have bins of equal log wavelength increment then a velocity shift corresponds directly to a pixel shift. That is the reason for binning in equal log wavelength increments.

See this question for a short proof. All you need to do is work out what each pixel corresponds to in terms of a velocity. $$\Delta V = c\, \Delta \log \lambda$$

  • $\begingroup$ Thanks I figured it out. The exact algorithm is: (1) take the natural log of your wavelength array in Angstroms, (2) add a velocity shift to your log-wavelength array via (c*logArray + velShift) / c, (3) convert your shifted log-wavelength array back to Angstroms by taking the exponential of it. $\endgroup$ Jun 17, 2016 at 16:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .