-
Notifications
You must be signed in to change notification settings - Fork 14
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
viewer does not free console when closed (I use spyder) #72
Comments
Hi @pplenck, thanks for trying ephyviewer! It sounds like you are having success with launching ephyviewer and loading your data into it, and the problem only arises when you close the window. I don't use Spyder, and I haven't experienced this issue before with ephyviewer in the contexts I use it (standalone, neurotic, Jupyter notebooks). If I had more time, I'd try it in Spyder, but today I don't. However, what you describe reminds me of something I reported for tridesclous in Jupyter notebooks (tridesclous/tridesclous#117). In that report I described how, after closing a tridesclous GUI window, control of the kernel was not returned to the notebook, and I was forced to restart the kernel. That issue has not been completely solved, and since there are some similarities between tridesclous's and ephyviewer's use of Qt for GUI creation, I wonder if they might be linked. In that other report, I suggested that a particular matplotlib backend might be the cause of the tridesclous hangup. ephyviewer doesn't have an analogous matplotlib backend setting, but maybe Spyder is automatically setting it to something that causes problems in that context? It's a shot in the dark, but you could try running this at the very top of your script, before
If that doesn't help, maybe a different backend would work. Let me know if that makes any difference! As for your other question:
I presume you mean, "Why not use the RawIO reader directly as the TraceViewer's source?" Firstly, you should check out Secondly, to answer your question. ephyviewer doesn't strictly depend on Neo. I think @samuelgarcia designed it to be as lightweight as possible with few dependencies. The " |
Qt5agg does not solve the issue. (Although I have to say it solved another issue I had with spyking-circus) If you have time, can you show us how we could plot on the same trace both the raw lfp and the spike waveform? Like it's done on tridesclous? |
I installed Spyder and tried running this example. It ran correctly and exited correctly, both when I pasted the example code into the console and ran it from there, and when I pasted it into the script editor and ran the script within Spyder. So, I'm currently unable to reproduce the problem you described. 😕 There is no "quit command", but that question did make me think of something. Try adding this line of code immediately after you instantiate the
I don't know if it will make a difference, but it's worth a shot. If this works for you, I can probably add it to ephyviewer so that this attribute is set automatically for all As for your last question,
If I understand you correctly, you'd like to see both a continuous signal (possibly seconds, minutes, or hours long) as well as the waveform of an isolated spike (milliseconds long). Presently, ephyviewer links all viewers to a common timeline, which means that if you loaded your LFP signal in one This sounds like a useful feature for ephyviewer to have. Would you like to open a new issue with a feature request? This will make sure the idea isn't forgotten even after this issue is closed. I don't think I'll have time to work on a feature like that anytime soon, but maybe a volunteer (or you!) would be interested in building it. If I misunderstood the plots your were describing, could you show me a screenshot from tridesclous of what you want? |
it still does not work. even with your simple signal viewer example.
I run with the same issue on my mac and my PC...
To run python, I use anaconda with a specific environment for neo, elephant
en ephyviewer
The app executes, the window closes but the console is stuck on "saving
data"
could it be an anaconda/pyqt5 issue?
backends did not change
…On Thu, Aug 8, 2019 at 2:24 AM Jeffrey Gill ***@***.***> wrote:
I installed Spyder and tried running this example
<https://ephyviewer.readthedocs.io/en/latest/examples.html#simple-signal-viewer>.
It ran correctly and exited correctly, both when I pasted the example code
into the console and ran it from there, and when I pasted it into the
script editor and ran the script within Spyder. So, I'm currently unable to
reproduce the problem you described. 😕
There is no "quit command", but that question did make me think of
something. Try adding this line of code immediately after you instantiate
the MainWindow:
win.setAttribute(ephyviewer.QT.WA_DeleteOnClose, True)
I don't know if it will make a difference, but it's worth a shot. If this
works for you, I can probably add it to ephyviewer so that this attribute
is set automatically for all MainWindows. Please let me know if you have
success with it.
As for your last question,
If you have time, can you show us how we could plot on the same trace both
the raw lfp and the spike waveform? Like it's done on tridesclous?
If I understand you correctly, you'd like to see both a continuous signal
(possibly seconds, minutes, or hours long) as well as the waveform of an
isolated spike (milliseconds long). Presently, ephyviewer links all viewers
to a common timeline, which means that if you loaded your LFP signal in one
TraceViewer and your spike waveform in another, the waveform would go
off-screen if you scrolled away from t=0. I'm sure that's not what you want!
This sounds like a useful feature for ephyviewer to have. Would you like
to open a new issue with a feature request? This will make sure the idea
isn't forgotten even after this issue is closed. I don't think I'll have
time to work on a feature like that anytime soon, but maybe a volunteer (or
you!) would be interested in building it.
If I misunderstood the plots your were describing, could you show me a
screenshot from tridesclous of what you want?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#72?email_source=notifications&email_token=ALWYDPCCQAKP2Z5QAY6TRXDQDNRTTA5CNFSM4II6KRUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD32CAWA#issuecomment-519315544>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALWYDPBU7RV5Z2LRQ2OTQW3QDNRTTANCNFSM4II6KRUA>
.
|
I must admit that I investigate very few this QT problem. A main source is that matplotlib try to hack/catch the QApp (when have a QT backend). note that the feature "save_all_setting" is not very stable sometimes. (but usefull) |
I get a similar problem. I'm launching the stand-alone version of ephyviewer in an environment set up using Anaconda. I'm able to launch the viewer and look at data sets, but whenever I try to open a new file when a file is already open I get the following error: Traceback (most recent call last): Is there a fix for this? |
Hi @munrokrulle! This is a bug, though I don't think it's related to this issue. I have opened a new issue here: #122 |
Hi Guys
thanks for this cool library,
I am trying to use it throroughly and make my own viewer with it but it does not want to close properly when I run it and close the main window. I use Spyder and the commandline seems to try to "save_all_setting" and gets stuck there.
here is my code:
import matplotlib.pyplot as plt
from scipy import signal
import numpy as np
import ephyviewer
from ephyviewer import mkQApp, MainViewer, TraceViewer, TimeFreqViewer
from ephyviewer import InMemoryAnalogSignalSource
FilePth=(r"D:\SALOME\gad_cre_vir_hr2P8_Bis20190204\2019-02-04_18-16-17\Klusta")
FileNm=r'2019-02-04_18-16-17.dat'
get to the folder
os.chdir(str(FilePth))
SF=30000
reader=RawBinarySignalRawIO (filename=FileNm, dtype=u'int16', sampling_rate=SF, nb_channel=32)
reader.parse_header()
print (reader)
T1=0;
Tend=200;
data=reader.get_analogsignal_chunk(i_start = T1, i_stop = Tend*SF)
T=np.linspace(T1, Tend, len(data))
app = ephyviewer.mkQApp()
create a window
win = ephyviewer.MainViewer(debug=True, show_auto_scale = True)
source = InMemoryAnalogSignalSource(data, SF, T1) # why use a source by the way?
view1 = TraceViewer(source=source, name='trace')
#Parameters can be set in script
view1.params['scale_mode'] = 'same_for_all'
view1.params['display_labels'] = True
#view1.params['color'] = '#FFFEED'
view1.auto_scale()
win.add_view(view1)
win.show()
launch the app
app.exec_()
The text was updated successfully, but these errors were encountered: