[yt-users] Pickling YT objects
Sam Geen
samgeen at astro.ox.ac.uk
Fri Feb 14 06:19:23 PST 2014
Hi,
I'm making plots of my data and I want to save them as pickle files so I
can load them later and perhaps mess with the colour map limits, say,
without reprocessing all the data (I have about 9TB to go through). When
I tried this I got the error: "TypeError: can't pickle instancemethod
objects"
Do you know if this is possible, or some variant of it? I'm running:
pf = yt.mods.load(file_location)
prj = yt.mods.ProjectionPlot(pf, 2, var, center=[0.5, 0.5, 0.5],
width=(rlim, 'pc'), weight_field=None)
and trying to pickle prj, when I get the error. prj appears to be a
yt.visualization.plot_window.ProjectionPlot object and not an instance
method, but I could be wrong.
At least it could be good to save the 2D image array and link it back
later to a YT plot object, but I don't know much about the internal
workings of the plot objects as to whether this is possible or not.
Thanks,
Sam
More information about the yt-users
mailing list