[yt-users] getting all the data in a subgrid

Britton Smith brittonsmith at gmail.com
Thu Mar 8 09:36:50 PST 2012


Hi JC,

You can always reshape the 3D data array to a 1D array.  You can try
something like numpy.reshape.  Also, you should be able to just do
grid['Density'] without doing get_data.

Britton

On Thu, Mar 8, 2012 at 10:25 AM, Jean-Claude Passy <jcpassy at gmail.com>wrote:

>  Hi all,
>
> As far as I understand, a:
>
> ------------------------------------ region = pf.h.region(...) density =
> region["Density"] ------------------------------------
> will return the density field without considering cells that have
> subcells. How can I access ALL the data stored in the hdf5 file? I have
> tried to use
>
>  ------------------------------------ grid = pf.h.grids[i] rhogrid =
> grid.get_data("Density") ------------------------------------
> but I would like to get a 1D array.
> Thanks for you help,
>
> JC
>
> _______________________________________________
> 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/20120308/ef6adfbf/attachment.html>


More information about the yt-users mailing list