<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 17, 2017 at 2:58 PM, Jason Galyardt <span dir="ltr"><<a href="mailto:jason.galyardt@gmail.com" target="_blank">jason.galyardt@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Dear yt Users, <br><br></div>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. <br><br></div>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?</div></blockquote><div><br></div><div>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.</div><div><br></div><div>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?</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><br></div><div>Thanks,<br></div><div>Jason<br><br>------<br></div><div>Jason Galyardt<br></div><div>University of Georgia<br><br></div></div></div>
<br>______________________________<wbr>_________________<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" rel="noreferrer" target="_blank">http://lists.spacepope.org/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
<br></blockquote></div><br></div></div>