[yt-dev] Issue #827: Enzo particle fields work differently than the other frontends (yt_analysis/yt)

Nathan Goldbaum issues-reply at bitbucket.org
Sat Apr 5 18:07:08 PDT 2014


New issue 827: Enzo particle fields work differently than the other frontends
https://bitbucket.org/yt_analysis/yt/issue/827/enzo-particle-fields-work-differently-than

Nathan Goldbaum:

Since we use enzo field names as the 'standard' yt fields the Enzo frontend is setup such that it doesn't define any aliases.  This introduces an asymmetry compared to the other frontends, since alias fields are always in CGS.  Take as an example the following script: 


```
#!python

import yt

fns = [
    'sizmbhloz-clref04SNth-rs9_a0.9011/sizmbhloz-clref04SNth-rs9_a0.9011.art',
    'IsolatedGalaxy/galaxy0030/galaxy0030'
    ]

for fn in fns:
    ds = yt.load(fn)

    ad = ds.all_data()

    print ds
    print ad['particle_mass']
    print ad['particle_position_x']
    print "-------------------------"
```

On the current experimental bookmark, this prints:

```
sizmbhloz-clref04SNth-rs9_a0.9011.art
[  2.60330963e+40   2.60330963e+40   2.60330963e+40 ...,   2.60330963e+40
   2.60330963e+40   8.91022090e+38] g
[  3.84477674e+24   3.87559159e+24   3.89111431e+24 ...,   4.03783894e+24
   4.12904314e+24   4.44574239e+24] cm
-------------------------
galaxy0030
[  5.24322377e-06   5.24322377e-06   5.24423058e-06 ...,   2.51688903e-06
   2.52040900e-06   2.52345330e-06] code_mass
[ 0.50070677  0.50118382  0.50118984 ...,  0.49867166  0.49857796
  0.49865383] code_length
-------------------------
```

The net effect is that for Enzo we can't access particle fields in CGS and only see fields in code units.





More information about the yt-dev mailing list