Nimare -- saving 'cres' transformed MACM results

Hi Neurostars,
After 96 hours of processing, my corrected MACM results are finished running and I’ve socked away my stats maps…I would love to save the transformed corrected results in the ‘cres’ variable should I need to re-visit this stage of the workflow – without another 96 hours of processing! How do I do this?

This is probably already somewhere in your extensive documentation, but as a novice level python user, I’m struggling to figure this out. Any help is greatly appreciated!

For reference, I worked off of the MKDA Chi2 example here: https://nimare.readthedocs.io/en/latest/auto_examples/02_meta-analyses/macm.html#sphx-glr-auto-examples-02-meta-analyses-macm-py

Hi Jennifer,

You should be able to save the maps from a MetaResult object (including the corrected results) with the save_maps method. For example, if you want to save those maps to your current directory, with the prefix “analysis_”, you can do the following:

cres.save_maps(output_dir=".", prefix="analysis")

Best,
Taylor

Thank you! What if I want to save the whole ‘cres’ object for future use? Is that something I would need to pickle, and to I need to transform cres into a Nimare dset to do so?

You’ll need to pickle it, but I think the MetaResult class has a save method for doing that (and a load class method for loading such objects from files). The MetaResult object can’t be transformed into a Dataset though.