[yt-dev] RFC: (yt-3.0) Accessing fluids and particles

Stephen Skory s at skory.us
Mon Feb 27 12:18:20 PST 2012


Hi all,

I've been thinking about things, and this actually dovetails onto
Chris' comments as well, I think. The way I see it, in order to get to
data from a dataset, here are the abstract levels yt goes through:

1. Dataset Identifier (pf)
2. Data Container (pf.obj)
3. Data Type (particles, fluid)
4. Data Type Class (POPIII, interpolated fluid)
5. Data Type Specific Data ("x", "particle_position_x")

What we're struggling with is where to put level #3 in our syntax. As
we currently have it, it's done at the finest level with the
generalized dict access for a specific thing (dd["x"],
dd["ParticleMass"], dd["DerivedField"]), and yt works out the rest. I
don't know if I myself like this idea, but we might want to consider
putting the Data Type specification up higher. For example we could
have Data Type-specific data containers (dd_fluid =
pf.h.all_data("fluid")). Or, I like this even less, but it's
conceivable that there could be a Data Type-specific load (pf_parts =
load("DD1234", "particles").

I'm not making any suggestions here, I just want to see if anyone sees
any benefit from changing the level at which Data Type is specified?
Feel free to say "no, stupidest idea since lawn darts." I'm not
convinced it isn't.

-- 
Stephen Skory
s at skory.us
http://stephenskory.com/
510.621.3687 (google voice)



More information about the yt-dev mailing list