What is the relation between the wavelength and the radial velocity? I have a data: wavelength and intensity and I would like to plot intensity with respect to radial velocity - similarly as in the picture (source) EDIT

I have a file of alpha H with 2 columns - wavelength (in angstrom) and intensity (normalized for 1) and I would like to plot intensity with respect to radial velocity. I use in gnuplot:

c = 299792458
lambda_0 = 6562.817*10**(-10)
plot 'file.asc' using (c*(\$1*10**(-10)-lambda_0)/lambda_0):2


Why I get the wrong range on the x-axis? $$v_r = c\left( \frac{\lambda - \lambda_0}{\lambda_0}\right),$$ where $$\lambda$$ is the observed wavelength and $$\lambda_0$$ is the wavelength at rest. This gives an equivalent velocity with respect to the central wavelength of the line.

In your plot, what is shown is a line profile where the wavelength separation from $$\lambda_0$$ for that line (or from the measured centre of the line, I can't tell which) has been converted into a velocity.

Note that it makes little sense to plot more than a single line profile in this way.

• Thank you, I tried to plot my own line - it is in EDIT in my question. Do I have wrong units somewhere?
– Alex
Feb 24, 2020 at 11:55
• @Alex Since I don't know what data you have and your plots are not labelled with units, it is difficult to say. If your raw x-axis values are in Angstroms and you intend your velocity data to be displayed in m/s, then this looks correct. Feb 24, 2020 at 12:33
• @Alex Note that it make s little sense to plot more than a single line profile in this way. The numbers/velocities under other features in the spectrum are meaningless. Feb 24, 2020 at 12:34
• OK, thank you very much
– Alex
Feb 24, 2020 at 13:33
• Does (λ−λ0)/λ0 refer to the cosmological redshift or the Doppler redshift?
– user30617
May 11, 2020 at 17:18