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
External Email - Use Caution
Hi,
Is there any way to save a converted forward solution obtained from mne.convert_forward_solution?
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?
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.