<br><br>On Tuesday, October 14, 2014, Elizabeth Tasker <<a href="mailto:tasker@astro1.sci.hokudai.ac.jp">tasker@astro1.sci.hokudai.ac.jp</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi everyone,<div><br></div><div>I've hit a couple of problems trying to generate a particle distribution. I'm following the code here:</div><div><br></div><div><a href="http://blog.yt-project.org/post/ParticleGenerator.html" target="_blank">http://blog.yt-project.org/post/ParticleGenerator.html</a><br></div><div><br></div><div>(at the moment exactly: <a href="http://pastebin.com/JFnWeXqM" target="_blank">http://pastebin.com/JFnWeXqM</a> )</div><div><br></div><div>The first issue was CICDeposit_3 doesn't seem to exist, but from the source code, it looks like it is now  CICSample_3 via "from yt.utilities.lib.CICDeposit import CICSample_3". </div><div><br></div><div>I switched this but then hit a different error:</div><div><br></div><div><br></div><div><div>In [1]: execfile("particle_generator.py")</div><div>yt : [INFO     ] 2014-10-14 17:51:59,895 Parameters: current_time              = 0.0</div><div>yt : [INFO     ] 2014-10-14 17:51:59,895 Parameters: domain_dimensions         = [128 128 128]</div><div>yt : [INFO     ] 2014-10-14 17:51:59,895 Parameters: domain_left_edge          = [ 0.  0.  0.]</div><div>yt : [INFO     ] 2014-10-14 17:51:59,896 Parameters: domain_right_edge         = [ 1.  1.  1.]</div><div>yt : [INFO     ] 2014-10-14 17:51:59,897 Parameters: cosmological_simulation   = 0.0</div><div>---------------------------------------------------------------------------</div><div>KeyError                                  Traceback (most recent call last)</div><div>/home/tasker/yt-3/src/yt-hg/scripts/iyt in <module>()</div><div>----> 1 execfile("particle_generator.py")</div><div><br></div><div>/home/tasker/yt-3/src/yt-hg/scripts/iyt in <module>()</div><div>     39          'particle_position_y':y,</div><div>     40          'particle_position_z':z}</div><div>---> 41 particles1 = FromListParticleGenerator(ug, num_particles1, pdata)</div><div>     42 particles1.assign_indices()</div><div>     43 particles1.apply_to_stream()</div><div><br></div><div>/home/tasker/yt-3/src/yt-hg/yt/utilities/particle_generator.pyc in __init__(self, ds, num_particles, data)</div><div>    227 </div><div>    228         field_list = data.keys()</div><div>--> 229         x = data.pop(("io", "particle_position_x"))</div><div>    230         y = data.pop(("io", "particle_position_y"))</div><div>    231         z = data.pop(("io", "particle_position_z"))</div><div><br></div><div>KeyError: ('io', 'particle_position_x')</div></div><div><br></div><div><br></div><div>I tried updating the code, but 'yt update' then seemed to pull me back from yt-3.0 which I thought I was running (is branch 'yt' now yt-3?) to yt 2:</div><div><br></div><div><br></div><div><br></div><div><div>tasker@schiehallion:~/yt-3/bin$ yt update</div><div>yt : [INFO     ] 2014-10-14 17:48:23,618 Loading plugins from /home/tasker/.yt/my_plugins.py</div><div><br></div><div>yt module located at:</div><div>    /home/tasker/yt-new/src/yt-hg</div><div><br></div><div>The current version and changeset for the code is:</div><div><br></div><div>---</div><div>Version = 2.6.1</div><div>Changeset = f7c69809dbd0 (stable)</div><div>---</div><div><br></div><div>This installation CAN be automatically updated.</div><div>Reading configuration from  /home/tasker/yt-new/src/yt-hg/.hg/hgrc</div></div><div><br></div></div></blockquote><div><br></div><div>Not sure why it's not updating to the current tip of the stable branch.</div><div><br></div>You can always manually do this:<div><br></div><div>$ cd $YT_HG</div><div>$ hg pull <a href="https://bitbucket.org/yt_analysis/yt">https://bitbucket.org/yt_analysis/yt</a></div><div>$ hg update stable</div><div><br></div><div>Or, if you want the latest dev branch:</div><div><br></div><div>$ hg update yt</div><div><br></div><div>If you have changes in your local copy, you might need to use "hg update -C", which clears local changes.  You can also use hg shelve if you want to save local changes without making a commit.</div><div><br></div><div>Finally, in case any cython files have changed since you last updated, you should do:</div><div><br></div>$ python setup.py develop<br><div><div> </div><div>Nathan</div><div><br></div>(typed on a phone, apologies for any typos)<span></span><br><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Could someone give me a shove back onto the right track with those two issues?</div><div><br></div><div>Thanks!</div><div><br></div><div>Elizabeth</div><div><br></div><div><br></div></div>
</blockquote></div>