I run an ICA on continuous MEG data to remove eye blinks and eye movements in parallel on a server and on a computer to speed up the process. I now need to import the subjects back into the server which has an older version of brainstorm. The two versions of brainstorm are different enough that when I import the subject, fix the link to the raw file and try to open the it I get the: Reference to non-existent field 'samples'
It seems to me that the subjects processed on the computer do not have the ‘samples’ field in the event structure of the linked raw file like described here: https://github.com/brainstorm-tools/brainstorm3/pull/199
I just want to be sure there is not a fast and direct solution to the problem that I miss here, and in that case if my workflow to workaround the problem is correct and doesn't have obvious inherent errors that can cause problems for the future analysis steps:
import subjects from zip
delete the links to raw file
review the raw files again
read again the events from the fif channel
do not delete the original channel file where also the ICA projectors are stored
I now need to import the subjects back into the server which has an older version of brainstorm. The two versions of brainstorm are different enough that when I import the subject, fix the link to the raw file and try to open the it I get the: Reference to non-existent field 'samples'
The pull request you point at is indeed the cause of the problem. It is not possible to navigate back and forth between versions Brainstorm downloaded before and after the date this PR was merged.
You should update Brainstorm on your server.
import subjects from zip
delete the links to raw file
review the raw files again
read again the events from the fif channel
do not delete the original channel file where also the ICA projectors are stored
I'm not sure I understand this part. There are probably easier ways to transfer only the results of the ICA analysis. Maybe one these two options would work for you:
Copy all the files outside of Brainstorm (if you're not creating new files, you don't need to reload), then right-click on the Link to raw file > File > Fix broken link.
Transfer only the new ICA projectors: on the computer where you executed the ICA, open the continuous files, Record tab > Artifacts > Select active projectors > Select the new ICA category and click on the Save button. Copy the proj_...mat file to the other computer, and load it from the save window.
If you need to repeat this on many subjects, this could be automated, but could take you more time to set up than these manual steps.
This is the first thing I tried indeed, but "fix broken link" doesn't touch or recreate the events structure with the samples field in the older-server version. It leaves those fields like they were created in the more recent version of brainstorm, and that is why I came to the conclusion I had to delete and review the raw files again.
I didn't think about that, and it seems the smoother solution.
By the way I start to get used to the functions to query the database, and it changed a lot.