<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi Steve,<br>
      <br>
      I'm not quite sure what you mean with getting nothing (nothing
      like, empty? or an error?) or not getting real ICA results (real
      in contrast to complex?). My hunge is that you need to take the
      rank of your data into account. Interpolating missing channels is
      done by combining already existing information, i.e. channels, to
      reconstruct a time-course at another spatial location, i.e.
      another channel. Since you do not add any new information by this
      (it's just a linear combination of your existing data matrix), you
      can leave that step out prior to doing ICA. Otherwise, you can set
      something like ica_cfg.XXXica.pca = rank(data.trial{1}), then
      afaik ft_componentanalysis will perform a PCA and essentially
      identify that the interpolated channels are a linear combination
      of other channels (ICA is then done of the PCA components). Both
      methods are equivalent, so you might as well just drop the
      interpolation and remove bad channels completely.<br>
      <br>
      Best,<br>
      Jörn<br>
      <br>
      <br>
      On 6/7/2013 11:23 AM, Steve Johnston wrote:<br>
    </div>
    <blockquote
      cite="mid:55D211F2-5D76-43EE-B41A-EA05C8FFCE6F@swansea.ac.uk"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      Dear fters
      <div><br>
      </div>
      <div>I've just started using ft and, although being able to run
        through a test run of eye movement data just fine, I'm now
        getting into the more detailed stuff and I'm hitting a snag that
        I hope you can help me with.</div>
      <div><br>
      </div>
      <div>Specifically I'm struggling to get any real ICA results after
        using ft_channelrepair but not if I go through without it. </div>
      <div><br>
      </div>
      <div>Data was recorded on a biosemi 128 system and the trials are
        just eye movements that I want to identify via ICA (simple
        test). </div>
      <div><br>
      </div>
      <div>If I just run through the procedure of importing data, set
        markers, remove gross artifacts (keeping all channels, including
        3 bad ones) and then run the ICA - I get lovely eye movement
        components appearing. However, now I want to do it 'properly'
        and replace the bad channels. Currently I do the following …
        (sorry, for completeness I included everything to be on the safe
        side).</div>
      <div><br>
      </div>
      <div><span style="color: rgb(37, 153, 45); font-family: Courier;
          font-size: 12px; ">%%</span></div>
      <div style="font-size: 12px; margin: 0px; font-family: Courier;
        color: rgb(37, 153, 45); ">% Standard cfg for import</div>
      <div style="font-size: 12px; margin: 0px; font-family: Courier;
        color: rgb(37, 153, 45); min-height: 14px; "> <br
          class="webkit-block-placeholder">
      </div>
      <div style="font-size: 12px; margin: 0px; font-family: Courier; ">cfg
                                = [];</div>
      <div style="font-size: 12px; margin: 0px; font-family: Courier; ">cfg.trialdef.prestim 
              = .2;</div>
      <div style="font-size: 12px; margin: 0px; font-family: Courier; ">cfg.trialdef.poststim
              = 2;</div>
      <div style="font-size: 12px; margin: 0px; font-family: Courier; ">cfg.trialdef.eventtype 
            = <span style="color: rgb(178, 69, 243); ">'STATUS'</span>;</div>
      <div style="font-size: 12px; margin: 0px; font-family: Courier;
        min-height: 14px; "> <br class="webkit-block-placeholder">
      </div>
      <div style="font-size: 12px; margin: 0px; font-family: Courier;
        color: rgb(37, 153, 45); ">%%</div>
      <div style="font-size: 12px; margin: 0px; font-family: Courier;
        color: rgb(37, 153, 45); ">%Load each dataset and examine for
        channels that are bad - starting with EOG Localiser.</div>
      <div style="font-size: 12px; margin: 0px; font-family: Courier;
        color: rgb(37, 153, 45); min-height: 14px; "> <br
          class="webkit-block-placeholder">
      </div>
      <div style="font-size: 12px; margin: 0px; font-family: Courier; ">cfg.dataset
                        = [subjectdata.dir filesep
        subjectdata.artifactfile];</div>
      <div style="font-size: 12px; margin: 0px; font-family: Courier; ">cfg.trialdef.eventvalue
            = markers.artifact;</div>
      <div style="font-size: 12px; margin: 0px; font-family: Courier; ">cfg
                                = ft_definetrial(cfg);</div>
      <div style="font-size: 12px; margin: 0px; font-family: Courier;
        min-height: 14px; "> <br class="webkit-block-placeholder">
      </div>
      <div style="font-size: 12px; margin: 0px; font-family: Courier; ">cfg.demean 
                        = <span style="color: rgb(178, 69, 243); ">'yes'</span>;</div>
      <div style="font-size: 12px; margin: 0px; font-family: Courier; ">data 
                              = ft_preprocessing(cfg);</div>
      <div style="font-size: 12px; margin: 0px; font-family: Courier;
        min-height: 14px; "> <br class="webkit-block-placeholder">
      </div>
      <div style="font-size: 12px; margin: 0px; font-family: Courier;
        color: rgb(37, 153, 45); ">% After the above, run ChannelRepair
        after identifying bad channels.</div>
      <div style="font-size: 12px; margin: 0px; font-family: Courier;
        min-height: 14px; ">
        <div style="margin: 0px; color: rgb(37, 153, 45); ">%%</div>
        <div style="margin: 0px; color: rgb(37, 153, 45); ">% Channel
          Replace - get nearest neighbours</div>
        <div style="margin: 0px; ">cfg                      = [];</div>
        <div style="margin: 0px; ">cfg.method               = <span
            style="color: rgb(178, 69, 243); ">'distance'</span></div>
        <div style="margin: 0px; ">cfg.layout               = <span
            style="color: rgb(178, 69, 243); ">'biosemi128.lay'</span>;</div>
        <div style="margin: 0px; ">cfg.neighbourdist        = 0.13;</div>
        <div style="margin: 0px; ">[neighbours]             =
          ft_prepare_neighbours(cfg,data)</div>
        <div style="margin: 0px; min-height: 14px; "> <br
            class="webkit-block-placeholder">
        </div>
        <div style="margin: 0px; color: rgb(37, 153, 45); ">%%
          Interpolate and put into new data structure</div>
        <div style="margin: 0px; ">cfg                      = [];</div>
        <div style="margin: 0px; ">cfg.badchannel           =
          replace_channels;</div>
        <div style="margin: 0px; ">cfg.layout               = <span
            style="color: rgb(178, 69, 243); ">'biosemi128.lay'</span>;</div>
        <div style="margin: 0px; ">cfg.method               = <span
            style="color: rgb(178, 69, 243); ">'nearest'</span>;</div>
        <div style="margin: 0px; ">cfg.neighbours           =
          neighbours;</div>
        <div style="margin: 0px; ">cfg.neighbourdist        = 0.13;</div>
        <div style="margin: 0px; ">artifact_cleandata       =
          ft_channelrepair(cfg,data)</div>
        <div style="margin: 0px; "><br>
        </div>
        <div style="margin: 0px; ">
          <div style="margin: 0px; color: rgb(37, 153, 45); ">%
            Visualise data for and mark uncorrectable artifacts.</div>
          <div style="margin: 0px; ">cfg.viewmode                = <span
              style="color: rgb(178, 69, 243); ">'vertical'</span>;</div>
          <div style="margin: 0px; ">cfg.continuous              = <span
              style="color: rgb(178, 69, 243); ">'yes'</span>;</div>
          <div style="margin: 0px; ">cfg.blocksize               = 12;</div>
          <div style="margin: 0px; ">cfg                         =
            ft_databrowser(cfg,artifact_cleandata)</div>
          <div style="margin: 0px; min-height: 14px; "> <br
              class="webkit-block-placeholder">
          </div>
          <div style="margin: 0px; color: rgb(37, 153, 45); ">%%</div>
          <div style="margin: 0px; color: rgb(37, 153, 45); ">% Do
            artifact rejection (also redefine settings lost during
            re-cfg in artefact rejection) </div>
          <div style="margin: 0px; ">cfg.trialdef.prestim        = .2;</div>
          <div style="margin: 0px; ">cfg.trialdef.poststim       = 2;</div>
          <div style="margin: 0px; ">cfg.trialdef.eventtype      = <span
              style="color: rgb(178, 69, 243); ">'STATUS'</span>;</div>
          <div style="margin: 0px; ">cfg.artifact.reject         = <span
              style="color: rgb(178, 69, 243); ">'complete'</span>;</div>
          <div style="margin: 0px; ">cfg.channel                 = <span
              style="color: rgb(178, 69, 243); ">'EEG'</span>;</div>
          <div style="margin: 0px; ">cfg                         =
            ft_rejectartifact(cfg, artifact_cleandata);</div>
          <div style="margin: 0px; ">trialdata                   =
            ft_preprocessing(cfg, artifact_cleandata);</div>
          <div style="margin: 0px; min-height: 14px; "> <br
              class="webkit-block-placeholder">
          </div>
          <div style="margin: 0px; color: rgb(37, 153, 45); ">%%</div>
          <div style="margin: 0px; ">cfg                         = [];</div>
          <div style="margin: 0px; ">comp                        =
            ft_componentanalysis(cfg, trialdata); </div>
          <div style="margin: 0px; ">cfg                         = [];</div>
          <div style="margin: 0px; ">cfg.component               =
            [1:20]</div>
          <div style="margin: 0px; ">cfg.layout                  = <span
              style="color: rgb(178, 69, 243); ">'biosemi128.lay'</span></div>
          <div style="margin: 0px; ">cfg.comment                 = <span
              style="color: rgb(178, 69, 243); ">'no'</span></div>
          <div style="margin: 0px; ">ft_topoplotIC(cfg,comp)</div>
          <div style="margin: 0px; min-height: 14px; "><br>
          </div>
        </div>
        <div style="margin: 0px; ">So, the big question is - why do I
          get nothing after doing the channel repair. I've been through
          it several times and that seems to be the step where
          everything goes wrong. I've looked at the data post
          re-interpolation and it looks good - for now I'm assuming I've
          missed something.</div>
        <div style="margin: 0px; "><br>
        </div>
        <div style="margin: 0px; ">Thanks for any help</div>
        <div style="margin: 0px; "><br>
        </div>
        <div style="margin: 0px; ">Steve </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
fieldtrip mailing list
<a class="moz-txt-link-abbreviated" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a>
<a class="moz-txt-link-freetext" href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour 
Centre for Cognitive Neuroimaging
Radboud University Nijmegen 
Neuronal Oscillations Group
FieldTrip Development Team

P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands

Contact:
E-Mail: <a class="moz-txt-link-abbreviated" href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a>
Tel:    +31-(0)24-36-68493
Web: <a class="moz-txt-link-freetext" href="http://www.ru.nl/donders">http://www.ru.nl/donders</a>

Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands</pre>
  </body>
</html>