Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

.mff import and import/export FieldTrip

Help
Januz
2012-10-18
2014-01-29
  • Januz
    Januz
    2012-10-18

    Hi,

    I have several question…

    1. We have EGI data in .mff format - in the manual it says that support for .mff is experimental
    - is this still the case or is it more tested now?
    - would you recommend to use the .mff data or to export to another file format?

    2. We would like to try out the Toolbox functions for artifact rejection and do the rest of the analysis in FieldTrip.
    - would the best workflow be to import the unprocessed data into the Toolbox, do the artifact rejection(s) and then export to FieldTrip for segmentation, filtering and statistics or should we first process it with FieldTrip (maybe segment and filter) and then export to and later back from the Toolbox?
    - which file should we export the data to to use it further in FieldTrip?

    Thanks for your help,

    Janosch

     
  • Joe Dien
    Joe Dien
    2012-10-19

    1.  MFF is still experimental alas.  I'm still waiting for EGI to send me a test file.  Last time I tried to test a segmented file, it caused the FieldTrip code to crash.  For now I would use EGIS for segmented data and SBIN for unsegmented.

    2.  I would filter and then segment (in that order) in FieldTrip and then artifact correct in the Toolkit.  EGIS or SBIN should work fine going back into FieldTrip.

     
  • Januz
    Januz
    2012-10-19

    Thank you very much for your answer!

    It seems that FieldTrip cannot export into EGIS or SBIN (see http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_one_dataformat_into_an_other?s=export). Will one of the possible formats be importable into the Toolkit?

    Do you only need any .mff file to test? If so, I could send you one from our lab via SFTP or Dropbox…

    Thanks again,

    Janosch

     
  • Joe Dien
    Joe Dien
    2012-10-20

    I already made an mff file myself and it didn't work.  I need EGI to confirm whether the problem is with my file or with the mff code by sending me a test file that is officially good.  Hopefully they'll get around to it soon.  Thanks!

     
  • Januz
    Januz
    2012-10-20

    Ok!

    Could you please tell me whether going from FieldTrip to the Toolkit with one of the file formats FieldTrip can write will work? The possible file formats are:

        edf
        gdf
        brainvision_eeg
        neuralynx_ncs
        neuralynx_sdma
        plexon_nex
        riff_wave
        fcdc_matbin
        fcdc_mysql
        fcdc_buffer
        matlab

    Thanks,

    Janosch

     
  • Januz
    Januz
    2012-11-09

    … sorry to bother you again, but we have some problems going from FieldTrip to the EP Toolkit:

    - we tried exporting to .edf and .eeg as these are formats that seem to be importable by the toolkit, but the files were not recognized
    - additionally, I wonder whether segmented data from FieldTrip would be recognized by the toolkit because, if I understand it corectly, the trial structure is only represented in matlab variables/.mat files not in the files you can export (I think you can only concatenate the trials to one continous file). But segmented data would be optimal to use in the toolkit because of trialwise ICA, right?!

    As we didn't succeed with going from FieldTrip to EP Toolkit, we wanted to try the other way around (artifact correction of the continous data in the toolkit and further processing with FieldTrip). We first wanted to try opening our .mff files to avoid the conversion to .raw. But we can't open the files because matlab (on Debian) recognizes the .mff packages as folders. Is it possible that opening .mff files with the toolkit only works on Macs because the Finder (in contrast to other UNIX systems) recognizes the files as packages?!

    Thanks again for your help,

    J.

     
  • Joe Dien
    Joe Dien
    2012-11-10

    Sorry you're running into these file format issues.  I think I've spent more time working on them than anything else.  As I note in the tutorial documentation, the edf format is only partially implemented.  I tried to get it to work but was unable to finish as I didn't have a source for edf files.  If you're willing to work with me to get them working, I'd be happy to take a shot at it.  By .eeg format, do you mean Neuroscan?  if so, they should work.  I've worked with them successfully in the past.  I'd be happy to look at your .eeg file if you could send me a copy.  The EP Toolkit does not read FieldTrip files.  It would take a lot of work on my part to get it to work.  I haven't been able to get mff to work myself and am still waiting for EGI to send me a test file despite repeated requests (sigh).  If you send them an e-mail note, it might move it up their priority list.  You'll need to ask them about questions like this in any case since it is their file format and code.  Finally, I should note that I"m very back logged right now so it might take me a while to get to working on these issues.  If you'd like to get started right away, my suggestion is to use tab-delimited text files.  Sorry about all this!

    Joe

     
  • Januz
    Januz
    2012-11-12

    Hi Joe,

    thanks for your answer!

    By .eeg format, do you mean Neuroscan?

    I mean the .eeg format that FieldTrip is able to export, I just looked at their website again and it seems to be Brainvision .eeg :(

    I haven't been able to get mff to work myself and am still waiting for EGI to send me a test file despite repeated requests (sigh). If you send them an e-mail note, it might move it up their priority list. You'll need to ask them about questions like this in any case since it is their file format and code.

    I'll definitely write them a mail. But could you please tell me how reading in .mff worked for you when you tested it. I know it didn't go well, but at least you must have been able to select it, right? As I said, on Linux the EP toolkit won't open the .mff file because it is recognized as a folder…

    I think we will now try to use the EP toolkit on our raw data then export in a file format that FieldTrip can read and further process it there. Some questions regarding this approach:

    1. Do you mean .raw data when you write .sbin? I can not find another simple binary format when exporting with NetStation…
    2. Will the export from the toolkit be .raw, too?
    3. Which artifact correction procedures make sense with unsegmented/continous raw data? If I understand correctly, some of them are to be carried out trial-wise?!

    Thanks again,

    Janosch

     
  • Joe Dien
    Joe Dien
    2013-10-21

    mff support works better now (with the 2.40 release) but it is still very much under development and testing by EGI, let alone by me. You can try it out but I would do so carefully. Currently it will only work with continuous and single-trial data.

     
  • Joe Dien
    Joe Dien
    2013-10-21

    Oh sorry, I must have missed your questions somehow. Well, better late than never. Yeah, I don't know how to handle Brainvision eeg files but if you send me a copy I could take a stab at it. With the 2.40 release, I've added a requestor window for non-Mac systems that will work around the folder problem for mff files. It's a bit clunky but it works. 1) Regarding .sbin, yeah I mean what NetStation calls .raw. I avoid using the term .raw because BESA refers to EGIS files as .raw so there is ambiguity there. 2) The Toolkit can export in several different formats. 3) I generally recommend artifact correction on segmented data if the intent is to conduct ERP analyses but it can be done either way. The EP Toolkit doesn't handle segmenting yet (planned for the next release) but you can export back to ERPlab or NetStation for that step.

     
  • Tom Sambrook
    Tom Sambrook
    2013-11-13

    A (hopefully) quick question here Joe: a paper you co-authored (Foti et al 2011, Event Related Potential Activity in the Basal Ganglia Differentiates Rewards from NonRewards) includes a figure (Fig 4) showing the partial reconstruction of the original ERP from four extracted factors. I don't see any reference to how such a figure is created in the tutorial pdf or in Dien 2010, The ERP PCA Toolkit. Am I missing something?
    Thank you
    Tom

     
  • Joe Dien
    Joe Dien
    2013-11-13

    Hey Tom,
    the PCA waveforms that the EP Toolkit generates are partial reconstructions reflecting a single factor. To get a waveform that reflects four extracted factors, use the Edit function to add the desired four factors together.

    Cheers!

    Joe

     
  • Tom Sambrook
    Tom Sambrook
    2013-11-14

    Thank you Joe, and yes I see this is covered in the tutorial now. I'm able to follow the instructions there to create means, sums or differences in the Cells and Subjects panes of the Edit function but come unstuck with adding (using weights of 2 and 2) two temporo-spatial factors in the Factors pane. I receive the error message below. I dont believe I've done anything eccentric in constructing the PCA file. Do you have any ideas?
    Tom

    Error using +
    Matrix dimensions must agree.

    Error in ep_editData (line 4303)
    newFacData=newFacData+(theWeight/totalWeight)*ep_expandFacs(EPoverview.workData,[],[],[],[],i,[]);
    Error while evaluating uicontrol Callback

     
  • Joe Dien
    Joe Dien
    2013-11-14

    Looks like just a random bug. Send me the file and I’ll get it sorted out. :)

     
    • Tom Sambrook
      Tom Sambrook
      2013-11-15

      Great, thanks. Here it is
      Tom

       
      Attachments
  • Joe Dien
    Joe Dien
    2013-12-25

    Okay, fix made! I'll be posting a new release that includes this fix tomorrow. Sorry about the delay!

    Joe

     
    • Tom Sambrook
      Tom Sambrook
      2014-01-29

      Super, thank you Joe
      Tom