I am working on an existing protocol and have processed the dataset through scout extraction, but now am getting errors when I try to open single trial files. The error says that the file cannot be opened and may be corrupt and this is occurring for many files across several participants, but not all of them. I tried to reload the entire database, thinking maybe it would fix the corrupted files, but it looks like it removed the bl.mat files for a bunch of participants/trial combinations rather than fixing them. I have a backup of the dataset and could probably copy and paste in the bl.mat files that were lost, but wanted to check and see whether there was something obvious causing this that I might be missing.
Thanks in advance!
Are you working on an external USB drive or over a network?
Is it possible that something bad happened to your data storage? (disconnected or damaged drive...)
Try loading directly from the Matlab command window one of the files that Brainstorm complains about using load('filename.mat'). If Matlab can't read it, the .mat file is corrupted and there is nothing we can do about it from Brainstorm. Check the file size, if the files are empty, something erased them.
Please post a screen captures of your database explorer in Brainstorm showing the files you're having issues with, copy-paste the full file path to one of the files, and copy-paste all the different error messages you get.
Thanks, Francois. Yes, I'm working from a network server. I don't recall having any problems with the drive like an unexpected disconnection, but it's certainly possible. You're right that I can't open these files in Matlab, but they're not empty.
In terms of screenshots, it's a little tough to do because when I reloaded the database, Brainstorm is no longer showing the files that are corrupted. However:
when I try to load a file directly in Matlab:
Error using load
Unable to read MAT-file
File might be corrupt.
Something damaged the files, and I don't think this can be Brainstorm, since it only calls Matlab functions to read/write .mat files. I don't think you'll be able to recover them.
It's good if you have a backup of your data...
Thanks! I know it's not good practice to copy and paste files in the database folders, but in this case- can I copy and paste just the bl.mat files in without interfering with the brainstorm database?
If you're simply replacing damaged files with the same but working files, there is no problem.
But you're probably adding back some files that had been removed automatically, therefore you need to need to reload the database (or some subjects only) for the modifications of the file system to be taken into account in Brainstorm.