[yt-dev] Issue #1325: Fields cannot be retrieved properly from ray object created from reloaded ytdata (yt_analysis/yt)

Bili Dong issues-reply at bitbucket.org
Tue Feb 21 10:26:23 PST 2017


New issue 1325: Fields cannot be retrieved properly from ray object created from reloaded ytdata
https://bitbucket.org/yt_analysis/yt/issues/1325/fields-cannot-be-retrieved-properly-from

Bili Dong:

I'm trying to create a ray object from a saved ytdata and access its fields using the following script:

```python
import yt

ds = yt.load('FIRE_M12i_ref11/snapshot_600.hdf5')
ad = ds.all_data()
ad['PartType0', 'Density']
path = ad.save_as_dataset()
ds_reload = yt.load(path)
ray_reload = ds_reload.ray(ds_reload.domain_left_edge,
                           ds_reload.domain_right_edge)
print(ray_reload['PartType0', 'Density'])
print(ray_reload['t'])
```

And the outputs are:

```
[] code_mass/code_length**3
[ 0.         0.25       0.5        0.5078125  0.515625   0.5234375  0.53125
  0.546875   0.5625     0.59375    0.625      0.6875     0.75       0.875    ] dimensionless
```

Somehow `ray_reload['PartType0', 'Density']` is empty, which is not what I expected.




More information about the yt-dev mailing list