<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Thanks Casey,</div><div><br></div><div>This is the script I used from yt-cookbook Overplot particles</div><div><br></div><div>#!/usr/users/rmekuri/data/yt-x86_64/bin/python                                                                                                              </div><div>from yt.mods import * # set up our namespace                                                                                                                </div><div><br></div><div>fn = "plt00736" # parameter file to load                                                                                                                    </div><div><br></div><div>pf = load(fn) # load data                                                                                                                                   </div><div>pc = PlotCollection(pf, [0.5, 0.5, 0.5])</div><div>p = pc.add_projection("Density", 0)</div><div>p.modify["particles"](1.0) # 1.0 is the 'width' we want for our slab of                                                                                     </div><div>                            # particles -- this governs the allowable locations                                                                             </div><div>                            # of particles that show up on the image                                                                                        </div><div>                            # NOTE: we can also supply a *ptype* to cut based                                                                               </div><div>                            # on a given (integer) particle type                                                                                            </div><div>pc.set_width(1.0, '1') # change width of our plot to the full domain                                                                                        </div><div>pc.save(fn) # save all plots         </div><div><br></div><div>Cheers,</div><div><br></div><div>Remudin                                                                                                                       </div><div><br></div><div><div>On 2012 Cam 24, at 22:03, Casey W. Stark wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Remudin.<div><br></div><div>Could you include the script that is generating the error?</div><div><br></div><div>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.</div>

<div><br></div><div>Best,</div><div>Casey</div><div><br><br><div class="gmail_quote">On Thu, May 24, 2012 at 11:15 AM, REMUDIN RESHID MEKURIA <span dir="ltr"><<a href="mailto:remudin@yahoo.com" target="_blank">remudin@yahoo.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><font size="4">Dear all,</font><div><font size="4"><br></font></div><div><font size="4">Thank you for your help in advance.</font></div>

<div><font size="4">I am currently running cosmological simulations using Nyx code.</font></div><div><font size="4">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.</font></div>

<div><br></div><div><div><font color="#01115b">Traceback (most recent call last):</font></div><div><font color="#01115b">  File "./OverPlotingParticles.py", line 14, in <module></font></div><div><font color="#01115b">    pc.set_width(1.0, '1') # change width of our plot to the full domain</font></div>

<div><font color="#01115b">  File "/home/uni06/cosmo/rmekuri/yt-x86_64/src/yt-hg/yt/visualization/plot_collection.py", line 267, in set_width</font></div><div><font color="#01115b">    plot.set_width(width, unit)</font></div>

<div><font color="#01115b">  File "/home/uni06/cosmo/rmekuri/yt-x86_64/src/yt-hg/yt/visualization/plot_types.py", line 441, in set_width</font></div><div><font color="#01115b">    self._refresh_display_width()</font></div>

<div><font color="#01115b">  File "/home/uni06/cosmo/rmekuri/yt-x86_64/src/yt-hg/yt/visualization/plot_types.py", line 459, in _refresh_display_width</font></div><div><font color="#01115b">    self._redraw_image()</font></div>

<div><font color="#01115b">  File "/home/uni06/cosmo/rmekuri/yt-x86_64/src/yt-hg/yt/visualization/plot_types.py", line 406, in _redraw_image</font></div><div><font color="#01115b">    self._run_callbacks()</font></div>

<div><font color="#01115b">  File "/home/uni06/cosmo/rmekuri/yt-x86_64/src/yt-hg/yt/visualization/plot_types.py", line 259, in _run_callbacks</font></div><div><font color="#01115b">    cb(self)</font></div><div>

<font color="#01115b">  File "/home/uni06/cosmo/rmekuri/yt-x86_64/src/yt-hg/yt/visualization/plot_modifications.py", line 985, in __call__</font></div><div><font color="#01115b">    &   ( reg[field_y] >= y0 ) & ( reg[field_y] <= y1 ) )</font></div>

<div><font color="#01115b">  File "/home/uni06/cosmo/rmekuri/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 319, in __getitem__</font></div><div><font color="#01115b">    self.get_data(key)</font></div>

<div><font color="#01115b">  File "/home/uni06/cosmo/rmekuri/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 2410, in get_data</font></div><div><font color="#01115b">    if self._generate_field(field):</font></div>

<div><font color="#01115b">  File "/home/uni06/cosmo/rmekuri/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 352, in _generate_field</font></div><div><font color="#01115b">    raise KeyError(field)</font></div>

<div><font color="#01115b">KeyError: 'particle_position_y'</font></div><div><br></div><div>
<div><p align="LEFT" style="margin-bottom:0in"><span style="font-size:large">With best regards,</span></p><div><br></div><div>Cheers,</div><div><br></div><div>Remudin</div><p align="LEFT" style="margin-bottom:0in"><font face="Menlo"><font color="#000000">---</font>---</font></p><p align="LEFT" style="margin-bottom:0in"><font color="#000000" face="Menlo">Remudin Reshid Mekuria                              phone: <a href="tel:%2B49%20%280%29551%2039-13805" value="+495513913805" target="_blank">+49 (0)551 39-13805</a></font></p><p align="LEFT" style="margin-bottom:0in"><font color="#000000" face="Menlo">IAG, Friedrich-Hund-Plaz 1                           fax: <a href="tel:%2B49%20%280%29551%2039-5043" value="+49551395043" target="_blank">+49 (0)551 39-5043</a></font></p><p align="LEFT" style="margin-bottom:0in"><font color="#000000" face="Menlo">D-37077 Goettingen</font></p><p align="LEFT" style="margin-bottom:0in"><font color="#000000" face="Menlo">Germany</font></p></div><div><font color="#000000" face="Menlo"><br>

</font></div><br>
</div>

<br></div></div><br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>
_______________________________________________<br>yt-users mailing list<br><a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org<br></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><p align="LEFT" style="margin-bottom: 0in; "><font class="Apple-style-span" face="Menlo" size="2"><font color="#000000">---</font>---</font></p><p align="LEFT" style="margin-bottom: 0in; "><font color="#000000" face="Menlo" size="2">Remudin Reshid Mekuria                              phone: +49 (0)551 39-13805</font></p><p align="LEFT" style="margin-bottom: 0in; "><font color="#000000" face="Menlo" size="2">IAG, Friedrich-Hund-Plaz 1                           fax: +49 (0)551 39-5043</font></p><p align="LEFT" style="margin-bottom: 0in; "><font color="#000000" face="Menlo" size="2">D-37077 Goettingen</font></p><p align="LEFT" style="margin-bottom: 0in; "><font color="#000000" face="Menlo" size="2">Germany</font></p></div><div><font color="#000000" face="Menlo" size="2"><br></font></div></span><br class="Apple-interchange-newline">
</div>

<br></body></html>