[Mne_analysis] Saving output of convert_forward_solution?

Bear, Joshua JOSHUA.BEAR at ucdenver.edu
Wed Oct 10 16:15:39 EDT 2018
Search archives:

        External Email - Use Caution        

Hi Gladia,

Yes, you’re right ... I hadn’t noticed that. It looks like the write function is checking fwd['_orig_source_ori'] to decide about how to write the file. You might be able to hack that value (set it equal to the new source orientation), but I’m not sure that wouldn’t break something else ... you would, at the least, probably also need to overwrite the fwd['_orig_sol']  with your new solution to interrupt the reversion.

I’ll defer to the experts. ;)

Josh


On Oct 10, 2018, at 1:37 PM, Gladia Hotan <gladiach at gmail.com<mailto:gladiach at gmail.com>> wrote:


        External Email - Use Caution

Hi Joshua,

Thanks for your reply! If I try to save a converted forward solution using write_forward_solution, write_forward_solution saves the original forward (before conversion), and issues a warning that I should reapply the conversion after loading the saved forward model. I'm trying to use the converted forward solution with MNE Matlab, which as far as I know doesn't have a convert_forward_solution function, so I need to save the converted forward solution in Python then load it in Matlab. I don't think write_forward_solution works for my application, unless it has saving options that I don't know about?

Best,
Gladia

On Wed, Oct 10, 2018 at 3:30 PM Bear, Joshua <JOSHUA.BEAR at ucdenver.edu<mailto:JOSHUA.BEAR at ucdenver.edu>> wrote:
Hi Gladia,

You should be able to do this by using the mne module rather than trying to call it from the forward solution object.

 mne.write_forward_solution(fname, fwd)  # fname should be the filename of your choice, fwd is the output from convert_forward_solution

See:
https://martinos.org/mne/dev/generated/mne.write_forward_solution.html


Cheers,
Josh



Joshua Bear, MD, MA | Assistant Professor, Pediatric Neurology and Epilepsy
University of Colorado and Children’s Hospital Colorado
13123 East 16th Avenue, Box B-155 | Aurora, CO 80045 | Phone: 720-777-6138 | Fax: 720-777-7285



On Oct 10, 2018, at 12:57 PM, Gladia Hotan <gladiach at gmail.com<mailto:gladiach at gmail.com>> wrote:


        External Email - Use Caution

Hi,

Is there any way to save a converted forward solution obtained from mne.convert_forward_solution?

Thanks and Best Regards,
Gladia
_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu<mailto:Mne_analysis at nmr.mgh.harvard.edu>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis


        External Email - Use Caution

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu<mailto:Mne_analysis at nmr.mgh.harvard.edu>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu<mailto:Mne_analysis at nmr.mgh.harvard.edu>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20181010/3e38427e/attachment-0001.html 


More information about the Mne_analysis mailing list