I'm looking into the angular momentum of particles . Just to check my calculations i'm trying to compare my results using the particles of the subhalos with the spin given by the data base, using the 'SubhaloSpin' field:

I'm getting different numbers and different signs in the components, which is more worrysome, so i checked in the definition given in the data specifications. SubhaloSpin: "Total spin per axis, computed for each as the mass weighted sum of the relative coordinate times relative velocity of all member particles/cells." My question is, what is relative? The positions and velocities are relative to the center of the subhaloes? do i have to make some translation or rotation of coordinates ? or i can use the position and velocities given in the subhalo particle data directly?

Spin computed with particle data:

part = il.snapshot.loadSubhalo(basePath,snap,ID,partype)

Yes it's important that both positions and velocities are relative to the subhalo. I would use SubhaloPos and SubhaloVel and then check if you get the same result.

Be very cautious of the units of Velocities in the subhalos vs the particles (with respect to the a factors).

Also the calculation should likely include a Hubble term in the relative velocity.

Hello!

I'm looking into the angular momentum of particles . Just to check my calculations i'm trying to compare my results using the particles of the subhalos with the spin given by the data base, using the 'SubhaloSpin' field:

tree=il.sublink.loadTree(basePath,135,GroupFirstSub[i],fields=fields, onlyMPB=False)

tree['SubhaloSpin']

I'm getting different numbers and different signs in the components, which is more worrysome, so i checked in the definition given in the data specifications. SubhaloSpin: "Total spin per axis, computed for each as the mass weighted sum of the relative coordinate times relative velocity of all member particles/cells." My question is, what is relative? The positions and velocities are relative to the center of the subhaloes? do i have to make some translation or rotation of coordinates ? or i can use the position and velocities given in the subhalo particle data directly?

Spin computed with particle data:

part = il.snapshot.loadSubhalo(basePath,snap,ID,partype)

for k in range(0, part['count']):

Ltot=Lcross/totmass

Thanks in advance!

Hi Ignaco,

Yes it's important that both positions and velocities are relative to the subhalo. I would use

`SubhaloPos`

and`SubhaloVel`

and then check if you get the same result.Be very cautious of the units of Velocities in the subhalos vs the particles (with respect to the

`a`

factors).Also the calculation should likely include a Hubble term in the relative velocity.

I forgot to thank you Dylan! I do now.