<p>To begin with, I would suggest <em>also</em> plotting the line-of-sight velocity and velocity dispersion maps for each inclination. In particular, you should see a clear anti-correlation between the velocity and the skewness, especially in the edge-on case. This is a signature of rotation-dominated kinematics and a flat or slowly changing rotation curve, due to the line-of-sight vetor intersecting (nearly) circular orbits at different angles outside the tangent radius:</p>
<p><a href="https://i.sstatic.net/xAylG.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/xAylG.png" alt="enter image description here" /></a></p>
<p><strong>Edited to add:</strong> The idea is that your line of sight (dashed green line) is tangent to the point A, and so the projected lines-of-sight velocity = the rotation velocity at that radius. The line of sight intersects stellar orbits at <em>larger</em> radii at increasingly large angles, so the projected velocity along the line of sight gets smaller and smaller (if the stellar velocity curve is flat or decreasing or even mildly increasing). Assuming a locally Gaussian distribution of stellar velocities at each radius, the contributions from radii <span class="math-container">$&gt; A$</span> show up at smaller velocities (curves in the right-hand figure). Assuming that stellar <em>density</em> decreases at larger radii, the contributions from larger radii are smaller (lower heights in the right-hand figure). The net effect will be a shape with negative skew. For the other side of the galaxy, where velocities are negative (blueshifted), you will get the mirror situation, with a <em>positively</em> skewed LOSVD.</p>
<p>(One small suggestion would be to plot <em>positive</em> quantities with read and negativity quantities with blue -- the opposite of what you're currently doing -- since then positive velocities correspond directly to redshifts and negative velocities to blueshifts.)</p>
<p>The strong pixel-to-pixel variations in the outer part of the disk in your plots is almost certainly just due to low S/N (since the number density of particles is low at large radii).</p>
<p>Note that the standard approach in analyzing galaxy stellar kinematics is to model the line-of-sight velocity distribution using Gauss-Hermite polynomials, where the first- and second-order terms correspond to the mean velocity (<span class="math-container">$V$</span>) and the velocity dispersion (<span class="math-container">$\sigma$</span>), and the third- and fourth-order terms (<span class="math-container">$h_{3}$</span> and <span class="math-container">$h_{4}$</span>) to the skewness and kurtosis, respectively. (See, e.g., <a href="http://adsabs.harvard.edu/abs/1993ApJ...407..525V" rel="nofollow noreferrer">van der Marel &amp; Franx (1993)</a> and <a href="http://adsabs.harvard.edu/abs/1993MNRAS.265..213G" rel="nofollow noreferrer">Gerhard (1993)</a>.) I point this out mainly in case you want to compare your results with published analyses of other models and real galaxies.</p>

CC BY-SA 4.0
2021-11-26T06:53:53.927Z
thanks! Right, I can see the anti correlation for the edge on case for mean velocity and skewness. I did not understand this part you mentioned:'' This is a signature of rotation-dominated kinematics and a flat or slowly changing rotation curve, due to the line-of-sight vector intersecting (nearly) circular orbits at different angles outside the tangent radius.'' Also, do you have any suggestion on how to calculate h3 and h4 moments from the line of sight velocities? I just got skewness and kurtosis from scipy functions.
Jerome
CC BY-SA 4.0
2021-11-27T11:48:25.320Z
@Jerome The basic idea is that you fit the LOSVD profile with a model consisting of the first 4 Gauss-Hermite moments, as specified in the papers I linked to.
Peter Erwin
CC BY-SA 4.0
2021-11-27T12:19:21.533Z
@Jerome I've updated my answer with a figure and accompanying explanation which attempts to describe the part you didn't understand.
Peter Erwin
CC BY-SA 4.0
2021-11-27T20:50:19.443Z
Thanks so much, Peter! I also wanted to know more about the last paragraph you wrote regarding modelling Los velocity as Gauss Hermite distribution and then finding higher order moments. I basically have the los velocities as an array of values. From there, I just computed kurtosis and skewness using scipy functions in python. So, how do I calculate h3 and h4 like you are saying? How's that different to the way I got skewness and kurtosis?
Jerome
CC BY-SA 4.0
2021-11-28T12:30:21.320Z
@Jerome it's an exercise in "curve-fitting". Your data needs to be in the form of N(V) -- that is, an array of velocity-bin values (e.g. [-200,-190, ..., 190, 200]) and a matching array of counts per bin. You then attempt to fit the data with a function of five variables: an overall amplitude (not very important), a central velocity, a velocity dispersion ($\sigma$), h3, and h4, as specified in the papers I linked to. The simplified version is assuming h3 = h4 = 0, in which case you're fitting the data with a pure Gaussian (center = $V$, dispersion = $\sigma$).
Peter Erwin
CC BY-SA 4.0
2021-11-24T22:23:56.883Z
2021-11-27T12:18:29.460Z
2021-11-27T12:18:29.460Z
Peter Erwin
<p><strong>What I did:-</strong>
I am analysing some simulation snapshots of the Milky Way and it is modelled as a dark matter halo – bulge – disc system. I produced some skewness (using <code>scipy.stats.skew()</code> in <code>python</code>) and kurtosis (using <code>scipy.stats.kurtosis</code>)  plots of line of sight velocity (LOSV)that I am attaching here. To produce these plots I simply extracted the <span class="math-container">$v_x,v_y,v_z$</span> components of the velocities of the stars and I picked the <span class="math-container">$z$</span>-axis as the line of sight. I overlaid a grid on the galaxy snapshot, and at different inclinations (<span class="math-container">$\theta=0,45,60,90$</span> degrees) of the galaxy I plotted the skewness and kurtosis in the grid cells (<span class="math-container">$v_z$</span> is the <span class="math-container">$z$</span>-component of the velocities).
[![enter image description here][1]][1]</p>
<p><strong>My question:</strong>
I want to now understand and interpret my plots. What can I deduce from the plots for the different angles of inclinations? My model galaxy has a halo, bulge at centre and disk. What can we tell about the losv distributions or the components of the galaxy? I'm new to astrophysics so these kind of plots and concepts are new to me. Any help is much appreciated, thanks so much!</p>

CC BY-SA 4.0
2021-11-18T19:18:04.387Z
What are you asking here?  Do you know what skew and kurtosis represent in statistics?  Or are you trying to discern actual parameters of a galaxy?
Carl Witthoft
CC BY-SA 4.0
2021-11-19T06:32:17.723Z
Hi @Carl, I understand that skewness is a measure of symmetry of vlos (in this case) and kurtosis a measure of how heavy vlos distribution tails are compared to a normal distribution...what I want to know is what the skewness and kurtosis plots might imply about vlos or about the parameters of galaxies.
Jerome
CC BY-SA 4.0
2021-11-19T13:02:06.687Z
Ahhh, for us rookies,  vlos -->  $V_{los}$ , vertical line of sight
Carl Witthoft
CC BY-SA 4.0
2021-11-19T22:26:13.993Z
@Carl, sorry, I meant V_los as in line of sight velocity (edited on my post).
Jerome
<galaxy><astrophysics><python><n-body-simulations>
How to interpret skewness and kurtosis plots of galaxy snapshots?
Jerome
# How to interpret skewness and kurtosis plots of galaxy snapshots?

(Asked by: username_0 on 2021-11-18)

**What I did:-**
I am analysing some simulation snapshots of the Milky Way and it is modelled as a dark matter halo – bulge – disc system. I produced some skewness (using `scipy.stats.skew()` in `python`) and kurtosis (using `scipy.stats.kurtosis`) plots of line of sight velocity (LOSV)that I am attaching here. To produce these plots I simply extracted the $v\_x,v\_y,v\_z$ components of the velocities of the stars and I picked the $z$-axis as the line of sight. I overlaid a grid on the galaxy snapshot, and at different inclinations ($\theta=0,45,60,90$ degrees) of the galaxy I plotted the skewness and kurtosis in the grid cells ($v\_z$ is the $z$-component of the velocities).
[![enter image description here][1]][1]

**My question:**
I want to now understand and interpret my plots. What can I deduce from the plots for the different angles of inclinations? My model galaxy has a halo, bulge at centre and disk. What can we tell about the losv distributions or the components of the galaxy? I'm new to astrophysics so these kind of plots and concepts are new to me. Any help is much appreciated, thanks so much!

**Tags:** galaxy, astrophysics, python, n-body-simulations

> **Comments:**
> **username_1**: What are you asking here?  Do you know what skew and kurtosis represent in statistics?  Or are you trying to discern actual parameters of a galaxy?  
> **username_0**: Hi @username_1, I understand that skewness is a measure of symmetry of vlos (in this case) and kurtosis a measure of how heavy vlos distribution tails are compared to a normal distribution...what I want to know is what the skewness and kurtosis plots might imply about vlos or about the parameters of galaxies.  
> **username_1**: Ahhh, for us rookies,  vlos -->  $V_{los}$ , vertical line of sight  
> **username_0**: @username_1, sorry, I meant V_los as in line of sight velocity (edited on my post).  

---

## 1 answers

### Answer by username_2 on 2021-11-24. Score: 4 | Accepted answer

To begin with, I would suggest *also* plotting the line-of-sight velocity and velocity dispersion maps for each inclination. In particular, you should see a clear anti-correlation between the velocity and the skewness, especially in the edge-on case. This is a signature of rotation-dominated kinematics and a flat or slowly changing rotation curve, due to the line-of-sight vetor intersecting (nearly) circular orbits at different angles outside the tangent radius:

[![enter image description here](https://i.sstatic.net/xAylG.png)](https://i.sstatic.net/xAylG.png)

**Edited to add:** The idea is that your line of sight (dashed green line) is tangent to the point A, and so the projected lines-of-sight velocity = the rotation velocity at that radius. The line of sight intersects stellar orbits at *larger* radii at increasingly large angles, so the projected velocity along the line of sight gets smaller and smaller (if the stellar velocity curve is flat or decreasing or even mildly increasing). Assuming a locally Gaussian distribution of stellar velocities at each radius, the contributions from radii $> A$ show up at smaller velocities (curves in the right-hand figure). Assuming that stellar *density* decreases at larger radii, the contributions from larger radii are smaller (lower heights in the right-hand figure). The net effect will be a shape with negative skew. For the other side of the galaxy, where velocities are negative (blueshifted), you will get the mirror situation, with a *positively* skewed LOSVD.

(One small suggestion would be to plot *positive* quantities with read and negativity quantities with blue -- the opposite of what you're currently doing -- since then positive velocities correspond directly to redshifts and negative velocities to blueshifts.)

The strong pixel-to-pixel variations in the outer part of the disk in your plots is almost certainly just due to low S/N (since the number density of particles is low at large radii).

Note that the standard approach in analyzing galaxy stellar kinematics is to model the line-of-sight velocity distribution using Gauss-Hermite polynomials, where the first- and second-order terms correspond to the mean velocity ($V$) and the velocity dispersion ($\sigma$), and the third- and fourth-order terms ($h\_{3}$ and $h\_{4}$) to the skewness and kurtosis, respectively. (See, e.g., [van der Marel & Franx (1993)](http://adsabs.harvard.edu/abs/1993ApJ...407..525V) and [Gerhard (1993)](http://adsabs.harvard.edu/abs/1993MNRAS.265..213G).) I point this out mainly in case you want to compare your results with published analyses of other models and real galaxies.

> **Comments:**
> **username_0**: thanks! Right, I can see the anti correlation for the edge on case for mean velocity and skewness. I did not understand this part you mentioned:'' This is a signature of rotation-dominated kinematics and a flat or slowly changing rotation curve, due to the line-of-sight vector intersecting (nearly) circular orbits at different angles outside the tangent radius.'' Also, do you have any suggestion on how to calculate h3 and h4 moments from the line of sight velocities? I just got skewness and kurtosis from scipy functions.  
> **username_2**: @username_0 The basic idea is that you fit the LOSVD profile with a model consisting of the first 4 Gauss-Hermite moments, as specified in the papers I linked to.  
> **username_2**: @username_0 I've updated my answer with a figure and accompanying explanation which attempts to describe the part you didn't understand.  
> **username_0**: Thanks so much, username_2! I also wanted to know more about the last paragraph you wrote regarding modelling Los velocity as Gauss Hermite distribution and then finding higher order moments. I basically have the los velocities as an array of values. From there, I just computed kurtosis and skewness using scipy functions in python. So, how do I calculate h3 and h4 like you are saying? How's that different to the way I got skewness and kurtosis?  
> **username_2**: @username_0 it's an exercise in "curve-fitting". Your data needs to be in the form of N(V) -- that is, an array of velocity-bin values (e.g. [-200,-190, ..., 190, 200]) and a matching array of counts per bin. You then attempt to fit the data with a function of five variables: an overall amplitude (not very important), a central velocity, a velocity dispersion ($\sigma$), h3, and h4, as specified in the papers I linked to. The simplified version is assuming h3 = h4 = 0, in which case you're fitting the data with a pure Gaussian (center = $V$, dispersion = $\sigma$).  

---

