[FieldTrip] problem in importing my data in fieldtrip

Moumita bhowmick bhowmickmoumita1 at gmail.com
Mon Jun 20 12:54:12 CEST 2022


Hello Eva,
Thanks for your reply. I mistakenly typed differently for the email. Let me
write it again.

I am trying to import continuous data into the fieldtrip for
ft_preprocessing. Since I need to do ft_definetrial first for which I need
to know the eventtype and eventvalues first, I tried calling ft_definetrial
with cfg.dataset.


1) I gave the following command:

cfg = [];

cfg.dataset = '1_MD_1_edtd.set';
cfg.trialdef.eventtype = '?';
ft_definetrial(cfg);



But I am getting the following error:

Error using ft_trialfun_show (line 56)

file or directory '1_MD_1_edtd.set' does not exist

Error in ft_definetrial (line 199)
 [trl, event] = feval(cfg.trialfun, cfg);


2) I then tried specifying the filepath with the following command:

cfg = [];
cfg.dataset = 'F:\data_fldtrp\1_MD_1_edtd.set';
cfg.trialdef.eventtype = '?';
ft_definetrial(cfg);

 But I am still getting the same error.



3) I then tried the following (without specifying the extension .set):

cfg = [];

cfg.dataset = '1_MD_1_edtd';
cfg.trialdef.eventtype = '?';
ft_definetrial(cfg);


In return I am getting the following:

Warning: file or directory "1_MD_1_edtd" does not exist, could not
determine file format
Warning: unsupported event format "unknown"
no events were found in the data
no trials have been defined yet, see FT_DEFINETRIAL for further help
found 0 events
the call to "ft_definetrial" took 0 seconds


4) I tried following your suggestion. Did you mean the following?

cfg = [];
addpath('F:\data_fldtrp');
cfg.dataset = '1_MD_1_edtd.set';
cfg.trialdef.eventtype = '?';
ft_definetrial(cfg);

For which I got the following error:

Error using ft_trialfun_show (line 56)
file or directory '1_MD_1_edtd.set' does not exist

Error in ft_definetrial (line 199)
    [trl, event] = feval(cfg.trialfun, cfg);


5) I then tried the following:

addpath('F:\data_fldtrp');
cfg = [];
cfg.dataset = '1_MD_1_edtd.set';
cfg.trialdef.eventtype = '?';
ft_definetrial(cfg);

I am getting the same error.


How to write cfg.dataset = 'F:\data_fldtrp\1_MD_1_epochs.set'; so that
fieldtrip can find the file? Why does it keep on saying 'the file does not
exist'?

On Mon, Jun 20, 2022 at 4:05 PM Eva Masson <eva.masson at hotmail.fr> wrote:

> Hi Moumita,
>
>
>
> Maybe try to add the path before, adding a line like :
>
>
>
> addpath(‘F:\data_fldtrp’)
>
>
>
> Then you should be able to call your dataset with the first set of
> commands your wrote.
>
> I hope this helps.
>
> Alternatively, the second option you mentionned should also work, but the
> file you are calling is not the same in the two examples.
>
>
>
> Best,
>
> Éva
>
>
>
>
>
> *De : *Moumita bhowmick via fieldtrip <fieldtrip at science.ru.nl>
> *Envoyé le :*lundi 20 juin 2022 12:20
> *À : *fieldtrip at science.ru.nl
> *Cc : *Moumita bhowmick <bhowmickmoumita1 at gmail.com>
> *Objet :*[FieldTrip] problem in importing my data in fieldtrip
>
>
>
> Hello,
>
> I am a novice in fieldtrip. Trying to learn it for my EEG analysis, on my
> own. I don't have any local group with whom I can discuss the problems I am
> facing here. I am trying to import continuous data into the fieldtrip for
> ft_preprocessing. Since I need to do ft_definetrial first for which I need
> to know the eventtype and eventvalues first, I tried calling ft_definetrial
> with cfg.dataset.
>
> I gave the following command:
>
> cfg = [];
>
> cfg.dataset = '1_MD_1_edtd.set';
> cfg.trialdef.eventtype = '?';
> ft_definetrial(cfg);
>
>
>
> But I am getting the following error:
>
> Error using ft_trialfun_show (line 56)
>
> file or directory '1_MD_1_edtd.set' does not exist
>
> Error in ft_definetrial (line 199)
>  [trl, event] = feval(cfg.trialfun, cfg);
>
>
>
> I then tried specifying the filepath with the following command:
>
> cfg = [];
> cfg.dataset = 'F:\data_fldtrp\1_MD_1_epochs.set';
> cfg.trialdef.eventtype = '?';
> ft_definetrial(cfg);
>
>
>
> But I am still getting the same error. How to write cfg.dataset =
> 'F:\data_fldtrp\1_MD_1_epochs.set'; so that fieldtrip can find the file?
>
>
>
> Will be highly obliged if you can help me understand how to import data
> into fieldtrip.
>
> Thanking you,
>
> Moumita
>
> --
>
> Moumita Bhowmick
>
> PhD student
>
> School of Cognitive Science,
>
> Jadavpur University
>
>
>


-- 
Moumita Bhowmick
PhD student
School of Cognitive Science,
Jadavpur University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20220620/16773a35/attachment.htm>


More information about the fieldtrip mailing list