[yt-users] Over plot particles

Casey W. Stark caseywstark at gmail.com
Thu May 24 13:03:13 PDT 2012


Hi Remudin.

Could you include the script that is generating the error?

I'm not sure without the script, but it looks like you are trying to access
the "particle_position_y" field and it is not in the plotfile you are
working with.

Best,
Casey


On Thu, May 24, 2012 at 11:15 AM, REMUDIN RESHID MEKURIA
<remudin at yahoo.com>wrote:

> Dear all,
>
> Thank you for your help in advance.
> I am currently running cosmological simulations using Nyx code.
> And while trying to over plotting particles on the density slice, I
> encountered the following error which I couldn't resolve. I will greatly
> appreciate your help.
>
> Traceback (most recent call last):
>   File "./OverPlotingParticles.py", line 14, in <module>
>     pc.set_width(1.0, '1') # change width of our plot to the full domain
>   File
> "/home/uni06/cosmo/rmekuri/yt-x86_64/src/yt-hg/yt/visualization/plot_collection.py",
> line 267, in set_width
>     plot.set_width(width, unit)
>   File
> "/home/uni06/cosmo/rmekuri/yt-x86_64/src/yt-hg/yt/visualization/plot_types.py",
> line 441, in set_width
>     self._refresh_display_width()
>   File
> "/home/uni06/cosmo/rmekuri/yt-x86_64/src/yt-hg/yt/visualization/plot_types.py",
> line 459, in _refresh_display_width
>     self._redraw_image()
>   File
> "/home/uni06/cosmo/rmekuri/yt-x86_64/src/yt-hg/yt/visualization/plot_types.py",
> line 406, in _redraw_image
>     self._run_callbacks()
>   File
> "/home/uni06/cosmo/rmekuri/yt-x86_64/src/yt-hg/yt/visualization/plot_types.py",
> line 259, in _run_callbacks
>     cb(self)
>   File
> "/home/uni06/cosmo/rmekuri/yt-x86_64/src/yt-hg/yt/visualization/plot_modifications.py",
> line 985, in __call__
>     &   ( reg[field_y] >= y0 ) & ( reg[field_y] <= y1 ) )
>   File
> "/home/uni06/cosmo/rmekuri/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
> line 319, in __getitem__
>     self.get_data(key)
>   File
> "/home/uni06/cosmo/rmekuri/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
> line 2410, in get_data
>     if self._generate_field(field):
>   File
> "/home/uni06/cosmo/rmekuri/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
> line 352, in _generate_field
>     raise KeyError(field)
> KeyError: 'particle_position_y'
>
> With best regards,
>
> Cheers,
>
> Remudin
>
> ------
>
> Remudin Reshid Mekuria                              phone: +49 (0)551
> 39-13805
>
> IAG, Friedrich-Hund-Plaz 1                           fax: +49 (0)551
> 39-5043
>
> D-37077 Goettingen
>
> Germany
>
>
>
>
> _______________________________________________
> 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/20120524/f151f8fc/attachment.htm>


More information about the yt-users mailing list