[yt-users] Error: Particle Bounds

Desika Narayanan desika.narayanan at gmail.com
Mon Jun 27 20:23:31 PDT 2016


Hi Adrianna,

My guess is that you might need to set a bounding box on the simulation.
There's an example of how to load with a bounding box here:

http://yt-project.org/doc/cookbook/gadget_notebook.html

especially the lines around here:

bbox_lim = 1e5 #kpc
bbox = [[-bbox_lim,bbox_lim],
        [-bbox_lim,bbox_lim],
        [-bbox_lim,bbox_lim]]
 ds = yt.load(fname,unit_base=unit_base,bounding_box=bbox)




the thing is you'll have to make your box bigger than the extent of all of
your particles (which, if you don't know a priori, you could do either with
a guess and check, or by explicitly checking their locations with something
like:

ad = ds.all_data()
coordinates = ad[('PartType0', 'Coordinates')]

and then checking the max/min coordinate values.

-d



On Mon, Jun 27, 2016 at 10:52 PM, Adrianna Perez <
aperez313 at toromail.csudh.edu> wrote:

> Hi Nathan,
>
> Thanks for getting back to me! This is the code I am running and the file "snapshot_020.hdf5"
> is saved on my desktop. Sorry I do not know the answer to the third
> question. All I know is that it's simulated data.
>
> Code:
>
> ds = yt.load("snapshot_020.hdf5")
>
> # Create density slices in all three axes.
>
> yt.SlicePlot(ds, 'x', "density", width = (1000.0, 'kpc')).save()
>
> yt.SlicePlot(ds, 'y', "density", width = (1000.0, 'kpc')).save()
>
> yt.SlicePlot(ds, 'z', "density", width = (1000.0, 'kpc')).save()
>
> Thank you,
>
> Adrianna P.
>
> On Mon, Jun 27, 2016 at 6:05 PM, Nathan Goldbaum <nathan12343 at gmail.com>
> wrote:
>
>> Hi Adriana,
>>
>> Can you share a short code sample that triggers this error? In
>> particular, how are you loading your dataset? Is this a cosmological or
>> non-cosmological output?
>>
>> Nathan
>>
>>
>> On Monday, June 27, 2016, Adrianna Perez <aperez313 at toromail.csudh.edu>
>> wrote:
>>
>>> To whom it may concern,
>>>
>>> I am having trouble loading GIZMO data to make a simple slice plot and
>>> this is the error I get:
>>>
>>> yt.utilities.exceptions.YTDomainOverflow: Particle bounds (-934.41559,
>>> -727.99188, -1092.047) and (509.55978, 797.46954, 1034.1028) exceed domain
>>> bounds [ 0.  0.  0.] code_length and [ 10000.  10000.  10000.] code_length
>>>
>>> Any help would be really useful. Please send me any questions you may
>>> have.
>>>
>>> Please and thank you,
>>>
>>> Adrianna Perez
>>>
>>
>> _______________________________________________
>> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160627/9b3add90/attachment.html>


More information about the yt-users mailing list