Hello!
I am trying to run Trident with IllustrisTNG data (HDF5 file). I am trying to familiarize myself with Trident (first time using it!). I am trying to make a light ray following the tutorial on the trident website.
The following is the log display when I load my file:
>>> ds=yt.load('cutout_13.hdf5')
yt : [INFO ] 2022-07-05 13:01:45,181 Calculating time from 1.000e+00 to be 4.340e+17 seconds
yt : [INFO ] 2022-07-05 13:01:45,181 Assuming length units are in kpc/h (comoving)
yt : [INFO ] 2022-07-05 13:01:45,227 Parameters: current_time = 4.3395518355981376e+17 s
yt : [INFO ] 2022-07-05 13:01:45,227 Parameters: domain_dimensions = [2 2 2]
yt : [INFO ] 2022-07-05 13:01:45,227 Parameters: domain_left_edge = [0. 0. 0.]
yt : [INFO ] 2022-07-05 13:01:45,228 Parameters: domain_right_edge = [75000. 75000. 75000.]
yt : [INFO ] 2022-07-05 13:01:45,228 Parameters: cosmological_simulation = 1
yt : [INFO ] 2022-07-05 13:01:45,228 Parameters: current_redshift = 2.220446049250313e-16
yt : [INFO ] 2022-07-05 13:01:45,228 Parameters: omega_lambda = 0.7274
yt : [INFO ] 2022-07-05 13:01:45,228 Parameters: omega_matter = 0.2726
yt : [INFO ] 2022-07-05 13:01:45,228 Parameters: omega_radiation = 0.0
yt : [INFO ] 2022-07-05 13:01:45,228 Parameters: hubble_constant = 0.704
>>>
I am using the following command to generate the light ray:
ray=trident.make_simple_ray(ds,start_position=[0,0,0],end_position=[70000,70000,70000],lines=['H','Mg','O'],fields='Density',ftype='PartType0')
I see the following error:
yt : [INFO ] 2022-07-05 13:04:20,761 Allocating for 4.215e+05 particles (index particle type 'all')
yt : [INFO ] 2022-07-05 13:04:21,532 Identified 2.558e+04 octs
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/trident/ray_generator.py", line 246, in make_simple_ray
sampling_type = _check_sampling_types_match(ds, ftype)
File "/usr/local/lib/python2.7/dist-packages/trident/utilities.py", line 507, in _check_sampling_types_match
field_sampling_type = ds.field_info[ftype, 'density'].sampling_type
File "/usr/local/lib/python2.7/dist-packages/yt/fields/field_info_container.py", line 369, in __missing__
raise KeyError("No field named %s" % (key,))
KeyError: "No field named ('PartType0', 'density')"
I have been unsuccessfully trying to find a way to solve it. Your help would be really appreciated! Thanks in advance!
With best wishes,
Jaswanth