[yt-users] Profiles, root grid

David Collins dcollins at physics.ucsd.edu
Tue May 10 07:39:43 PDT 2011


> The covering grid is a bit special, in that it is not *quite* a data
> container.  It can't be evaluated lazily, as you have seen.  This is
> because it's designed to actually fill in a grid, which it then
> returns to you -- sometimes with cells from the grids it contains
> being included multiple times, as necessary.  I'm not sure we can get
> around this, but I think that the grid collection might work?  Any
> ideas?
>

Aha, that makes sense.  It works with HardWorking reader just fine, so
maybe an error could be raised if lazy_reader is used with that kind
of object.

d.





> Best,
>
> Matt
>
>>
>> Thanks!
>> d.
>>
>>>
>>> -Matt
>>>
>>> On Mon, May 9, 2011 at 10:24 AM, David Collins
>>> <dcollins at physics.ucsd.edu> wrote:
>>>> Hey, Matt--
>>>>
>>>> I found that if I do "lazy_reader = False" the covering grid works
>>>> fine.  It looks like somewhere the field string in one of the
>>>> __getitem__  calls is being treated like a list.
>>>>
>>>> I'm interested in using this with some derivative quantities, can I
>>>> just send 'DivV' to the grid collection in your example, or will I
>>>> have to let it know that it should grab ghost zones?
>>>>
>>>> d.
>>>>
>>>> On Mon, May 9, 2011 at 10:57 AM, Matthew Turk <matthewturk at gmail.com> wrote:
>>>>> Hi David,
>>>>>
>>>>> Try a grid_collection:
>>>>>
>>>>> gc = pf.h.grid_collection([0.5,0.5,0.5], [pf.h.grids[0]])
>>>>>
>>>>> Note that it still requires a 'center'.  Also, this object is not
>>>>> supposed to do any child masking, so if you find that it does, let me
>>>>> know.
>>>>>
>>>>> -Matt
>>>>>
>>>>> On Mon, May 9, 2011 at 9:43 AM, david collins <antpuncher at gmail.com> wrote:
>>>>>> Hi there--
>>>>>>
>>>>>> I'd like to add a profile object using only the root grid.  I
>>>>>> typically do something like this:
>>>>>>
>>>>>> pc.add_profile_object(region,fields, weight=weight)
>>>>>>
>>>>>> Is there a way to restrict this to only root grid tiles?  I've tried
>>>>>> using a covering grid, but that's throwing some key error (that I'm
>>>>>> looking into presently, I'll have more info if/as I sort it out)
>>>>>>
>>>>>> Thanks,
>>>>>> d.
>>>>>>
>>>>>> --
>>>>>> Sent from my computer.
>>>>>> _______________________________________________
>>>>>> yt-users mailing list
>>>>>> yt-users at lists.spacepope.org
>>>>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>>>>
>>>>> _______________________________________________
>>>>> yt-users mailing list
>>>>> yt-users at lists.spacepope.org
>>>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Sent from my computer.
>>>> _______________________________________________
>>>> yt-users mailing list
>>>> yt-users at lists.spacepope.org
>>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>>
>>> _______________________________________________
>>> yt-users mailing list
>>> yt-users at lists.spacepope.org
>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>
>>
>>
>>
>> --
>> Sent from my computer.
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>



-- 
Sent from my computer.



More information about the yt-users mailing list