<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr">There are instructions to switch to the development version here:<div><br></div><div><a href="http://yt-project.org/docs/dev/installing.html#installing-yt-using-pip-or-from-source">http://yt-project.org/docs/dev/installing.html#installing-yt-using-pip-or-from-source</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 28, 2015 at 11:56 AM, Yuan Li <span dir="ltr"><<a href="mailto:bear0980@gmail.com" target="_blank">bear0980@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Jason,<div><br></div><div>I had trouble with Flash particles last year, and John ZuHone fixed the bug. Could you try the newest yt3 and see if the problem goes away?</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Yuan</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 28, 2015 at 2:53 PM, Jason Galyardt <span dir="ltr"><<a href="mailto:jason.galyardt@gmail.com" target="_blank">jason.galyardt@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Nathan,<br><br></div>I'm using yt version 3.0.2 (which I see is not quite current) on Debian 7 (wheezy). I tried to pastebin the iPython error traceback, but it failed with a complaint that the MySQL server has 'gone away'. With apologies to the list, here's the traceback:<br><br>---------------------------------------------------------------------------<br>ValueError Traceback (most recent call last)<br><ipython-input-49-3f118016da60> in <module>()<br>----> 1 p.annotate_particles((4.0,'kpc'))<br><br>/usr/local/lib/python2.7/dist-packages/yt/visualization/plot_container.pyc in newfunc(*args, **kwargs)<br> 68 rv = f(*args, **kwargs)<br> 69 args[0]._plot_valid = False<br>---> 70 args[0]._setup_plots()<br> 71 return rv<br> 72 return newfunc<br><br>/usr/local/lib/python2.7/dist-packages/yt/visualization/plot_window.pyc in _setup_plots(self)<br> 860 label.set_fontproperties(fp)<br> 861 <br>--> 862 self.run_callbacks(f)<br> 863 <br> 864 if draw_axes is False:<br><br>/usr/local/lib/python2.7/dist-packages/yt/visualization/plot_container.pyc in run_callbacks(self, f)<br> 313 CallbackMaker = callback_registry[name]<br> 314 callback = CallbackMaker(*args[1:], **kwargs)<br>--> 315 callback(cbw)<br> 316 for key in self.frb.keys():<br> 317 if key not in keys:<br><br>/usr/local/lib/python2.7/dist-packages/yt/visualization/plot_modifications.pyc in __call__(self, plot)<br> 1053 pt = self.ptype<br> 1054 gg = ( ( reg[pt, field_x] >= x0 ) & ( reg[pt, field_x] <= x1 )<br>-> 1055 & ( reg[pt, field_y] >= y0 ) & ( reg[pt, field_y] <= y1 ) )<br> 1056 if self.minimum_mass is not None:<br> 1057 gg &= (reg[pt, "particle_mass"] >= self.minimum_mass)<br><br>/usr/local/lib/python2.7/dist-packages/yt/data_objects/data_containers.pyc in __getitem__(self, key)<br> 238 return self.field_data[f]<br> 239 else:<br>--> 240 self.get_data(f)<br> 241 # fi.units is the unit expression string. We depend on the registry<br> 242 # hanging off the dataset to define this unit object.<br><br>/usr/local/lib/python2.7/dist-packages/yt/data_objects/data_containers.pyc in get_data(self, fields)<br> 665 <br> 666 read_particles, gen_particles = self.index._read_particle_fields(<br>--> 667 particles, self, self._current_chunk)<br> 668 for f, v in read_particles.items():<br> 669 self.field_data[f] = self.ds.arr(v, input_units = finfos[f].units)<br><br>/usr/local/lib/python2.7/dist-packages/yt/geometry/geometry_handler.pyc in _read_particle_fields(self, fields, dobj, chunk)<br> 232 self._chunk_io(dobj, cache = False),<br> 233 selector,<br>--> 234 fields_to_read)<br> 235 return fields_to_return, fields_to_generate<br> 236 <br><br>/usr/local/lib/python2.7/dist-packages/yt/utilities/io_handler.pyc in _read_particle_selection(self, chunks, selector, fields)<br> 148 # Here, ptype_map means which particles contribute to a given type.<br> 149 # And ptf is the actual fields from disk to read.<br>--> 150 psize = self._count_particles_chunks(chunks, ptf, selector)<br> 151 # Now we allocate<br> 152 # ptf, remember, is our mapping of what we want to read<br><br>/usr/local/lib/python2.7/dist-packages/yt/utilities/io_handler.pyc in _count_particles_chunks(self, chunks, ptf, selector)<br> 119 def _count_particles_chunks(self, chunks, ptf, selector):<br> 120 psize = defaultdict(lambda: 0) # COUNT PTYPES ON DISK<br>--> 121 for ptype, (x, y, z) in self._read_particle_coords(chunks, ptf):<br> 122 psize[ptype] += selector.count_points(x, y, z, 0.0)<br> 123 return dict(psize.items())<br><br>/usr/local/lib/python2.7/dist-packages/yt/frontends/flash/io.pyc in _read_particle_coords(self, chunks, ptf)<br> 72 start = p_ind[<a href="http://g1.id" target="_blank">g1.id</a> - g1._id_offset]<br> 73 end = p_ind[<a href="http://g2.id" target="_blank">g2.id</a> - g2._id_offset + 1]<br>---> 74 x = np.asarray(p_fields[start:end, px], dtype="=f8")<br> 75 y = np.asarray(p_fields[start:end, py], dtype="=f8")<br> 76 z = np.asarray(p_fields[start:end, pz], dtype="=f8")<br><br>/usr/lib/python2.7/dist-packages/h5py/_hl/dataset.pyc in __getitem__(self, args)<br> 312 <br> 313 # Perform the dataspace selection.<br>--> 314 selection = sel.select(self.shape, args, dsid=<a href="http://self.id" target="_blank">self.id</a>)<br> 315 <br> 316 if selection.nselect == 0:<br><br>/usr/lib/python2.7/dist-packages/h5py/_hl/selections.pyc in select(shape, args, dsid)<br> 92 <br> 93 sel = SimpleSelection(shape)<br>---> 94 sel[args]<br> 95 return sel<br> 96 <br><br>/usr/lib/python2.7/dist-packages/h5py/_hl/selections.pyc in __getitem__(self, args)<br> 259 return self<br> 260 <br>--> 261 start, count, step, scalar = _handle_simple(self.shape,args)<br> 262 <br> 263 self._id.select_hyperslab(start, count, step)<br><br>/usr/lib/python2.7/dist-packages/h5py/_hl/selections.pyc in _handle_simple(shape, args)<br> 510 for arg, length in zip(args, shape):<br> 511 if isinstance(arg, slice):<br>--> 512 x,y,z = _translate_slice(arg, length)<br> 513 s = False<br> 514 else:<br><br>/usr/lib/python2.7/dist-packages/h5py/_hl/selections.pyc in _translate_slice(exp, length)<br> 551 raise ValueError("Step must be >= 1 (got %d)" % step)<br> 552 if stop == start:<br>--> 553 raise ValueError("Zero-length selections are not allowed")<br> 554 if stop < start:<br> 555 raise ValueError("Reverse-order selections are not allowed")<br><br>ValueError: Zero-length selections are not allowed<br>------------------------------------------------------------------------<br><br></div><div>Let me know if any other info would be useful.<br></div><div><br></div>Cheers,<br></div>Jason<br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 28, 2015 at 2:39 PM, Nathan Goldbaum <span dir="ltr"><<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Tue, Apr 28, 2015 at 11:37 AM, Nathan Goldbaum <span dir="ltr"><<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Tue, Apr 28, 2015 at 11:36 AM, Jason Galyardt <span dir="ltr"><<a href="mailto:jason.galyardt@gmail.com" target="_blank">jason.galyardt@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>Hi all,<br><br></div>I'm sure I've just overlooked some bit of documentation, but I'm having trouble plotting particles generated by FLASH on top of the gas density. I've been able to load a plot file with the associated particle file via <br><br>ds = yt.load(plotfileName, particle_filename=partfileName)<br><br><br></div>However, when I try to create a projection and annotate the particles with<br><br></div>p = yt.ProjectionPlot(ds, "y", "density")<br>p.annotate_particles(1.0) # ValueError!<br></div><div># p.annotate_particles((4.0, 'kpc')) # ValueError!<br></div><div><br></div></div></div></div></blockquote><div><br></div></span><div>Can you pastebin the full error traceback? Which yt version are you using?</div></div></div></div></blockquote><div><br></div></span><div>Forgot to mention that you can get precise version information by executing "yt version" at the bash command line.</div><span><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><div dir="ltr"><div><div><div>I get a ValueError from h5py indicating that zero-length selections are not allowed. I have also tried passing the full width of the simulation domain to the annotation function without success. I suspect that this is a user error stemming from differences between the way that Enzo and FLASH store particle data. However, I can't find much in the way of documentation or examples for the FLASH particle data format. <br><br>Of course, it would also be handy to be able to write my own analysis scripts using both gas and particles, but for now, I'll settle for any help I can get on simple plotting functionality.<br><br></div>Thanks,<br><br></div>Jason Galyardt<br></div>Department of Physics and Astronomy<br><div><div><div>University of Georgia<br></div><div><br></div></div></div></div>
<br></span>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">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></div>
</blockquote></span></div><br></div></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">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>
</div></div><br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">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>
</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>