I guess I don't understand why we have two dictionaries.  I would think we could define a standard for the normal properties, then read in all others as desired by the user.<div><br></div><div>i would think <span style> LoadTextHaloes(pf, "file.txt", columns = {'x':0, 'y':1, 'z':2, </span><span style>'r':3, 'm':4, 'dinosaur_age':5}) could be possible.  Maybe you would want the value for each key to be (column, type) if you cared about non-float types.</span><br>

<div><br></div><div>Sam<br><br><div class="gmail_quote">On Tue, Jul 10, 2012 at 10:28 AM, 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 Sam,<br>
<br>
I think Stephen's idea is a bit more general than that.  If you look<br>
in halo_objects.py, you can se that the number of properties of a halo<br>
object has 1) exploded 2) no standardization.  Having a dictionary of<br>
properties, which can vary in name, fits more with the yt philosophy.<br>
I like this idea.  We could expand it to "derived properties" as well,<br>
and maybe reduce te number of by-default calculated properties of a<br>
halo.<br>
<br>
If we start thinking of a future where we can load halos without<br>
necessarily affiliating them with simulation data, this could be kind<br>
of cool.  What do you think?<br>
<br>
-Matt<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, Jul 10, 2012 at 9:25 AM, Sam Skillman <<a href="mailto:samskillman@gmail.com">samskillman@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> Could we just check if 'm' exists in the columns dict, and not have a supp<br>
> dict?<br>
><br>
> Sam<br>
><br>
><br>
> On Tue, Jul 10, 2012 at 10:18 AM, Stephen Skory <<a href="mailto:s@skory.us">s@skory.us</a>> wrote:<br>
>><br>
>> Hi all,<br>
>><br>
>> I didn't read my email until this morning, when I saw the text halos<br>
>> thread had exploded. I had no idea how strongly people felt about<br>
>> halos!<br>
>><br>
>> Here is a proposal for a solution that I think reduces confusion and<br>
>> also adds capability. Using Christine's request as an example, what I<br>
>> would do is add to the LoadTextHaloes a supplementary data column<br>
>> dict:<br>
>><br>
>> pf = load("data")<br>
>> halos = LoadTextHaloes(pf, "file.txt", columns = {'x':0, 'y':1, 'z':2,<br>
>> 'r':3}, supp = {'m':4})<br>
>><br>
>> And for each halo object there would be a supp dict hanging off of it:<br>
>><br>
>> h0 = halos[0]<br>
>> h0.supp['m']<br>
>><br>
>> This means that h0.total_mass() will correspond to the sphere, while<br>
>> the 'm' above to whatever's in the text file. This supp dict could be<br>
>> used to store temporary data for each halo object outside the<br>
>> LoadTextHaloes function, and if I hear that it might be useful, it<br>
>> could be included in a halo.dump() save.<br>
>><br>
>> One issue is what happens to the supp columns? Do I float() them, or<br>
>> do I keep them strings, which allows users to convert them if needed?<br>
>> If I keep them strings, 'type' string columns would be useful. Or do I<br>
>> have yet another dict that specifies type in the call to<br>
>> LoadTextHaloes?<br>
>><br>
>> --<br>
>> Stephen Skory<br>
>> <a href="mailto:s@skory.us">s@skory.us</a><br>
>> <a href="http://stephenskory.com/" target="_blank">http://stephenskory.com/</a><br>
>> <a href="tel:510.621.3687" value="+15106213687">510.621.3687</a> (google voice)<br>
>> _______________________________________________<br>
>> yt-dev mailing list<br>
>> <a href="mailto:yt-dev@lists.spacepope.org">yt-dev@lists.spacepope.org</a><br>
>> <a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> yt-dev mailing list<br>
> <a href="mailto:yt-dev@lists.spacepope.org">yt-dev@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
><br>
_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
</div></div></blockquote></div><br></div></div>