Skip to content

ENH: spectral Epochs / averages objects #1434

Closed

Description

@dengemann

We should expand the spectral API to power maps / single trial power etc.

psd_epochs = compute_epochs_psd(epochs, fmin, fmax)

cc @agramfort

Activity

  1. dengemann commented on Jul 18, 2014

    @dengemann
    MemberAuthor

    @agramfort like this

    class EpochsSpectral(object):
    
        def __init__(self, psds, frequencies):
            self.data = psds
            self.frequencies = frequencies
    
        def average(self, agg_fun=np.mean):
            return EvokedSpectral(np.mean(self.data, 0), self.frequencies)
    
        def save(fname):
            pass
    
    
    class EvokedSpectral(object):
    
        def __init__(self, psds, frequencies):
            self.data = psds
            self.frequencies = frequencies
    
        def plot(self, channel):
            """Plot PSD spectra at given channel"""
            pass
    
        def plot_topo(self):
            """Plot PSD spectra for all channels"""
            pass
    
        def plot_topomap(self):
            """Plot topographic map for spectra"""å
            pass
    
        def save(fname):
            pass
  2. agramfort commented on Jul 18, 2014

    @agramfort
    SponsorMember

    what's your use case?

  3. dengemann commented on Jul 18, 2014

    @dengemann
    MemberAuthor

    And it's just ugly to use objects for this that have .times instead of .frequencies , also confusing for users.

  4. agramfort commented on Jul 18, 2014

    @agramfort
    SponsorMember

    ok you convinced me but it's a bit of work to avoid too much code
    duplication with Epochs / Evoked

    my 2c

  5. dengemann commented on Jul 18, 2014

    @dengemann
    MemberAuthor

    ok you convinced me but it's a bit of work to avoid too much code
    duplication with Epochs / Evoked

    well, I think the objects I propose won't be that complicated. At that stage you don't need a lot.

  6. agramfort commented on Jul 18, 2014

    @agramfort
    SponsorMember

    unless you need it urgently I recommend you keep this for someone else

    any volunteer?

  7. dengemann commented on Jul 18, 2014

    @dengemann
    MemberAuthor

    @agramfort nope just throwing APIs we need on the long run.

  8. agramfort commented on Apr 10, 2015

    @agramfort
    SponsorMember

    closing. Reopen if you want

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions