<div dir="ltr"><div><div><div>Hi Matt, <br><br></div>Ah OK I see. That construction is only valid in yt-3.0 then? <br><br></div>Moving to yt-3.0 then would seem to be the most obvious option.<br><br></div>Thanks!<br></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 24, 2014 at 4:24 PM, Matthew Turk <span dir="ltr"><<a href="mailto:matthewturk@gmail.com" target="_blank">matthewturk@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi John,<br>
<div><div class="h5"><br>
On Thu, Jul 24, 2014 at 7:38 AM, John Regan <<a href="mailto:johnanthonyregan@gmail.com">johnanthonyregan@gmail.com</a>> wrote:<br>
> Hi All,<br>
><br>
> I'm having trouble reading Active Particle data from Enzo-3.0 outputs.<br>
><br>
> .<br>
> .<br>
> .<br>
> dd = pf.h.all_data()<br>
> print dd["RadiationParticle", "particle_position_x"]<br>
> .<br>
> .<br>
><br>
> gives<br>
><br>
>  File "PrintActiveParticleInfo.py", line 18, in <module><br>
>     print dd["RadiationParticle", "particle_position_x"]<br>
>   File<br>
> "/homeappl/home/regan/appl_taito/YT/Dev/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",<br>
> line 325, in __getitem__<br>
>     self.get_data(key)<br>
>   File<br>
> "/homeappl/home/regan/appl_taito/YT/Dev/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",<br>
> line 2627, in get_data<br>
>     if self._generate_field(field):<br>
>   File<br>
> "/homeappl/home/regan/appl_taito/YT/Dev/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",<br>
> line 358, in _generate_field<br>
>     raise KeyError(field)<br>
> KeyError: ('RadiationParticle', 'particle_position_x')<br>
><br>
> From dumping the hdf5 file the dataset (particle_position_x) exists in the<br>
> group RadiationParticle.<br>
> I'm probably missing something simple.... but any hints would be<br>
> appreciated!<br>
> Oh I'm using yt-2.7.dev<br>
<br>
</div></div>Unfortunately, right now to my recollection active particles don't<br>
work with yt 2.x.  The construction you're using, with<br>
dd[particle_type, particle_field] definitely doesn't work with yt 2.x.<br>
If you want to avoid moving to yt 3.0, you can probably stitch the<br>
particles together with h5py manually, thought.<br>
<div class=""><br>
><br>
> John<br>
><br>
><br>
> P.S.<br>
> Is there documentation on the yt website for reading Enzo-3.0 outputs?<br>
><br>
><br>
><br>
> (yt-x86_64)[regan@taito-login3 GeneralRoutines]$ yt version<br>
><br>
> yt module located at:<br>
>     /homeappl/home/regan/appl_taito/YT/Dev/yt-x86_64/src/yt-hg<br>
> The supplemental repositories are located at:<br>
>     /homeappl/home/regan/appl_taito/YT/Dev/yt-x86_64/src/yt-supplemental<br>
><br>
> The current version and changeset for the code is:<br>
><br>
> ---<br>
> Version = 2.7-dev<br>
> Changeset = e89295c7393d<br>
> ---<br>
><br>
> This installation CAN be automatically updated.<br>
> yt dependencies were last updated on<br>
> Tue Dec  3 18:24:50 EET 2013<br>
><br>
> To update all dependencies, run "yt update --all".<br>
> (yt-x86_64)[regan@taito-login3 GeneralRoutines]$<br>
><br>
><br>
><br>
</div>> _______________________________________________<br>
> yt-users mailing list<br>
> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
><br>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</blockquote></div><br></div>