Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. #72

Open
juedec opened this issue May 22, 2024 · 13 comments

Comments

@juedec
Copy link

juedec commented May 22, 2024

Hello,

I use Matlab version 2023 and automagic version 3.0.
When I launch preprocessing I get this warning signal, having carefully stored my data as indicated by the plug-in sprocessors
Can you help me ?

Thanks

Start preprocessing all dataset
Processing file Subject01_Sub-01-mma ...(file 1 out of 1)
Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\P' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\P' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: The file size on disk does not correspond to the dataset information.
Skipping preprocessing for this file...
Warning: Escaped character '\S' is not valid. See 'doc sprintf' for supported special characters.
******* Pre-processing finished. Total elapsed time: 00:00:02*********

@ksgfan
Copy link
Collaborator

ksgfan commented May 22, 2024

Hi, it is difficult to say without knowing the data structure and selected preprocessing steps. Could you share a file of 1 subject e.g., via Dropbox or WeTransfer?

@juedec
Copy link
Author

juedec commented May 23, 2024 via email

@ksgfan
Copy link
Collaborator

ksgfan commented May 23, 2024

Hi, you've shared a .set file. Do you also have the corresponding .fdt file? Without .fdt file that contains EEG data, loading of .set file is not possible.

@juedec
Copy link
Author

juedec commented May 23, 2024

No, I don't have the fdt files. The raw data are .mff files which are modified in EEGlab to .set and secondarily imported into automagic.

@ksgfan
Copy link
Collaborator

ksgfan commented May 23, 2024

I think that something went wrong during conversion from .mff to .set. The .set file you've shared with me does not contain any data. See on image below:
Bildschirmfoto 2024-05-23 um 13 52 46

Could you share the .mff file too?

@juedec
Copy link
Author

juedec commented May 23, 2024

Strange !

Yes of course, you can find it there https://we.tl/t-FAjA56oetl

Can I charge file on mff format ?

@juedec
Copy link
Author

juedec commented May 23, 2024

Hmmm, I found the .fdt file
https://we.tl/t-bJMOHstoVO

@juedec
Copy link
Author

juedec commented May 23, 2024

I retry with the /fdt in the fold
I have a new error message and i keep the same erro message concerning '\U' and sprintf

Start preprocessing all dataset
Processing file Subject01_Sub-01-mma ...(file 1 out of 1)
Running Prep...
Using option file in directory C:\Users\julie.decourt
Checking for boundary events
Preliminary detrend to compute reference
pop_eegfiltnew() - performing 3301 point highpass filtering.
pop_eegfiltnew() - transition band width: 1 Hz
pop_eegfiltnew() - passband edge(s): 1 Hz
pop_eegfiltnew() - cutoff frequency(ies) (-6 dB): 0.5 Hz
pop_eegfiltnew() - filtering the data (zero-phase, non-causal)
firfilt(): |====================| 100%, ETE 00:00
Warning: [MATLAB:subsassigndimmismatch]
Unable to perform assignment because the size of the left side is 129-by-60000 and the size of the right side is 129-by-600-by-100.

Error in removeTrend (line 67)
EEG.data(detrendOut.detrendChannels, :) = EEG1.data;

Error in prepPipeline (line 115)
[EEGNew, detrend] = removeTrend(EEG, params);

Error in performPrep (line 98)
[new_EEG, ~, ~] = prepPipeline(new_EEG, prepParams);

Error in preprocess (line 233)
[EEG, EOG] = performPrep(EEG, EOG, PrepParams, EEGSystem.refChan);

Error in Block/preprocess (line 535)
[EEG, fig1, fig2, fig3] = preprocess(data, self.params);

Error in Project/preprocessAll (line 503)
[EEG, automagic] = block.preprocess();

Error in mainGUI>runpreprocessbutton_Callback (line 842)
project.preprocessAll();

Error in gui_mainfcn (line 95)
feval(varargin{:});

Error in mainGUI (line 61)
gui_mainfcn(gui_State, varargin{:});

Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)mainGUI('runpreprocessbutton_Callback',hObject,eventdata,guidata(hObject))
Detecting bad channels using routines of clean_raw_data()...
Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\P' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\P' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: TRANSPOSE does not support N-D arrays. Use PAGETRANSPOSE/PAGECTRANSPOSE to transpose pages or PERMUTE to reorder dimensions
of N-D arrays.
Skipping preprocessing for this file...
Warning: Escaped character '\S' is not valid. See 'doc sprintf' for supported special characters.
******* Pre-processing finished. Total elapsed time: 00:00:07*********

@ksgfan
Copy link
Collaborator

ksgfan commented May 23, 2024

It seems that the .set file structure is already epoched, but the data in fdt file is not. That is why you get an error.

Maybe try to run the preprocessing on the mff file? Automagic can handle them too.

Please note that you have misc. channels in your data and you need them exclude them (Exclude Misc. Channels in Automagic).

@juedec
Copy link
Author

juedec commented May 23, 2024

Yes I did it and I have the same message error.
I don't found where is the '\U' ; '\P'; Could it be a java or matlab version?
or directory?

Start preprocessing all dataset
Processing file Subject01_tc01mma-DET ...(file 1 out of 1)
Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\P' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\P' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Cannot find Fileio extension, use EEGLAB Extension Manager to install it
Skipping preprocessing for this file...
******* Pre-processing finished. Total elapsed time: 00:00:01*********

@ksgfan
Copy link
Collaborator

ksgfan commented May 23, 2024

fileio extension is not installed. Close Automagic, restart matlab, run restoredefaultpath in matlab command window, and run automagic again. It should install required extensions automatically, after you start the preprocessing.

@juedec
Copy link
Author

juedec commented May 24, 2024

It looks much better indeed, but I still have the same problem at the end ...

Start preprocessing all dataset
Processing file Subject01_tc01mma-DET ...(file 1 out of 1)
Running Prep...
Using option file in directory C:\Users\julie.decourt
Checking for boundary events
Preliminary detrend to compute reference
pop_eegfiltnew() - performing 3301 point highpass filtering.
pop_eegfiltnew() - transition band width: 1 Hz
pop_eegfiltnew() - passband edge(s): 1 Hz
pop_eegfiltnew() - cutoff frequency(ies) (-6 dB): 0.5 Hz
pop_eegfiltnew() - filtering the data (zero-phase, non-causal)
firfilt(): |====================| 100%, ETE 00:00
Line noise removal
Warning: [MATLAB:UndefinedFunction]
Undefined function 'dpss' for input arguments of type 'double'.

Error in checkTapers (line 35)
[tapers, eigs] = dpss(N, tapers(1), tapers(2));

Error in cleanLineNoise (line 52)
lineNoiseOut.tapers = checkTapers(lineNoiseOut.taperTemplate, Nwin, lineNoiseOut.Fs);

Error in removeLineNoise (line 67)
[signal, lineNoiseOut] = cleanLineNoise(signal, lineNoiseOut);

Error in prepPipeline (line 137)
[EEGClean, lineNoise] = removeLineNoise(EEGNew, params);

Error in performPrep (line 98)
[new_EEG, ~, ~] = prepPipeline(new_EEG, prepParams);

Error in preprocess (line 233)
[EEG, EOG] = performPrep(EEG, EOG, PrepParams, EEGSystem.refChan);

Error in Block/preprocess (line 535)
[EEG, fig1, fig2, fig3] = preprocess(data, self.params);

Error in Project/preprocessAll (line 503)
[EEG, automagic] = block.preprocess();

Error in mainGUI>runpreprocessbutton_Callback (line 842)
project.preprocessAll();

Error in gui_mainfcn (line 95)
feval(varargin{:});

Error in mainGUI (line 61)
gui_mainfcn(gui_State, varargin{:});

Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)mainGUI('runpreprocessbutton_Callback',hObject,eventdata,guidata(hObject))
Detecting bad channels using routines of clean_raw_data()...
Perform Filtering...
Performing ICLabel (this may take a while...)
Running ICA...
ICLabel: extracting features...
ICLabel: calculating labels...
ICLabel: saving results...
Computing projection and removing 19 components ....
eeg_checkset: recomputing the ICA activation matrix ...
Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\P' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\P' is not valid. See 'doc sprintf' for supported special characters.
Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Undefined function 'zscore' for input arguments of type 'single'.
Skipping preprocessing for this file...
******* Pre-processing finished. Total elapsed time: 00:11:21*********

@ksgfan
Copy link
Collaborator

ksgfan commented May 24, 2024

Hi, the dpss function is missing, which is part of the Signal Processing Toolbox. When you start Automagic, you should get a warning that this toolbox is missing. Simply install it in Matlab (Home -> Add-Ons -> Signal Processing Toolbox)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants