-
Original Query (originally asked on Slack but now solved): I was wondering if there's anyway to pickle/dump a InterpolatedSnapshotRZPotential object from a pynbody processed galaxy simulation? I've tried this for other potentials like the preset MW galpy potential and those work fine (can be dumped and recovered). But for this particular interpolated potential, I get the traceback: Does this potential use multiprocessing/threading? If so, are there any arguments that can be used to bypass this? Suggested Solution (from @jobovy ):
This worked and solved the pickling issue! Follow-up Query: |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Thanks for posting! As you mentioned (but repeated here so it's easy to find for others), you can pickle
Follow-up Query Yes, you cannot fully restore the
so if you can restore |
Beta Was this translation helpful? Give feedback.
-
Okay, I decided to fix this, see #509. Pickling/unpickling |
Beta Was this translation helpful? Give feedback.
-
Finally got around to updating everything to the latest Python + galpy - and I noticed that there's a rogue |
Beta Was this translation helpful? Give feedback.
Okay, I decided to fix this, see #509. Pickling/unpickling
InterpSnapshotRZPotential
instances should now just work in the latestmain
branch.