<p><span class="math-container">$$v_r = c\left( \frac{\lambda - \lambda_0}{\lambda_0}\right),$$</span>
where <span class="math-container">$\lambda$</span> is the observed wavelength and <span class="math-container">$\lambda_0$</span> is the wavelength at rest. This gives an equivalent velocity with respect to the central wavelength of the line.</p>

<p>In your plot, what is shown is a line profile where the wavelength separation from <span class="math-container">$\lambda_0$</span> for that line (or from the measured centre of the line, I can't tell which) has been converted into a velocity.</p>

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

CC BY-SA 4.0
2020-02-24T11:55:33.447Z
Thank you, I tried to plot my own line - it is in EDIT in my question. Do I have wrong units somewhere?
Alex
CC BY-SA 4.0
2020-02-24T12:33:50.183Z
@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.
ProfRob
CC BY-SA 4.0
2020-02-24T12:34:58.317Z
@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.
ProfRob
CC BY-SA 4.0
2020-02-24T13:33:02.797Z
OK, thank you very much
Alex
CC BY-SA 4.0
2020-02-24T08:00:55.403Z
2020-02-24T12:39:52.280Z
2020-02-24T12:39:52.280Z
ProfRob
<p>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 (<a href="https://arxiv.org/pdf/astro-ph/0508096.pdf" rel="nofollow noreferrer">source</a>)</p>

<p><a href="https://i.sstatic.net/7GyzB.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/7GyzB.png" alt=""></a></p>

<p><strong>EDIT</strong></p>

<p>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:</p>

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

<p>Why I get the wrong range on the x-axis?</p>

<p><a href="https://i.sstatic.net/oSJU2.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/oSJU2.png" alt="enter image description here"></a></p>

<wavelength><radial-velocity>
Wavelength and radial velocity
Alex
# Wavelength and radial velocity

(Asked by: username_0 on 2020-02-24)

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?

**Tags:** wavelength, radial-velocity

---

## 1 answers

### Answer by username_1 on 2020-02-24. Score: 2 | Accepted answer

$$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.

> **Comments:**
> **username_0**: Thank you, I tried to plot my own line - it is in EDIT in my question. Do I have wrong units somewhere?  
> **username_1**: @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.  
> **username_1**: @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.  
> **username_0**: OK, thank you very much  

---

