[yt-users] Profile data

Nathan Goldbaum nathan12343 at gmail.com
Fri Feb 17 13:01:21 PST 2017


On Fri, Feb 17, 2017 at 2:58 PM, Jason Galyardt <jason.galyardt at gmail.com>
wrote:

> Dear yt Users,
>
> Does anyone know of a way to export the data of a profile object to a byte
> stream? Specifically, I'd like to be able to store several byte streams
> from several different simulation files into a single dictionary object
> (for example), and then pickle the dictionary. I'd like to then unpickle
> the dictionary object at a later time for plotting, etc.
>
> I have figured out a way to do this, but it involves saving each profile
> to a temporary file, reading the temp file into a byte stream, and then
> pickling the byte stream; then to reload, I would have to unpickle the byte
> stream, write it to a temporary file, then use yt.load() to get the profile
> object back. This works, but boy, it's inefficient. Dealing with a whole
> bunch of separate files generated by profile.save_as_dataset() is
> inefficient in different way. Any ideas on streamlining this workflow?
>

I'm not sure I fully understand what you're trying to do. A code example or
an outline if a code example with the part you're confused about left to be
filled in would help.

Why not just save the raw profile data for the fields you're interested in,
e.g. profile[field], which will be a numpy array. Do you need other data
that's defined on the profile object?


> Thanks,
> Jason
>
> ------
> Jason Galyardt
> University of Georgia
>
>
> _______________________________________________
> 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/20170217/827740b8/attachment.htm>


More information about the yt-users mailing list