Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom viewer, trace, spikes, CSD #53

Open
sin-mike opened this issue Jun 25, 2019 · 1 comment
Open

Custom viewer, trace, spikes, CSD #53

sin-mike opened this issue Jun 25, 2019 · 1 comment
Labels

Comments

@sin-mike
Copy link

Dear devs

Thank you for updating the code! It works now. I thought about using ephyviewer routinely in my lab, but conventionally, we have used to a different layout for the viewer written in matlab, which is not supported in the current ephyviewer. Our layout contains traces, single units and CSD in the following way.

image

The units can be clustered (Klusta, SpykingCircus, Tridesclous)

I would really appreciate if you could suggest, how I can recreate the same layout the right way using ephyviewer. I can code and stuff. The CSD interface I can take from the elephant, and units - from spikeinterface.

Regards,
Mike

@samuelgarcia
Copy link
Collaborator

Hi @sin-mike.
Really happy to see you here.
You are welcome.

Making this soud totally feasable in ephyviewer.
You would need to make your own viewer thet display in the same canvas all this (csd+spikes+signals).

All veiwer inherits ViewerBase


class ViewerBase(QT.QWidget):

    time_changed = QT.pyqtSignal(float)

    def __init__(self, name='', source=None, **kargs):
        QT.QWidget.__init__(self, **kargs)

        self.name = name
        self.source = source
        self.t = 0.

    def seek(self, t):
        self.t = t
        self.refresh()

    def refresh(self):
        #overwrite this one
        raise(NotImplementedError)

    def set_settings(self, value):
        pass

    def get_settings(self):
        return None

    def auto_scale(self):
        pass

you need to overwrite __init__ and refresh.

The maine idea is when the time change then the widget is refresh.

The complicated in some viewer that the datat retrieve is done in background with a thread.
But you can do immediate refresh wich would make the think less smooth.

All stuf here are done with pyqtgraph but you could normally make a matplotlib viewer based inside QT if it is simpler to you.

I can advise and help abit if you want.

Samuel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants