Extracting galaxies/subhalo from entire data volume

Nikita Agarwal
  • 2
  • 6 Sep '21

Hi Dylan,
I am interested in plotting the evolution of galaxies across redshifts with magnetic fields as a primary parameter. The other parameters including Density, Temperature and Kinetic Energy.
I want to look at only the part of the data involving galaxies with magnetic field but am currently dealing with the entire volume per snapshot which also contains cosmic filaments and voids. This takes up a lot of disk space and compilation time.
I tried:
for i in range (0,10):
gas = il.groupcat.loadSubhalos(basePath,99,i,fields=None)
if ('MagneticField' in gas.keys() ):

But this too takes a long time to load.

Is there any way to extract galaxy / subhalo data having magnetic field parameters for different galaxies and thus reduce data size. Also, is there a way to know how many subhalos are present per catalog?

Regards,
Nikita

Dylan Nelson
  • 6 Sep '21

Hello Nikita,

For all 20 main snapshots (not "mini" snapshots) of the TNG simulations, gas cells (PartType0) contain the MagneticField dataset.

The function groupcat.loadSubhalos() loads the list, and properties, of subhalos from the catalog. You can use it to search for subhalos of interest, but there is no magnetic field information in the catalog. Once you have a subhalo ID of interest, you can load all the gas that belongs to it as snapshot.loadSubhalo(basePath, snapNum, subhaloID, 'gas', fields=['MagneticField']).

The number of halos is available in the header of the catalog, via groupcat.loadHeader().

Nikita Agarwal
  • 6 Sep '21

Thank you Dylan, this has been extremely helpful.

Nikita Agarwal
  • 6 Sep '21

Hi Dylan,

Could you please confirm the difference between 'Ngroups_ThisFile' and 'Ngroups_Total' in the Subhalo header catalogs?
Also, how can I find the total number of subhaloIDs for a particular snapshot.

Regards,
Nikita

Dylan Nelson
  • 7 Sep '21

The documentation describes all these fields in the group catalog header.

  • Page 1 of 1