[yt-users] Reading in arrays from Active Particles

Nathan Goldbaum nathan12343 at gmail.com
Thu Sep 21 08:03:29 PDT 2017


Hi John,

The I/O operation is happening here:

https://github.com/yt-project/yt/blob/master/yt/frontends/enzo/io.py#L92

Here, if you are reading an active particle field, "pds" is a handle to the
hdf5 dataset containing the active particle data. The array that we're
going to read the particle data into is allocated on line 110. It looks to
me like "data" should be multidimensional if the on-disk data are, but
perhaps we're doing something further along the line that is causing the
issue you're seeing.

If you get stuck, feel free to open an issue on github about this. If you
do so please include a sample dataset and a script to trigger the issue so
one of us can reproduce and debug.

-Nathan

On Thu, Sep 21, 2017 at 9:41 AM, John Regan <johnanthonyregan at gmail.com>
wrote:

> Hi All,
>
> I'm hoping to modify YT to read in arrays from ActiveParticle fields. I
> have an array which is part of the AP data structure. At the moment YT sees
> the field but only reads the first element which kinda makes sense.
>
> Just wondering how I can modify the source code so that YT realised that a
> field is in fact an array and to read in all the values?
>
> At the moment YT is also complaining with the message:
> yt/yt/frontends/enzo/io.py:140: VisibleDeprecationWarning: boolean index
> did not match indexed array along dimension 0; dimension is 20 but
> corresponding boolean dimension is 1
>
> which is because of course the field is an array of length 20 rather than
> a scalar.
>
> Any tips on what is required? I am looking on io.py at the
> _read_particle_fields function and I imagine it is this function that needs
> modification?
>
> Cheers,
> John
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20170921/ce5750f3/attachment.html>


More information about the yt-users mailing list