Skip to content

bug with multitaper DICS #3249

Closed
Closed

Description

@agramfort

see mailing list message:

In order to compute the single-trial power at the source level at a single frequency, the steps I normally use (in Fieldtrip) are:
1) Multitaper at the sensor level: compute complex-valued estimates of spectral measures Xsensor(n, t, k) , for each trial n, time t, and taper k. The cross-spectral density matrices, however, is computed across trials (average csd).
2) DICS: compute complex-value spectral measures at the source level, Xsource(s, t, k) =  A * Xsensor(n, t, k) , where A(t) is the real-valued spatial filter that transforms the data from the sensor to source level, which is computed from the real part of the csd in (1). The Xsource(s, t, k) is calculated for each source s, time t, and taper k
3) The single-trial power at each source location is computed by multiplying the complex spectral estimates with their complex conjugate, and averaged over tapers k. Psource(s, t) = <   Xsource dot Xsource(s, t, k) * > over k
4) Finally, I log-transform the power values to make the data approximate Gaussian and lowpass filtered at 50 Hz to reduce noise. Then, the single-trial mean power and SD in the baseline period (i.e., multiple estimates of noise) are computed for each source and trial, and used to z-transform single-trial event-related power time courses.

I hope this is clear. If you want a detailed description you can read the paragraph "Single-trial HGA at BAs" in the Methods in this paper:
http://www.jneurosci.org/content/35/37/12643.short

However, I am not familiar with MNE yet, I am slowly learning. So, I don't know exactly how I could contribute to implement this. But I can help ! Just let me know.

Activity

  1. brovelli commented on Jul 18, 2017

    @brovelli

    Dear all,
    I have a new def for dics.py that can be used to compute single-trial power at the source level using DICS as specified in the previous comment.
    It could be called def dics_source_power_epochs
    Can you tell me how to proceed? Shall I make a PR on dics.py?
    Thanks

  2. larsoner commented on Jul 18, 2017

    @larsoner
    Member

    @britta-wstnr any thoughts?

  3. agramfort commented on Jul 18, 2017

    @agramfort
    SponsorMemberAuthor

    @brovelli if you've never done a PR you should start with a gist you can share?

  4. agramfort commented on Jul 19, 2017

    @agramfort
    SponsorMemberAuthor
  5. britta-wstnr commented on Jul 19, 2017

    @britta-wstnr
    Member

    I think this issue will profit from the refactoring into make_dics (create the filter) and apply_dics (apply filter to data). It should make it much easier to have single trial estimates returned.

  6. brovelli commented on Jul 19, 2017

    @brovelli

    NB: my implementation does not use filters computed on single trials, but rather on all trials. Then the filter computed on the averaged csd is used to map single-trial data from sensors to source level.

    I am not familiar with such refactoring change. Can you point me to such discussion or issue? thanks

  7. brovelli commented on Jul 19, 2017

    @brovelli

    And, in order to use multitaper method, the csd from single tapers must be kept all along.

  8. britta-wstnr commented on Jul 19, 2017

    @britta-wstnr
    Member

    Yes, the filter would be calculated on the CSD-matrix of all trials. It is basically a change in the code which makes it possible to have the computed filter returned. It can then be applied to, e.g., single trials or the data of one conditions.
    We are currently implementing this for the LCMV beamformer (see here for the PR: #4389 ) and the plan is to also implement it for the DICS beamformer.

  9. brovelli commented on Jul 19, 2017

    @brovelli

    Great!

  10. added this to the 0.16 milestone on Apr 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions