[yt-users] Deposited Particle Data

Matthew Turk matthewturk at gmail.com
Mon May 11 12:51:31 PDT 2015


Hi Jason,

That does look odd; the way the particle mappings are constructed may
not be valid for your data.  How many species of particles do you
have, and of what types?

-Matt

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




More information about the yt-users mailing list