sccn / amica

Code for AMICA: Adaptive Mixture ICA with shared components
BSD 2-Clause "Simplified" License
24 stars 15 forks source link

Issue handling one-file EEGLAB structs on PC? #15

Open pknytl opened 5 years ago

pknytl commented 5 years ago

Hi Jason,

When passed a EEGLAB EEG struct and the struct comes from a file that is saved as one file (ie: a .set) instead of two, EEG.datfile is empty ([]), thus line 729 (also line 738): file = [dat.filepath filesep dat.datfile]; causes a directory instead of a file name to be passed to the input.param file(line 778), which then passes it to the binary which then tries to write to it and causes the following error:

forrtl: severe (9): permission to access file denied, unit 8, file C:\FeMMEEG\EEG\preica\amicaout  
Image              PC                Routine            Line        Source              
amica15mkl.exe     000000013F6B3B17  Unknown               Unknown  Unknown 
amica15mkl.exe     000000013F6AF402  Unknown               Unknown  Unknown 
amica15mkl.exe     000000013F66FFD1  Unknown               Unknown  Unknown 
amica15mkl.exe     000000013F655B5C  Unknown               Unknown  Unknown 
amica15mkl.exe     000000013F6550F7  Unknown               Unknown  Unknown 
amica15mkl.exe     000000013F632F8B  Unknown               Unknown  Unknown 
amica15mkl.exe     000000013F5D5579  Unknown               Unknown  Unknown 
amica15mkl.exe     000000013F5A6315  Unknown               Unknown  Unknown 
amica15mkl.exe     000000013FA3C18C  Unknown               Unknown  Unknown 
amica15mkl.exe     000000013F69B24F  Unknown               Unknown  Unknown 
kernel32.dll       0000000076EC556D  Unknown               Unknown  Unknown 
ntdll.dll          000000007702385D  Unknown               Unknown  Unknown

I replaced the datfile method with the temp dat file method you used in the EEG.data input case, and then delete it at the end of the script in all cases which seems to avoid the problem. See attached: runamica15_pk.zip