Hi Stephen,

Since we have the luxury in this particular case of addressing both supply side and consumer side behavior, my inclination is for the more elegant solution. In this case, I would say that is option two, where particles are explicitly noted in the Enzo output.


On Dec 18, 2012 11:00 AM, "Stephen Skory" <s@skory.us> wrote:
Hi all,

I am starting to have potentially useful active particles in Enzo 3.0,
and I'd like to look at them with yt 3.0. However, I'm still running
into some problems accessing the active particles (APs).

Specifically, the problems seems to be that in
frontends/enzo/data_structures.py it's only looking for APs identified
through parameter_file.parameters["AppendActiveParticleType"], but
"DarkMatter" isn't listed as an AP type in the Enzo parameter file.
Also, the inner loop over HDF5 AP group members in
_detect_active_particle_fields(self) includes the "DarkMatter" field,
which isn't expected, and causes a KeyError for the dict that is being
built there.

I think that there are a couple potential fixes for this (that I'm
willing to do/help with), and I'd like your thoughts on them, please:

1. Modify yt such that the "DarkMatter" AP field is treated more like
the non-AP fields, meaning that instead of using the
"AppendActiveParticleType" parameter as the driver for searching,
instead auto-detect "DarkMatter". Unlike other APs, "DarkMatter"
should be in most grids and random auto-detection should work.

2. In Enzo include "DarkMatter" as a dummy AP type which would have
the main/only effect of including "DarkMatter" as a
"AppendActiveParticleType" parameter. I think that this would address
all of the present issues with yt. Or perhaps even better, introduce a
new Enzo parameter "ParticleTypesPresent" that would be
("AppendActiveParticleType") + "DarkMatter" most of the time.

Thank you for your thoughts!

Stephen Skory
510.621.3687 (google voice)
yt-dev mailing list