[yt-users] particle generator and update issues

John Zuhone jzuhone at gmail.com
Wed Oct 22 07:17:25 PDT 2014


Hi Elizabeth,

Can you send the full script of what you were trying to do with the
Particle Generator? It looks like the original script you sent was
just the first part of it.

Or, if I am mistaken and that was the full script, just let me know.

Best,

John

On Tue, Oct 14, 2014 at 5:14 AM, Elizabeth Tasker
<tasker at astro1.sci.hokudai.ac.jp> wrote:
> Hi everyone,
>
> I've hit a couple of problems trying to generate a particle distribution.
> I'm following the code here:
>
> http://blog.yt-project.org/post/ParticleGenerator.html
>
> (at the moment exactly: http://pastebin.com/JFnWeXqM )
>
> 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".
>
> I switched this but then hit a different error:
>
>
> In [1]: execfile("particle_generator.py")
> yt : [INFO     ] 2014-10-14 17:51:59,895 Parameters: current_time
> = 0.0
> yt : [INFO     ] 2014-10-14 17:51:59,895 Parameters: domain_dimensions
> = [128 128 128]
> yt : [INFO     ] 2014-10-14 17:51:59,895 Parameters: domain_left_edge
> = [ 0.  0.  0.]
> yt : [INFO     ] 2014-10-14 17:51:59,896 Parameters: domain_right_edge
> = [ 1.  1.  1.]
> yt : [INFO     ] 2014-10-14 17:51:59,897 Parameters: cosmological_simulation
> = 0.0
> ---------------------------------------------------------------------------
> KeyError                                  Traceback (most recent call last)
> /home/tasker/yt-3/src/yt-hg/scripts/iyt in <module>()
> ----> 1 execfile("particle_generator.py")
>
> /home/tasker/yt-3/src/yt-hg/scripts/iyt in <module>()
>      39          'particle_position_y':y,
>      40          'particle_position_z':z}
> ---> 41 particles1 = FromListParticleGenerator(ug, num_particles1, pdata)
>      42 particles1.assign_indices()
>      43 particles1.apply_to_stream()
>
> /home/tasker/yt-3/src/yt-hg/yt/utilities/particle_generator.pyc in
> __init__(self, ds, num_particles, data)
>     227
>     228         field_list = data.keys()
> --> 229         x = data.pop(("io", "particle_position_x"))
>     230         y = data.pop(("io", "particle_position_y"))
>     231         z = data.pop(("io", "particle_position_z"))
>
> KeyError: ('io', 'particle_position_x')
>
>
> 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:
>
>
>
> tasker at schiehallion:~/yt-3/bin$ yt update
> yt : [INFO     ] 2014-10-14 17:48:23,618 Loading plugins from
> /home/tasker/.yt/my_plugins.py
>
> yt module located at:
>     /home/tasker/yt-new/src/yt-hg
>
> The current version and changeset for the code is:
>
> ---
> Version = 2.6.1
> Changeset = f7c69809dbd0 (stable)
> ---
>
> This installation CAN be automatically updated.
> Reading configuration from  /home/tasker/yt-new/src/yt-hg/.hg/hgrc
>
>
> Could someone give me a shove back onto the right track with those two
> issues?
>
> Thanks!
>
> Elizabeth
>
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>



-- 
John ZuHone

Postdoctoral Researcher
NASA/Goddard Space Flight Center

jzuhone at gmail.com
john.zuhone at nasa.gov



More information about the yt-users mailing list