This is a an OpenElectrophy, one hour, User Interface (UI) tutorial.
This page aims to present a step by step example of how to use the OpenElectrophy graphical user interface. Briefly, it shows an example of how to insert new data into the database, how to visualize and explore these new data, and finally how to detect events of interest like spikes and oscillations. More detailed informations about all these steps can be found in the Manual. Moreover, this page is an introduction to the UI only, if you want an introduction on how to write analysis script with OpenElectrophy Python classes, please refer to Scripting with OpenElectrophy.
Before starting you need to have Python and OpenElectrophy properly installed on your computer. See Installation section.
For a better understanding it is a good idea to also read the Class Definitions section.
OpenElectrophy deals with MySQL server or an SQLite database file. It is easier to start with a SQLite file. So we use this in the demo but keep in mind that the MySQL server is more powerful.
Click on Database -> create a new database. Choose SQLite. Choose a working dir and a database name, test
Click on Menu : Database -> open database. Choose SQLite. Choose the created db : test.db
If the database you have selected is empty, you should now face the standard OpenElectrophy window with no data.
To import data, in the Menu: Database -> import data in this db :
The data are now stored in the database. Sometimes in order to see them in OpenElectrophy you need to refresh the knowledge OpenElectrophy has of the database. For that click on the upper right button -> popup menu -> refresh view.
A new line “block id : 1” appeared in the “Hierarchic explorer”. This explorer is a tree view of the database content. You can unfold the tree content by clicking on the crosses at the beginning of each line and get something like this:
You can observe that we have one block, in which are present 5 segments, in which are presents 4 analogsignals.
But with a db, you can have many views on your data. Click on the tab ByRecordingPoint and you get another view: one block, in which are present 4 recordingpoints, in which are presents 5 analogsignals. The data are the same, only the way they are viewed is different.
If you right-click on any line, you get a contextual menu which is object-dependent. For example, if you right click on any block you have:
If you choose the “edit fields” options, you have access to the parameters related to the block stored in the database and managed by OpenElectrophy. You can simply modify any of these fields but you need to click on the “save to the database” button to get the new parameter values stored into the database.
Now let’s plot the data. The simplest way is to select an analogsignal in the hierarchical tree view and then click on the button “Draw” on the upper left of the main window. You should get something like this:
The menu on the left of the plot allows to zoom and move into the graph in different ways, to save the graph and finally to close it.
Different types of plots can be simply made. The plots made when you hit the “Draw” button are selected by the checked boxes in the lower-left corner of the main window: the FigureTools. Note that different types of plots are available for each type of object. For example, for analogsignal you can choose and/or : natural, filtered, scalogram. All, this plotting capabilities have options.
Note that, filtered and scalogram are computed on the fly. You do not need to pre-compute them, store them and plot them.
On the last time-frequency plot you observed nice red blobs between 20 and 80 Hz. One of the main feature of OpenElectrophy is to give a full interface to properly detect such oscillatory episodes and get their instantaneous phase, frequency and energy at each time point. All detected oscillations can then be stored in the database and retrieved later for visualization or analysis. For example we will detect the oscillations of our current AnalogSignal. For that, first right-click on the wanted “AnalogSignal” in the tree view to get the electrode contextual menu and select “edit oscillation”:
You get the “detect oscillation window”:
You should get something like that:
If you zoom on an oscillation (zoom or double click in the list), you can observe that:
If you zoom on the time-frequency map you can observe that the oscillation (in magenta) follows the ridge of the energy blob. The computation of the wavelet transform of the signal at each point of this line gives the oscillation instantaneous phase, frequency and energy. The phase is used to plot the oscillation superimposed on the raw signal above.
To finish, you can save these oscillations (precisely you save the line in the time-frequency map) into the database by clicking on the “Save to db (no delete)” button.
If you observe in details the raw signal of the previous electrode, you should have noticed very short and large amplitude events which are spikes recorded extracellularly. OpenElectrophy provides the necessary tools to (almost) automatically detect these spikes (and sort them if multiple cells are recorded on the same electrode). To detect spikes, select the tab “spike by recording point”, right-click on a recordingpoint and select “Spike sorting (mode = from full band signal)”
Importantly, note that this demo signal mimics a tetrode. In short this recordingpoint belongs to a group of 4 recordingpoints. In this case OpenElectrophy spikesorting deals automatically with all 4 signals. The spike sorting dialog a many widget that the user can arrange in views. All widget are dockable. They can be visible or not. The spike sorting process is decomposed in 5 steps. One of these widgets is noted steps. It allow to compute step by step the spike sorting. Each step has its own tab. For each step, you can choose the method you want.
Let’s compute all steps one by one :
- Filtering You can select the FFT filtering method and see the result in Filtered signal widget.
![]()
- Detection You can choose absolut, std or median threshold.
![]()
- Extraction You can choose the alignment.
![]()
- Projection Choose principal component.
![]()
- Clustering Choose K-Mean with 3 clusters.
![]()
Before saing the result in the database you can have global view on your spiketrain and see the association to neuron and segment:
And then press save :
One of the of the strength of OpenElectrophy is to use a database schema for managing large datasets.
A schema allows to explore data with different views. You can observe that at the first connection OpenElectrophy proposes 4 tabs with 4 differents views.
One is adapted to view AnalogSignals in their Segments.
Another is adapted to explore detected neurons.
A third show Spiketrains in their Recordingpoints.
But you can create your own view, click on setting in the upper left corner:
- Give a name to your view, for example “Signal and Oscillations”.
- Drag and drop the tables you want in your view.
- Select the top hierachy (table considered as the root of your tree).
You will get this new view :