Hi, Just wondering if galaxy stellar velocity dispersions are available. I have found the field 'SubhaloVelDisp' in Subfind Subhalos (Galaxies), but I suspect that this is the velocity dispersion of both the dark matter and stellar component (this is unclear). Is this information available?
Dylan Nelson
11 Mar '21
Hi Christopher,
You're correct, SubhaloVelDisp is "of all the member particles/cells", and so not a measurement on the stars alone.
There isn't such a quantity already computed, but it shouldn't be too hard to compute from the star particles (for each subhalo, for a given sample of subhalos).
Christopher Marsden
12 Mar '21
Thanks - based on this, is there an intuitive way, given a subhalo and tree to identify these stellar particles?
Dylan Nelson
12 Mar '21
You can directly load all the stars of a given subhalo with the function:
def loadSubhalo(basePath, snapNum, id, partType, fields=None):
""" Load all particles/cells of one type for a specific subhalo
(optionally restricted to a subset fields). """
You can find an example of this in both the Example Scripts tutorial as well as in the Lab service under examples/tutorial.ipynb where the temperature of all gas cells in a given subhalo are loaded and plotted.
Based on this, I would assume that the if I want the (velocities) of particles from a halo derived from a specific tree, I would do the following:
Subhalo id is some subhalo of interest.
tree = il.sublink.loadTree(basePath, 99, subhalo_id, fields=[prop,'SnapNum'], onlyMPB=True) # Loads the tree
snapshots = tree['SnapNum'] # Get the snapshot numbers of the tree?
snap = snapshots[10] # Some random snapshot
particles = il.snapshot.loadSubhalo(basePath, snap, subhalo_id, 'stars', fields=['Velocities'])
print(particles)
I would expect this to return a (N, 3) array with particle velocities. Instad, this returns {'count': 0}.
I am assuming here that subhalo ID applies to the entire tree, and it may not. Which ID should I be using in this case if not?
Dylan Nelson
12 Mar '21
Hi Christopher,
Almost done, you just need to also load SubfindID from the tree, and use this at each corresponding SnapNum. (the IDs of a given object between different snapshots are not the same)
Christopher Marsden
12 Mar '21
This works, thank you! One more thing - if I want to calculate the projected velocity dispersion of these within an aperture of fixed size for comparison with observations, is this as simple as selecting the velocities of the particles within this projected aperture, and finding the standard deviation of these particle velocities in the projected dimension?
This would seem the intuitve approach, but I am wondering if one would need to weight the particles by mass or brightness.
Dylan Nelson
12 Mar '21
Yes that's definitely the way to start, if e.g. the observational measurements are straight from stellar spectral features, then it would make sense to weight by brightness in a relevant band.
You can always go further in the "mocking" procedure. You could, for instance, use a SPS code to generate a spectrum for each stellar population in the aperture, then doppler shift these by the line-of-sight velocity, and produce a synthetic spectrum (possibly adding noise, matching the instrumental resolution, etc). Then you could obtain a velocity dispersion in the same way as was done on the data.
Hi, Just wondering if galaxy stellar velocity dispersions are available. I have found the field 'SubhaloVelDisp' in Subfind Subhalos (Galaxies), but I suspect that this is the velocity dispersion of both the dark matter and stellar component (this is unclear). Is this information available?
Hi Christopher,
You're correct,
SubhaloVelDisp
is "of all the member particles/cells", and so not a measurement on the stars alone.There isn't such a quantity already computed, but it shouldn't be too hard to compute from the star particles (for each subhalo, for a given sample of subhalos).
Thanks - based on this, is there an intuitive way, given a subhalo and tree to identify these stellar particles?
You can directly load all the stars of a given subhalo with the function:
You can find an example of this in both the Example Scripts tutorial as well as in the Lab service under
examples/tutorial.ipynb
where the temperature of all gas cells in a given subhalo are loaded and plotted.Based on this, I would assume that the if I want the (velocities) of particles from a halo derived from a specific tree, I would do the following:
Subhalo id is some subhalo of interest.
I would expect this to return a (N, 3) array with particle velocities. Instad, this returns {'count': 0}.
I am assuming here that subhalo ID applies to the entire tree, and it may not. Which ID should I be using in this case if not?
Hi Christopher,
Almost done, you just need to also load
SubfindID
from the tree, and use this at each correspondingSnapNum
. (the IDs of a given object between different snapshots are not the same)This works, thank you! One more thing - if I want to calculate the projected velocity dispersion of these within an aperture of fixed size for comparison with observations, is this as simple as selecting the velocities of the particles within this projected aperture, and finding the standard deviation of these particle velocities in the projected dimension?
This would seem the intuitve approach, but I am wondering if one would need to weight the particles by mass or brightness.
Yes that's definitely the way to start, if e.g. the observational measurements are straight from stellar spectral features, then it would make sense to weight by brightness in a relevant band.
You can always go further in the "mocking" procedure. You could, for instance, use a SPS code to generate a spectrum for each stellar population in the aperture, then doppler shift these by the line-of-sight velocity, and produce a synthetic spectrum (possibly adding noise, matching the instrumental resolution, etc). Then you could obtain a velocity dispersion in the same way as was done on the data.