
Hi, Has anyone tried to import a snapshot from SWIFT (https://swift.dur.ac.uk/) into yt? yt.load(SNAPSHOT) gives me the traceback:
yt.load('eagle_0149.hdf5') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/cosma/home/dc-dave2/anaconda3/lib/python3.7/site-packages/yt/loaders.py", line 93, in load return candidates[0](fn, *args, **kwargs) File "/cosma/home/dc-dave2/anaconda3/lib/python3.7/site-packages/yt/frontends/swift/data_structures.py", line 41, in __init__ default_species_fields=default_species_fields, File "/cosma/home/dc-dave2/anaconda3/lib/python3.7/site-packages/yt/frontends/sph/data_structures.py", line 43, in __init__ default_species_fields=default_species_fields, File "/cosma/home/dc-dave2/anaconda3/lib/python3.7/site-packages/yt/data_objects/static_output.py", line 1934, in __init__ default_species_fields=default_species_fields, File "/cosma/home/dc-dave2/anaconda3/lib/python3.7/site-packages/yt/data_objects/static_output.py", line 228, in __init__ self._parse_parameter_file() File "/cosma/home/dc-dave2/anaconda3/lib/python3.7/site-packages/yt/frontends/swift/data_structures.py", line 103, in _parse_parameter_file runtime_parameters = self._get_info_attributes("RuntimePars") File "/cosma/home/dc-dave2/anaconda3/lib/python3.7/site-packages/yt/frontends/swift/data_structures.py", line 84, in _get_info_attributes header = dict(handle[dataset].attrs) File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "/cosma/home/dc-dave2/anaconda3/lib/python3.7/site-packages/h5py/_hl/group.py", line 264, in __getitem__ oid = h5o.open(self.id, self._e(name), lapl=self._lapl) File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "h5py/h5o.pyx", line 190, in h5py.h5o.open KeyError: "Unable to open object (object 'RuntimePars' doesn't exist)"
The snapshot format is similar to Gadget but it appears RunTimePars are in other fields. Here are the hdf5 fields: $ h5ls eagle_0149.hdf5 BHParticles Soft Link {/PartType5} Cells Group Code Group Cosmology Group DMParticles Soft Link {/PartType1} GasParticles Soft Link {/PartType0} GravityScheme Group Header Group HydroScheme Group InternalCodeUnits Group Parameters Group PartType0 Group PartType1 Group PartType4 Group PartType5 Group PhysicalConstants Group Policy Group StarsParticles Soft Link {/PartType4} StarsScheme Group SubgridScheme Group Units Group UnusedParameters Group Some of the other field names within PartType0 etc are also somewhat different, e.g. MetalMassFractions instead of Metallicity. thanks, romeel