hi,
I have to edit the bst_bandpass_hfilter.m script
In line 234 I change it
from: x = fftfilt(FiltSpec.b, x')';
to: x = fftfilt(FiltSpec.b, (double(x))')';
I was having an error when running the Hilbert transform
** Error: [process_hilbert] Frequency > Hilbert transform
** Line 234: bst_bandpass_hfilter (line 234)
** Input arguments must be 'double'.
**
** Call stack:
** >bst_bandpass_hfilter.m at 234
** >process_bandpass.m>Compute at 206
** >process_bandpass.m at 29
** >bst_timefreq.m at 539
** >process_timefreq.m>Run at 276
** >process_timefreq.m at 28
** >process_hilbert.m>Run at 86
** >process_hilbert.m at 24
** >bst_process.m>Run at 229
** >bst_process.m at 36
** >panel_process1.m>RunProcess at 140
** >panel_process1.m at 26
** >gui_brainstorm.m>CreateWindow/ProcessRun_Callback at 749
** >bst_call.m at 28
** >gui_brainstorm.m>@(h,ev)bst_call(@ProcessRun_Callback) at 289
Not sure if anybody else is having this error as well,
best,
José
Hello
Indeed, these filters can only process double precision values.
But you are not supposed to get non-double values saved in any of the files in the Brainstorm database. I'd prefer to fix the problem at a more general level, to avoid other side problems due to non-double values.
How did you obtain to this file?
François
hi Francois,
I processed my data with Fieldtrip, and then import it to Brainstorm, that could explain it?
best,
José
Probably.
I added some code to force the FieldTrip values to be converted to double when imported with function in_data_fieldtrip.
https://github.com/brainstorm-tools/brainstorm3/commit/4468c241efb26b5d70453a577f5a30183898e980#diff-9e312773a119d4c2b046ccdda2061423
Does it solve your problem? (after updating Brainstorm)
If you imported these structure manually into your Brainstorm database, it is your code you should fix.
Hi Francois,
At the time I used the import function ('import MEG/EEG' using the GUI) to import my .mat files from Fieldtrip in Brainstorm,
Not sure if it is the in_data_fieldtrip function you mention,
Yes, this ends up calling in_data_fieldtrip.m (through import_data.m and in_data.m).
Please update Brainstorm and let me know if it fixes the problem.