[yt-users] draw_ids

David Collins dcollins4096 at gmail.com
Thu Sep 3 14:46:32 PDT 2015


>
>
> On Thu, Sep 3, 2015 at 3:41 PM, Nathan Goldbaum <nathan12343 at gmail.com>
> wrote:
>
>> What's the output of:
>>
>> for g in ds.index.grids:
>>     if g.id == 170:
>>         print g.LeftEdge
>>         print g.RightEdge
>>         print g.level
>>
>
Shouldn't that be 169, or do I have an OB1?  The coordinates are
[0,1]x[0,1]x[24/64]
Left = [ 0.375  0.25   0.25 ] code_length
Right = [ 0.5  0.5  0.5] code_length
g.Level = 1

So the position makes sense, but the level is wrong.

Plotting the grid indices, however, shows that the left-most 169 is vastly
wrong, the grid id should be more like 20:
http://imgur.com/g0ciWkc

Thanks!  I'll focus on using the grid_index field to track this down.

For what its worth, I"m trying to track down some oddly missing grids.
This is a slice of a sphere, but clearly some grids are not getting either
filled or plotted:

http://imgur.com/4lLToLk

If that's a familiar glitch, let me know, though I don't think its a yt
glitch.


d.




On Thu, Sep 3, 2015 at 4:45 PM, Nathan Goldbaum <nathan12343 at gmail.com>
 wrote:

> You could also make a SlicePlot of the grid_indices field and compare with
> the colorbar to see if the ids labels are wrong in the grid callback.
>




>
>> Also what are the slice coordinates and widths of the two SlicePlots in
>> your email?
>>
>> On Thu, Sep 3, 2015 at 3:32 PM, David Collins <dcollins4096 at gmail.com>
>> wrote:
>>
>>> This is about what I expected.  So why and or how do I have these two
>>> slices with grid ids that are the same, but clearly not the same grid? The
>>> below shows two slices from the same simulation, but notice that number 169
>>> is a level 2 grid near the center in the first plot, and a level one grid
>>> near the edge in the second plot.  The grid with id =169 is a level 1 grid,
>>> but seems to have RightEdge that's consistent with the center of the center
>>> of the box.
>>>
>>> http://imgur.com/a/mvCzW
>>>
>>> d.
>>>
>>> On Thu, Sep 3, 2015 at 4:14 PM, Matthew Turk <matthewturk at gmail.com>
>>> wrote:
>>>
>>>>
>>>>
>>>> On Thu, Sep 3, 2015 at 3:12 PM, Nathan Goldbaum <nathan12343 at gmail.com>
>>>> wrote:
>>>>
>>>>> The code for that is here:
>>>>>
>>>>>
>>>>> https://bitbucket.org/yt_analysis/yt/src/a7c319c1f87d4b749aa6feb737da504e43a7defb/yt/visualization/plot_modifications.py?at=yt#plot_modifications.py-628
>>>>>
>>>>> It's coming from the grid_indicies field, which is defined here:
>>>>>
>>>>>
>>>>> https://bitbucket.org/yt_analysis/yt/src/a7c319c1f87d4b749aa6feb737da504e43a7defb/yt/fields/geometric_fields.py?at=yt#geometric_fields.py-61
>>>>>
>>>>> Due the validators used in that field definition "data" is an
>>>>> AMRGridPatch instance, which is defined in yt/data_objects/grid_patch.py. "
>>>>> data.id" is the grid ID and "data._id_offset" is (as far as I can
>>>>> see) always 1.
>>>>>
>>>>
>>>> Should only be 1 for Enzo, I think.  The other patch-AMR datasets are I
>>>> think all 0-indexed.
>>>>
>>>>
>>>>>
>>>>> -Nathan
>>>>>
>>>>> On Thu, Sep 3, 2015 at 2:58 PM, David Collins <dcollins4096 at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi, Everybody--
>>>>>>
>>>>>> I'm trying to sort out some funny issues with a run, and I'm using
>>>>>> the draw_ids flag to annotate_grids.  I'm noticing that the same IDs are
>>>>>> used in wildly different grids.  Where do the ids used for this flag come
>>>>>> from, and how can I relate them to the grids in index.grids?
>>>>>>
>>>>>> d.
>>>>>>
>>>>>> --
>>>>>> -- Sent from a 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
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> yt-users mailing list
>>>> yt-users at lists.spacepope.org
>>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>>
>>>>
>>>
>>>
>>> --
>>> -- Sent from a 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 a computer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20150903/6a60bd18/attachment.html>


More information about the yt-users mailing list