<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div><div><div>Hi Matt,<br><br></div>I only use one species of particle: active (massive). <br><br>On a possibly related front, I've also had trouble getting yt to over-plot particle positions on a rectangular projection (4 kpc x 24 kpc, in this case); I can over-plot particles on a square projection just fine.<br><br></div>Cheers,<br></div>Jason <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 11, 2015 at 3:51 PM, Matthew Turk <span dir="ltr"><<a href="mailto:matthewturk@gmail.com" target="_blank">matthewturk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Jason,<br>
<br>
That does look odd; the way the particle mappings are constructed may<br>
not be valid for your data.  How many species of particles do you<br>
have, and of what types?<br>
<br>
-Matt<br>
<br>
On Mon, May 11, 2015 at 2:36 PM, Jason Galyardt<br>
<div class="HOEnZb"><div class="h5"><<a href="mailto:jason.galyardt@gmail.com">jason.galyardt@gmail.com</a>> wrote:<br>
> It seems that the problem is in the evaluation of 'end', which gets set to<br>
> 0. I don't know how the  ds.index._particle_indices container (which p_ind<br>
> is set to) is supposed to look, but it's got an awful lot of zeros packed in<br>
> front. In fact, of the 8017 elements, 5655 of them are exactly 0.<br>
><br>
> Looking at line 76 with the debugger, p_ind[<a href="http://g2.id" target="_blank">g2.id</a> - g2._id_offset + 1] =<br>
> p_ind[1000 - 1 + 1] = p_ind[1000] = 0.<br>
><br>
> Is this normal? Doesn't make sense to me, since there are 9000+ particles in<br>
> this time step.<br>
><br>
> Jason<br>
><br>
> On Mon, May 11, 2015 at 1:17 PM, Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a>><br>
> wrote:<br>
>><br>
>> If I had access to the dataset, I would put a breakpoint before line 76 in<br>
>> your traceback here:<br>
>><br>
>> /home/jeg/yt/yt/frontends/flash/io.pyc in _read_particle_coords(self,<br>
>> chunks, ptf)<br>
>>      74                 start = p_ind[<a href="http://g1.id" target="_blank">g1.id</a> - g1._id_offset]<br>
>>      75                 end = p_ind[<a href="http://g2.id" target="_blank">g2.id</a> - g2._id_offset + 1]<br>
>> ---> 76                 x = np.asarray(p_fields[start:end, px],<br>
>> dtype="=f8")<br>
>>      77                 y = np.asarray(p_fields[start:end, py],<br>
>> dtype="=f8")<br>
>>      78                 z = np.asarray(p_fields[start:end, pz],<br>
>> dtype="=f8")<br>
>><br>
>> I would try to print out start and end, as well as <a href="http://g1.id" target="_blank">g1.id</a>, g1._id_offset,<br>
>> <a href="http://g2.id" target="_blank">g2.id</a>,and g2._id_offset.<br>
>><br>
>> This is the last frame before we leave yt and enter h5py.  For some reason<br>
>> start = end here, and we'd need to look at how the dataset is being read in<br>
>> to figure out why.<br>
>><br>
>> On Mon, May 11, 2015 at 6:38 AM, Jason Galyardt <<a href="mailto:jason.galyardt@gmail.com">jason.galyardt@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> Hi all,<br>
>>><br>
>>> Per Matt's suggestion, I've tried accessing the FLASH particles via<br>
>>> ['all', 'particle_mass'], to no avail. The traceback can be found here:<br>
>>><br>
>>> <a href="http://paste.yt-project.org/show/5541/" target="_blank">http://paste.yt-project.org/show/5541/</a><br>
>>><br>
>>> I get the same zero-length selection exception when I use ['io',<br>
>>> 'particle_position_x'] or ['all', 'particle_position_x'], as Yuan suggests.<br>
>>><br>
>>> To further check the input particle file format, I used the low-level<br>
>>> h5py interface. I was able to read both particle position and mass. This<br>
>>> script doesn't know about the grid, however.<br>
>>><br>
>>> Any other ideas?<br>
>>><br>
>>> Thanks,<br>
>>> Jason<br>
>>><br>
>>> On Sat, May 9, 2015 at 9:59 PM, Yuan Li <<a href="mailto:bear0980@gmail.com">bear0980@gmail.com</a>> wrote:<br>
>>>><br>
>>>> I tried ['io', 'particle_position_x'] on my Flash data, and it seemed to<br>
>>>> work just fine. I use the latest yt.<br>
>>>><br>
>>>> Yuan<br>
>>>><br>
>>>> On Sat, May 9, 2015 at 7:51 PM, Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a>><br>
>>>> wrote:<br>
>>>>><br>
>>>>> I'm not able to reproduce this using the Orbit dataset on<br>
>>>>> <a href="http://yt-project.org/data" target="_blank">yt-project.org/data</a>. Unfortunately I don't think we have any other flash<br>
>>>>> test datasets that use particles.<br>
>>>>><br>
>>>>> It would also help to see the full error traceback you're getting.<br>
>>>>><br>
>>>>> On Sat, May 9, 2015 at 4:32 PM, Matthew Turk <<a href="mailto:matthewturk@gmail.com">matthewturk@gmail.com</a>><br>
>>>>> wrote:<br>
>>>>>><br>
>>>>>> Hi Jason,<br>
>>>>>><br>
>>>>>> Don't worry about posting the data -- that's completely fine, and I<br>
>>>>>> think in general we should do all we can to reproduce without the<br>
>>>>>> dataset!  I'm wondering if perhaps there's something funny about the<br>
>>>>>> "io" particle field.  If you try "all" instead of "io", does it work<br>
>>>>>> any better?<br>
>>>>>><br>
>>>>>> -Matt<br>
>>>>>><br>
>>>>>> On Fri, May 8, 2015 at 1:01 PM, Jason Galyardt<br>
>>>>>> <<a href="mailto:jason.galyardt@gmail.com">jason.galyardt@gmail.com</a>> wrote:<br>
>>>>>> > Hi all,<br>
>>>>>> ><br>
>>>>>> > Has anyone had success accessing deposited particle data generated<br>
>>>>>> > with<br>
>>>>>> > FLASH? It appears in the dataset derived field list, but when I go<br>
>>>>>> > to access<br>
>>>>>> > it (via ds.all_data()['deposit', 'io_mass']), I get an error<br>
>>>>>> > concerning<br>
>>>>>> > zero-length selection. I get the same error when I try to access the<br>
>>>>>> > 'standard' particle data (from ds.field_list), such as<br>
>>>>>> > ds.all_data()['io',<br>
>>>>>> > 'particle_mass'].<br>
>>>>>> ><br>
>>>>>> > Does this ring any bells? This very well could be user error, so<br>
>>>>>> > please let<br>
>>>>>> > me know if that seems to be the case. I've pasted a basic script to<br>
>>>>>> > reproduce the error here:<br>
>>>>>> ><br>
>>>>>> > <a href="http://paste.yt-project.org/show/5538/" target="_blank">http://paste.yt-project.org/show/5538/</a><br>
>>>>>> ><br>
>>>>>> > I'd rather not post the dataset publicly, but I can send you a link,<br>
>>>>>> > if<br>
>>>>>> > you're interested.<br>
>>>>>> ><br>
>>>>>> > Cheers,<br>
>>>>>> > Jason Galyardt<br>
>>>>>> ><br>
>>>>>> ><br>
>>>>>> ><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>
>>>>>> _______________________________________________<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>
>>>>><br>
>>>>><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>
>>>><br>
>>>><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>
>>><br>
>>><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>
>><br>
>><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>
><br>
><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>
_______________________________________________<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>
</div></div></blockquote></div><br></div>