search for subhalos with conditions

Matheus Agenor
  • 1
  • 21 May

Dear TNG50 team,

I am currently working on selecting high gas fraction galaxies at $z=0$ in the TNG50 simulation, defining the gas fraction as:

FG = M_gas / M_stellar

However, I am facing a problem. My selection returns a surprisingly large number of galaxies with $\mathrm{GF} > 1$ compared to $\mathrm{GF} < 1$. More concerning is that some objects classified as galaxies in the selection have total masses exceeding $10^{12} \, M_\odot$, which clearly correspond to galaxy clusters rather than individual galaxies, for example a subhalo whose id is 0.

I would appreciate your help in understanding whether I am making any mistakes in the parameter selection or in the physical assumptions.

Selection Criteria Applied:

  1. SubhaloFlag Filter

    • Condition: SubhaloFlag == 1
    • Purpose: Excludes subhalos not considered gravitationally bound or properly identified.
    • → Counter: count_flagged
  2. Minimum Stellar Mass Threshold

    • Condition: $M{\rm star} \geq 10^7 \, M\odot$
    • Purpose: Ensures the subhalo contains a significant stellar component to be considered a galaxy.
    • → Counter: count_star_too_low
  3. Dark Matter Dominance Check

    • Condition: $M{\rm DM} \geq M{\rm gas} + M_{\rm star}$
    • Purpose: Guarantees the system is dark matter dominated, as expected for galaxies.
    • → Counter: count_dm_too_low
  4. Existence of Stars Check

    • Condition: $M_{\rm star} > 0$
    • Purpose: Removes purely gaseous subhalos with no stellar content.
    • → Counter: count_invalid
  5. Gas Fraction Classification

    • After applying all the filters above:
    • If $\mathrm{GF} > 1$: counted as high gas fraction (count_gf_gt1)
    • If $\mathrm{GF} \leq 1$: counted as low gas fraction (count_gf_lt1)
    • If $M_{\rm gas} = 0$, classified as $\mathrm{GF} = 0$ (falls under GF < 1)

Results Obtained:

  • Total subhalos in the snapshot: 5,688,113
  • Subhalos passing all filters: 16,177

    • With $\mathrm{GF} > 1$: 2,849
    • With $\mathrm{GF} < 1$: 13,328

This results in ~17% of the selected galaxies having $\mathrm{GF} > 1$, which seems unexpectedly high. Additionally, the presence of extremely massive objects (> $10^{12} \, M_\odot$) labeled as galaxies suggests a possible problem in the selection criteria.


Question:

Is there a mistake in the way I’m filtering the subhalos, particularly in ensuring that I am not inadvertently including central halos of clusters or intracluster gas? Or could the gas fraction distribution at z=0 in TNG50 naturally include such a high proportion of gas-rich systems?


Code Snippet:

(Note: the lines with missing keys are just illustrative; I can send the full working code if helpful.)

def count_subhalos(subs, h):
    total_subhalos = len(subs['SubhaloFlag'])
    count_gf_gt1 = 0
    count_gf_lt1 = 0
    count_invalid = 0
    count_flagged = 0
    count_dm_too_low = 0
    count_star_too_low = 0

    for i in range(total_subhalos):
        if subs['SubhaloFlag'][i] != 1:
            count_flagged += 1
            continue

        mstar = subs['SubhaloMassInRadType'][4][i] * 1e10 / h
        mgas = subs['SubhaloMassInRadType'][0][i] * 1e10 / h
        mdm  = subs['SubhaloMassInRadType'][1][i] * 1e10 / h

        if mstar == 0:
            count_invalid += 1
            continue

        if mstar < 1e7:
            count_star_too_low += 1
            continue

        if mdm < (mstar + mgas):
            count_dm_too_low += 1
            continue

        if mgas == 0:
            count_gf_lt1 += 1
            continue

        gf = mgas / mstar
        if gf > 1:
            count_gf_gt1 += 1
        else:
            count_gf_lt1 += 1

    return {
        'total': total_subhalos,
        'gf_gt1': count_gf_gt1,
        'gf_lt1': count_gf_lt1,
        'invalid': count_invalid,
        'flagged': count_flagged,
        'dm_too_low': count_dm_too_low,
        'star_too_low': count_star_too_low,
        'valid': count_gf_gt1 + count_gf_lt1
    }

I would sincerely appreciate any guidance on whether the filters I’m applying are correct for isolating galaxies (excluding clusters) and for calculating the gas fraction in a physically meaningful way.

Thank you very much in advance for your help.

Best regards,
Matheus Agenor


Dylan Nelson
  • 23 May

I think a more typical definition of galaxy gas fraction would be M_gas / (M_gas + M_stellar).

if you define it just as the ratio of gas to stellar mass, it doesn't surprise me that many galaxies exceed unity.

Till Sawala
  • 1 Jun

In addition to Dylan's comment, I don't see anything in your definition that would prevent you from including galaxy clusters? If you want to be sure that you select what would be considered a galaxy rather than a galaxy cluster, perhaps include an upper limit on the mass.

  • Page 1 of 1