Gas contained in the halo that is not bound to any subhalo

Patricia Aparicio Marcos
  • 4
  • 12 Mar

Hello,

I've been working on extracting the gas residing in the halo "fuzz," which is geometrically part of the halo but not bound to any specific subhalo. My goal is to partition the gas particles within the halo for studying the CGM, similar to what they do in this paper (https://arxiv.org/abs/2004.07846), but using TNG-50.

Initially, I attempted to retrieve the ParticleIDs corresponding to the entire halo, the central subhalo, and all satellite subhalos:

halo_gas_ind = sP.snapshotSubset('gas', fields=['ParticleIDs'], haloID=my_halo_id)
central_sub_gas_ind = sP.snapshotSubset('gas', fields=['ParticleIDs'], subhaloID=subhalo_id)
satellites_ids = np.arange(central_subs, central_subs + group_N_subs)
for satellites_id in satellites_ids:
    gas_satellites_indices = sP.snapshotSubset('gas', fields=['ParticleIDs'], subhaloID=satellites_id)
    gas_satellites_ind.extend(gas_satellites_indices)

Then, I computed the total number of particles for each of them:

N_total_gas = sP.groupCat(fieldsHalos=['GroupLenType'][:,0])
N_total_group = N_total_gas[my_halo_id]
N_total_central = len(central_sub_gas_ind)
N_total_sat = len(gas_satellites_ind)

Finally, I aimed to determine the count for the "fuzz" so that I could know the number of gas particles in the fuzz (and subsequently the fuzz gas IDs):

N_total_fuzz = N_total_group - (N_total_central + N_total_sat)

However, this approach seems to be wrong because the numbers don't align. For instance, for my_halo_id = 39:

N_total_group = 3744117
N_total_central = 1243005
N_total_sat = 2554479
N_total_fuzz = -53367

What would be the optimal method for identifying the gas particles belonging to the halo but not bound to any subhalo?

Thank you in advance.

Dylan Nelson
  • 12 Mar

I think the issue is just that you are double-counting the central subhalo, also including it as a satellite.

satellites_ids = np.arange(central_subs, central_subs + group_N_subs)

should be

satellites_ids = np.arange(central_subs+1, central_subs+1 + group_N_subs)

?

Patricia Aparicio Marcos
  • 2
  • 13 Mar

Oh yeah. thank you, I overlooked it! Now that I already have the number of gas particles in the halo fuzz, how do I actually get the information about other properties of that gas? Would it be possible to use something like this? :

gas_fuzz_pos= sP.snapshotSubset('gas', fields=['pos'], subhaloID=gas_fuzz_ind)

or would it be more appropriate to retrieve it from the overall gas content of the halo?:

gas_halo_pos = sP.snapshotSubset('gas', fields=['pos'], haloID=halo_id) 
gas_fuzz_pos = gas_halo_pos[gas_fuzz_ind]

Thank you in advance

Dylan Nelson
  • 13 Mar

If you can create gas_fuzz_ind, then you should use it as in your second example.

These would be particle/cell indices, so they should index a particle/cell array.

They are not subhaloIDs, so they cannot be input as a subhaloID.

Patricia Aparicio Marcos
  • 1
  • 19 Mar

Hello,

I'm currently facing issues with loading gas properties, specifically positions. I've already obtained the gas_fuzz_ind array:

print(gas_fuzz_ind)
[104567940201 104568026729 104568034409 ... 153932862911 153932867142
 153932873467]

I have tried this:

gas_halo_pos = sP.snapshotSubset('gas', fields=['pos'], haloID=halo_id) 
gas_fuzz_pos = gas_halo_pos[gas_fuzz_ind]

However, I encountered the error:

IndexError: index 104567940201 is out of bounds for axis 0 with size 3744117

where 3744117 is the length of the gas_halo_pos array. Additionally, I tried loading positions by specifying gas indices:

gas_fuzz_pos = sP.snapshotSubsetP('gas', 'pos', inds = gas_fuzz_ind)

But this resulted in the following error:

Exception: ERROR: No snapshot found.

I'm not quite sure how to retrieve this information.

Thank you in advance.

Dylan Nelson
  • 19 Mar

Those are not indices, they are too big. Indices can only go from 0 to the number of gas in a snapshot, for example.

Perhaps they are ParticleIDs instead?

  • Page 1 of 1