<p>The unit is that of a velocity. If you have bins of equal <span class="math-container">$\ln \lambda$</span> (which equals <span class="math-container">$\Delta \lambda/\lambda =\Delta v/c$</span>), then each of your pixels (in your spectrum and in the template) <em>represents</em> a constant velocity increment <span class="math-container">$\Delta v = c |\Delta \ln \lambda|$</span>, which could have units of km/s.</p>
<p>The shift in the peak of a cross-correlation function is known as &quot;the lag&quot; and the velocity shift is given by the lag (in pixels) multiplied by <span class="math-container">$\Delta v$</span>.</p>

CC BY-SA 4.0
2023-05-26T13:47:06.943Z
Makes sense, but what do I need to change in the formula to make it consistent. Because looking at the formula that I gave for the cross-correlation function the function argument of the galaxy spectrum$(x+z)$ inside the integral needs to have the same units.
trynerror
CC BY-SA 4.0
2023-05-26T13:47:34.870Z
assuming that the unit i gave for x is correct of course.
trynerror
CC BY-SA 4.0
2023-05-26T14:22:55.997Z
@trynerror I don;t understand your comment. The x-axes of both spectrum and template need to be the same. The cross correlation is a function of $z$, which is the lag in pixels.
ProfRob
CC BY-SA 4.0
2023-05-26T14:37:51.777Z
When I write $K_{S, G}(z)= \int dx G(x+z)S(x)$, then the units of x and z should be the same formally ? I understand your answer and it makes sense, I guess the remaining doubt is more about this formula.
trynerror
CC BY-SA 4.0
2023-05-26T14:49:02.370Z
So if z is the lag in pixels, and 1 pixel has the unit 1 Np/Å, then the velocity shift would be of units 1 Np/Å * km/s ?
trynerror
CC BY-SA 4.0
2023-05-26T14:59:13.377Z
@trynerror I don't know what Np per Angstrom means. If you have binned in equal steps of $\ln \lambda$ then the pixels have units of fractions of the speed of light.
ProfRob
CC BY-SA 4.0
2023-05-26T18:53:15.730Z
If $[\lambda] = 1 Å$ and $x = \ln{\lambda}$ then $[x]=1 Np/Å,$  (https://en.wikipedia.org/wiki/Neper). If I read your last comment correctly x (the pixels)  have unit $[x] = [1/c] = 1 s/km$ for $[c] = 1 km/s$ I just would like all the units written out for the equations I used in the question.
trynerror
CC BY-SA 4.0
2023-05-27T20:23:47.577Z
@trynerror please define all your notation and abbreviations in your question. I can't understand any of this.
ProfRob
CC BY-SA 4.0
2023-05-29T07:02:04.420Z
I don't know what variables you are refering to exactly,  I gave the formulas and units of all variables I use in these brackets [] in the question. Could you please explain why the unit of pixels is fractions of the speed of light, when binned in equal steps of $\ln{\lambda}$?
trynerror
CC BY-SA 4.0
2023-05-29T07:04:50.417Z
Neper ($1 NP$) is just the unit convention when using the natural logarithm. When variable $a$ has unit $1 b$, then the natural logarithm $\ln a$ has unit $1 Np/b$ .
trynerror
CC BY-SA 4.0
2023-05-26T13:41:32.290Z
2023-05-29T07:18:09.247Z
2023-05-29T07:18:09.247Z
ProfRob
<p>Assume I have a logarithmically rebinned galactic spectrum <span class="math-container">$G(x)$</span> and a stellar template spectrum <span class="math-container">$S(x)$</span>, where <span class="math-container">$x = \ln{\lambda}$</span>. When <span class="math-container">$[\lambda] = 1 Å$</span>, then <span class="math-container">$[x] = 1 Np/Å$</span>. The fourier transformed galaxy spectrum is <span class="math-container">$\tilde{G}(\kappa)$</span>, then <span class="math-container">$[\kappa]= 1/(Np/Å)$</span>.</p>
<p>Now the correlation function between galaxy and spectra is defined as:
<span class="math-container">$K_{S, G}(z)= \int dx G(x+z)S(x)$</span>, so the unit of <span class="math-container">$z$</span> should be <span class="math-container">$[z] = [x]= 1 Np/Å $</span>?
Since the rebinning on a logarithmic wavelength scale introduces an easy conversion from measured wavelength shifts to velocity shifts: <span class="math-container">$\Delta x = \Delta \lambda/\lambda=\Delta v/c$</span>. So the way <span class="math-container">$K_{S,G}(z)$</span> is defined above it measures shifts in wavelengths between the spectra. For my analysis, I needed a velocity axis, so I plotted my correlation function on a velocity axis (which would be wrong to label with Np/Å), at the same time I just wonder how to do this consistently in the mathematical formalism. One would have to do something like <span class="math-container">$\bar{K}_{S,G}(v) \equiv K_{S,G}(v/c)$</span> ?</p>
<p>And then one would need a different variable in fourier space: <span class="math-container">$\tilde{\bar{K}}_{S, G}(\bar{\kappa})$</span>, where <span class="math-container">$\bar{\kappa} = 1 s/km$</span>, when <span class="math-container">$[v] =1 km/s$</span> ?</p>

<observational-astronomy><galaxy><spectra><units>
What is the unit of the correlation function between logarithmically rebinned galaxy spectrum and stellar template spectrum?
trynerror
# What is the unit of the correlation function between logarithmically rebinned galaxy spectrum and stellar template spectrum?

(Asked by: username_0 on 2023-05-26)

Assume I have a logarithmically rebinned galactic spectrum $G(x)$ and a stellar template spectrum $S(x)$, where $x = \ln{\lambda}$. When $[\lambda] = 1 Å$, then $[x] = 1 Np/Å$. The fourier transformed galaxy spectrum is $\tilde{G}(\kappa)$, then $[\kappa]= 1/(Np/Å)$.

Now the correlation function between galaxy and spectra is defined as:
$K\_{S, G}(z)= \int dx G(x+z)S(x)$, so the unit of $z$ should be $[z] = [x]= 1 Np/Å $?
Since the rebinning on a logarithmic wavelength scale introduces an easy conversion from measured wavelength shifts to velocity shifts: $\Delta x = \Delta \lambda/\lambda=\Delta v/c$. So the way $K\_{S,G}(z)$ is defined above it measures shifts in wavelengths between the spectra. For my analysis, I needed a velocity axis, so I plotted my correlation function on a velocity axis (which would be wrong to label with Np/Å), at the same time I just wonder how to do this consistently in the mathematical formalism. One would have to do something like $\bar{K}\_{S,G}(v) \equiv K\_{S,G}(v/c)$ ?

And then one would need a different variable in fourier space: $\tilde{\bar{K}}\_{S, G}(\bar{\kappa})$, where $\bar{\kappa} = 1 s/km$, when $[v] =1 km/s$ ?

**Tags:** observational-astronomy, galaxy, spectra, units


---

## 1 answers

### Answer by username_1 on 2023-05-26. Score: 1 | Accepted answer

The unit is that of a velocity. If you have bins of equal $\ln \lambda$ (which equals $\Delta \lambda/\lambda =\Delta v/c$), then each of your pixels (in your spectrum and in the template) *represents* a constant velocity increment $\Delta v = c |\Delta \ln \lambda|$, which could have units of km/s.

The shift in the peak of a cross-correlation function is known as "the lag" and the velocity shift is given by the lag (in pixels) multiplied by $\Delta v$.

> **Comments:**
> **username_0**: Makes sense, but what do I need to change in the formula to make it consistent. Because looking at the formula that I gave for the cross-correlation function the function argument of the galaxy spectrum$(x+z)$ inside the integral needs to have the same units.  
> **username_0**: assuming that the unit i gave for x is correct of course.  
> **username_1**: @username_0 I don;t understand your comment. The x-axes of both spectrum and template need to be the same. The cross correlation is a function of $z$, which is the lag in pixels.  
> **username_0**: When I write $K_{S, G}(z)= \int dx G(x+z)S(x)$, then the units of x and z should be the same formally ? I understand your answer and it makes sense, I guess the remaining doubt is more about this formula.  
> **username_0**: So if z is the lag in pixels, and 1 pixel has the unit 1 Np/Å, then the velocity shift would be of units 1 Np/Å * km/s ?  
> **username_1**: @username_0 I don't know what Np per Angstrom means. If you have binned in equal steps of $\ln \lambda$ then the pixels have units of fractions of the speed of light.  
> **username_0**: If $[\lambda] = 1 Å$ and $x = \ln{\lambda}$ then $[x]=1 Np/Å,$  (https://en.wikipedia.org/wiki/Neper). If I read your last comment correctly x (the pixels)  have unit $[x] = [1/c] = 1 s/km$ for $[c] = 1 km/s$ I just would like all the units written out for the equations I used in the question.  
> **username_1**: @username_0 please define all your notation and abbreviations in your question. I can't understand any of this.  
> **username_0**: I don't know what variables you are refering to exactly,  I gave the formulas and units of all variables I use in these brackets [] in the question. Could you please explain why the unit of pixels is fractions of the speed of light, when binned in equal steps of $\ln{\lambda}$?  
> **username_0**: Neper ($1 NP$) is just the unit convention when using the natural logarithm. When variable $a$ has unit $1 b$, then the natural logarithm $\ln a$ has unit $1 Np/b$ .  

---

