Hi Chris,<br><br>YT has its own routine designed to pickle data objects for saving and reloading.  For a given pf, you can do pf.h.save_object(object, name) and the object will be saved to the .yt file associated with the dataset.  You can then get it back with object = pf.h.load_object(name).  I have used this successfully to save the mast_clump structure from clump finding.<br>
<br>Britton<br><br><div class="gmail_quote">On Thu, May 27, 2010 at 9:26 PM, Charles Hansen <span dir="ltr"><<a href="mailto:chansen@astro.berkeley.edu">chansen@astro.berkeley.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
The find_clumps function is working correctly for me I believe, but the analysis takes a very long time and I'd like to save the master_clump object (from <a href="http://yt.enzotools.org/doc/cookbook/recipes.html#cookbook-find-clumps" target="_blank">http://yt.enzotools.org/doc/cookbook/recipes.html#cookbook-find-clumps</a>) for further analysis.  I've tried pickling master_clump.  It dumps correctly, but gives an EOF error (below) on loading.  Is there another way to save master_clump?<br>

<br>
Thanks,<br>
Charles<br>
<br>
/nics/c/home/chansen/lib/yt/lib/python2.6/pickle.pyc in load(file)<br>
   1368<br>
   1369 def load(file):<br>
-> 1370     return Unpickler(file).load()<br>
   1371<br>
   1372 def loads(str):<br>
<br>
/nics/c/home/chansen/lib/yt/lib/python2.6/pickle.pyc in load(self)<br>
    856             while 1:<br>
    857                 key = read(1)<br>
--> 858                 dispatch[key](self)<br>
    859         except _Stop, stopinst:<br>
    860             return stopinst.value<br>
<br>
/nics/c/home/chansen/lib/yt/lib/python2.6/pickle.pyc in load_eof(self)<br>
    878<br>
    879     def load_eof(self):<br>
--> 880         raise EOFError<br>
    881     dispatch[''] = load_eof<br>
    882<br>
<br>
EOFError:<br>
<br>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</blockquote></div><br>