Skip to content

Commit c84398d

Browse files
committed
allow for string input and add PICARD MATLAB folder
1 parent 4e77ccb commit c84398d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/eegprep/eeglabcompat.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,9 @@ def wrapper(*args):
9898
# needs to use eval since returning struct arrays is not supported
9999
self.engine.eval(f"EEG = pop_loadset('{temp_file.name}');", nargout=0)
100100
# TODO: marshalling of extra arguments should follow octave conventions
101-
eval_str = f"EEG = {name}(EEG{',' if args[1:] else ''}{','.join([str(a) for a in args[1:]])});"
102-
print(eval_str)
101+
# eval_str = f"EEG = {name}(EEG{',' if args[1:] else ''}{','.join([str(a) for a in args[1:]])});"
102+
eval_str = f"EEG = {name}(EEG{',' if args[1:] else ''}{','.join([repr(a) for a in args[1:]])});"
103+
print("This is the eval_str: ", eval_str)
103104
self.engine.eval(eval_str, nargout=0)
104105
self.engine.eval(f"pop_saveset(EEG, '{temp_file.name}');", nargout=0)
105106
return pop_loadset(temp_file.name)
@@ -132,6 +133,7 @@ def get_eeglab(runtime: str = default_runtime, *, auto_file_roundtrip: bool = Tr
132133
# On the command line, type "octave-8.4.0" OCTAVE_EXECUTABLE or OCTAVE var
133134
base_dir = os.path.dirname(os.path.abspath(__file__))
134135
path2eeglab = os.path.join(base_dir, 'eeglab')
136+
print("This is the path2eeglab: ", path2eeglab)
135137

136138
# not yet loaded, do so now
137139
if rt == 'oct':
@@ -148,6 +150,7 @@ def get_eeglab(runtime: str = default_runtime, *, auto_file_roundtrip: bool = Tr
148150
engine.addpath(path2eeglab + '/functions/miscfunc')
149151
engine.addpath(path2eeglab + '/plugins/dipfit')
150152
engine.addpath(path2eeglab + '/plugins/iclabel')
153+
engine.addpath(path2eeglab + '/plugins/PICARD1.0')
151154
engine.addpath(path2eeglab + '/plugins/clean_rawdata')
152155
engine.addpath(path2eeglab + '/plugins/clean_rawdata2.10')
153156
elif rt == 'mat':

0 commit comments

Comments
 (0)