I've been attempting to look at a Gadget-2 file's temperature by converting the code units into real units, by using the unit_base argument but I haven't been able to alter the temperature in any way. I am wondering if anyone knows how to convert the gadget units of temperature? The temperature for my simulation is not individually given to each particle but is derived from the internal energy and chemical abundance. Any help would be greatly appreciated.
These are my imports
import yt
import soxs
import pyxsim
import numpy as np
This is the code
fname = '/Users/Andrew/Downloads/output_00056/new_180'
unit_base = {'UnitLength_in_cm' : 1.2e+17,
'UnitTime_in_yr' : 61.03633,
'UnitVelocity_in_cm_per_s' : 6.23e+7,
'UnitMass_in_g' : 6.97e+39,
'UnitTemp_in_K' : 3.568e+7}
bbox_lim = 850 #kpc
bbox = [[-bbox_lim,bbox_lim],
[-bbox_lim,bbox_lim],
[-bbox_lim,bbox_lim]]
ds = yt.load(fname,unit_base=unit_base,bounding_box=bbox,default_species_fields="ionized")
ds.index
ad= ds.all_data()
This is the ds field list:
('Bndry', 'Coordinates'),
('Bndry', 'Mass'),
('Bndry', 'ParticleIDs'),
('Bndry', 'Velocities'),
('Gas', 'Coordinates'),
('Gas', 'Density'),
('Gas', 'InternalEnergy'),
('Gas', 'Mass'),
('Gas', 'ParticleIDs'),
('Gas', 'SmoothingLength'),
('Gas', 'Velocities'),
('Halo', 'Coordinates'),
('Halo', 'Mass'),
('Halo', 'ParticleIDs'),
('Halo', 'Velocities'),
('Stars', 'Coordinates'),
('Stars', 'Mass'),
('Stars', 'ParticleIDs'),
('Stars', 'Velocities'),
('all', 'Coordinates'),
('all', 'Mass'),
('all', 'ParticleIDs'),
('all', 'Velocities'),
('nbody', 'Coordinates'),
('nbody', 'Mass'),
('nbody', 'ParticleIDs'),
('nbody', 'Velocities')]