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

Add CsvEpochSource and EpochEncoder enhancements #13

Merged
merged 35 commits into from
May 16, 2019
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
4efd768
Fix delimiter in output file of epoch encoder example
jpgill86 Aug 10, 2018
47b061a
Fixed spelling of CsvEpochSource
jpgill86 Aug 10, 2018
4f4c201
Move CsvEpochSource from example into main code
jpgill86 Aug 10, 2018
afae788
Add missing color_labels param to CsvEpochSource constructor
jpgill86 Aug 10, 2018
6339817
Added channel_name param to CsvEpochSource constructor
jpgill86 Aug 10, 2018
1f0a0bf
Raise NotImplementedError for abstract method WritableEpochSource.save()
jpgill86 Aug 12, 2018
2b4adf7
Removed unneeded variable in CsvEpochSource
jpgill86 Aug 12, 2018
60315a6
Created CsvEpochSource.load() method
jpgill86 Aug 13, 2018
4fcc2f5
Created WritableEpochSource.load() method
jpgill86 Aug 13, 2018
532743e
Added test for empty WritableEpochSource
jpgill86 Aug 13, 2018
6aadbd5
Updated epoch encoder example
jpgill86 Aug 24, 2018
e257e14
Limit EpochEncoder and WritableEpochSource precision to microseconds
jpgill86 Aug 29, 2018
9094410
Use numbers for default EpochEncoder shortcuts
jpgill86 Aug 29, 2018
54cfda6
Moved EpochEncoder global options into EpochEncoder_ParamController
jpgill86 Aug 30, 2018
c90727c
Update data table after merging neighbors in EpochEncoder
jpgill86 Aug 30, 2018
63a4f27
Remove most assumptions of non-overlapping epochs in WritableEpochSource
jpgill86 Aug 30, 2018
9ca91ff
Allow overlapping epochs with EpochEncoder
jpgill86 Aug 30, 2018
2654027
Add modifier key for EpochEncoder shortcut keys
jpgill86 Aug 30, 2018
a921f47
Add EpochEncoder buttons for controlling epoch insertion mode
jpgill86 Sep 1, 2018
3ff4cb8
Add editable labels to EpochEncoder data table
jpgill86 Sep 1, 2018
b993212
Fix for incorrect time jump after inserting epoch with EpochEncoder
jpgill86 Sep 1, 2018
e01f1ba
Click rectangle in EpochEncoder to find epoch in data table
jpgill86 Sep 2, 2018
294d52c
Fix for failure to delete epochs in EpochEncoder
jpgill86 Sep 2, 2018
04493c6
Click rectangle to match region in EpochEncoder
jpgill86 Sep 2, 2018
14ba5dc
Double-click rectangle to match region in EpochEncoder
jpgill86 Sep 2, 2018
c793a22
Unique, unchanging ids for epochs in WritableEpochSource
jpgill86 Sep 3, 2018
db0ab9f
WritableEpochSource.next_id for internal use only
jpgill86 Sep 4, 2018
157c4d6
Delete, duplicate, split individual epochs with EpochEncoder
jpgill86 Sep 4, 2018
6d5987d
Fix for EpochViewer not working with NeoEpochSource
jpgill86 Sep 6, 2018
7f397ba
Double-click rectangle to show and match region in EpochEncoder
jpgill86 Sep 7, 2018
865e293
Make sure EpochEncoder rectangles do not draw over label text boxes
jpgill86 Sep 11, 2018
03adbb7
Merge branch 'master' into epoch-encoder
jpgill86 Sep 12, 2018
03fbd25
Sort before export in CsvEpochSource.save
jpgill86 Oct 30, 2018
74b7fe9
Load CsvEpochSource with correct dtypes
jpgill86 Apr 8, 2019
169c09d
Provide a more informative save prompt for EpochEncoder
jpgill86 May 16, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ doc/_build/*
dist/*
ephyviewer.egg-info/*
ephyviewer/tests/*.avi
examples/*.avi
examples/*.avi
examples/*.csv
10 changes: 10 additions & 0 deletions doc/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@ Epoch viewer
.. literalinclude:: ../examples/event_epoch_viewer.py


Epoch encoder
-------------

.. image:: img/epoch_encoder_example.png

:download:`epoch_encoder.py <../examples/epoch_encoder.py>`

.. literalinclude:: ../examples/epoch_encoder.py


mixed viewer
------------

Expand Down
Binary file added doc/img/epoch_encoder_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions ephyviewer/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ def __init__(self, *args, **kwds):
pg.ViewBox.__init__(self, *args, **kwds)
self.disableAutoRange()
def mouseClickEvent(self, ev):
ev.accept()
def mouseDoubleClickEvent(self, ev):
self.doubleclicked.emit()
ev.accept()
if ev.double():
ev.accept()
self.doubleclicked.emit()
else:
ev.ignore()
def wheelEvent(self, ev):
if ev.modifiers() == QT.Qt.ControlModifier:
z = 5. if ev.delta()>0 else 1/5.
Expand Down
Loading