Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 27 20:11
    raphaelvallat commented #53
  • Jan 27 19:18
    TomBugnon review_requested #53
  • Jan 27 19:18
    TomBugnon review_requested #53
  • Jan 27 19:07
    TomBugnon commented #35
  • Jan 27 18:47
    TomBugnon edited #53
  • Dec 25 2019 12:27
    TomBugnon commented #53
  • Dec 25 2019 12:23
    codecov[bot] commented #53
  • Dec 25 2019 12:23
    TomBugnon synchronize #53
  • Dec 16 2019 07:55
    EtienneCmb commented #56
  • Dec 16 2019 01:54
    miao-cao opened #56
  • Dec 11 2019 10:31
    miao-cao commented #49
  • Nov 26 2019 17:41
    EtienneCmb commented #54
  • Nov 26 2019 17:38
    EtienneCmb closed #55
  • Nov 26 2019 17:38
    EtienneCmb commented #55
  • Nov 17 2019 15:57
    yacineMahdid opened #55
  • Nov 16 2019 18:42
    Auriala opened #54
  • Nov 07 2019 15:29
    codecov[bot] commented #53
  • Nov 07 2019 15:28
    codecov[bot] commented #53
  • Nov 07 2019 15:28
    codecov[bot] commented #53
  • Nov 07 2019 15:13
    codecov[bot] commented #53
tan3x
@tan3x
anyone has experience on co-work with emotiv or muse headset? i just wonder about the compatibility and functionality. Also which one do you suggest for BCI research? gratz¡
Raphael Vallat
@raphaelvallat
Hi @tanermetin ! I don't have any experience with emotiv or muse. However, it seems that they give the possibility to export the data in european data format (.edf) or EEGLab format, which are both accepted by Visbrain. If you are interest in BCI, I would suggest you take a look at https://openbci.com/ . Thanks, Raphael
tan3x
@tan3x
thank you @raphaelvallat , yes saw them and actually impressed the story of openBCI. products are a bit pricey compared to others but beauty is in opensource. also there is an active community(compared to emotiv's support). I hope to have more questions when i got my hands dirty with visbrain. bonjour,
Etienne Combrisson
@EtienneCmb
@tanermetin in my lab, there's people doing machine learning on data coming from muse datasets. If you've questions, I can introduce you
tan3x
@tan3x
for now i just wonder if 5 channel headsets(like emotiv, muse) are powerful enough to gather sufficient amount of wave spectrum and apply ML and get high accuracy results. Or are they just 'toy' to see the waves on the simulator etc. Thank you for your interest.
NoahMarkowitz
@sportnoah14
Hello visbrain community, I'm trying to use the example scripts of visbrain to better understand how it works but I keep running into the same issue in the examples. It seems to occur when it tries to download a file. Here's what my terminal output looks like:
/anaconda3/envs/visbrainEnv/lib/python3.6/site-packages/vispy/visuals/isocurve.py:22: UserWarning: VisPy is not yet compatible with matplotlib 2.2+
  warnings.warn("VisPy is not yet compatible with matplotlib 2.2+")
Data successfully loaded (/Users/sportsnoah14/visbrain_data/example_data/sleep_edf/excerpt2.edf):
- Sampling-frequency : 200.00Hz
- Number of time points (before down-sampling): 360000
- Down-sampling frequency : 100.00Hz
- Number of time points (after down-sampling): 180000
- Number of channels : 23
Hypnogram successfully loaded (/Users/sportsnoah14/visbrain_data/example_data/sleep_edf/Hypnogram_excerpt2.txt)
/Applications/visbrain/visbrain/io/read_sleep.py:208: UserWarning: Wrong channel data amplitude. 
  warn("Wrong channel data amplitude. ")
Traceback (most recent call last):
  File "/Users/sportsnoah14/Documents/Research_knowledge/Coding_Learn/Python/visbrain/python_scripts/gui_sleep/load_edf_local.py", line 29, in <module>
    Sleep(data=dfile, hypno=hfile, config_file=cfile).show()
  File "/Applications/visbrain/visbrain/gui/sleep/sleep.py", line 157, in __init__
    Visuals.__init__(self)
  File "/Applications/visbrain/visbrain/gui/sleep/visuals/visuals.py", line 1103, in __init__
    parent=self._topoCanvas.wc.scene)
  File "/Applications/visbrain/visbrain/gui/sleep/visuals/visuals.py", line 752, in __init__
    TopoMesh.__init__(self, **kwargs)
  File "/Applications/visbrain/visbrain/visuals/topo_visual.py", line 196, in __init__
    auto = self._get_channel_coordinates(xyz, channels, system, unit)
  File "/Applications/visbrain/visbrain/visuals/topo_visual.py", line 382, in _get_channel_coordinates
    xyz, keeponly = self._get_coordinates_from_name(channels)
  File "/Applications/visbrain/visbrain/visuals/topo_visual.py", line 437, in _get_coordinates_from_name
    path = download_file('eegref.npz', astype='topo')
  File "/Applications/visbrain/visbrain/io/download.py", line 99, in download_file
    filename, url = name, get_data_url(name, astype)
  File "/Applications/visbrain/visbrain/io/download.py", line 35, in get_data_url
    urls = load_config_json(get_data_url_path())[astype]
  File "/Applications/visbrain/visbrain/io/rw_config.py", line 47, in load_config_json
    with open(filename) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Applicat/data_url.json'
Any help would be greatly appreciated. Thank you
Etienne Combrisson
@EtienneCmb

Hello @sportnoah14 ,

I've never seen this error.
1) Is it this example that you're trying to run?
2) I suspect a path error to the config file. Can you try to run Sleep but without the config input? Sleep(data=dfile, hypno=hfile).show()

NoahMarkowitz
@sportnoah14
Thank you for the quick response. Yes that's the example I tried to run. Even excluding the config_file argument it still ended with the same error. I tried running as is, as well as downloading the example data beforehand.
Etienne Combrisson
@EtienneCmb
Mmmh that's weird. Did you install visbrain from pip?
NoahMarkowitz
@sportnoah14
I tried from pip as well as via git clone. Both come up with the same error
Etienne Combrisson
@EtienneCmb
I just found why this is not working. I'm going to make a quick fix for it.
Etienne Combrisson
@EtienneCmb
@sportnoah14 it should now be fixed. You can try to pull the modifs from the master branch to see if it's now running
NoahMarkowitz
@sportnoah14
Thank you @EtienneCmb ! It's now working for me! Thank you very much
Stefan Repplinger
@stfnrpplngr
Hi, I get the following error trying to start the 00_brain_control.py:
runfile('C:/Users/reppling/Documents/GitHub/visbrain/examples/gui_brain/00_brain_control.py', wdir='C:/Users/reppling/Documents/GitHub/visbrain/examples/gui_brain')
C:\Continuum\anaconda3\lib\site-packages\vispy\visuals\isocurve.py:22: UserWarning: VisPy is not yet compatible with matplotlib 2.2+
  warnings.warn("VisPy is not yet compatible with matplotlib 2.2+")
BrainObj(name='B3') created
VolumeObj(name='brodmann') created
Traceback (most recent call last):

  File "<ipython-input-1-eb725fac0ef4>", line 1, in <module>
    runfile('C:/Users/reppling/Documents/GitHub/visbrain/examples/gui_brain/00_brain_control.py', wdir='C:/Users/reppling/Documents/GitHub/visbrain/examples/gui_brain')

  File "C:\Continuum\anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
    execfile(filename, namespace)

  File "C:\Continuum\anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "C:/Users/reppling/Documents/GitHub/visbrain/examples/gui_brain/00_brain_control.py", line 59, in <module>
    vb = Brain(brain_obj=b_obj, bgcolor='slateblue')

  File "c:\users\reppling\documents\github\visbrain\visbrain\gui\brain\brain.py", line 106, in __init__
    Visuals.__init__(self, self.view.wc, **kwargs)

  File "c:\users\reppling\documents\github\visbrain\visbrain\gui\brain\visuals.py", line 75, in __init__
    self.volume = VolumeObj('brodmann')

  File "c:\users\reppling\documents\github\visbrain\visbrain\objects\volume_obj.py", line 262, in __init__
    self(name, vol, hdr, threshold, cmap, method, select)

  File "c:\users\reppling\documents\github\visbrain\visbrain\objects\volume_obj.py", line 267, in __call__
    _Volume.__call__(self, name, vol=vol, hdr=hdr)

  File "c:\users\reppling\documents\github\visbrain\visbrain\objects\volume_obj.py", line 104, in __call__
    labels, index = arch['labels'], arch['index']

  File "C:\Continuum\anaconda3\lib\site-packages\numpy\lib\npyio.py", line 262, in __getitem__
    pickle_kwargs=self.pickle_kwargs)

  File "C:\Continuum\anaconda3\lib\site-packages\numpy\lib\format.py", line 692, in read_array
    raise ValueError("Object arrays cannot be loaded when "

ValueError: Object arrays cannot be loaded when allow_pickle=False

WARNING: QSocketNotifier: Multiple socket notifiers for same socket 1936 and type Read

WARNING: QSocketNotifier: Multiple socket notifiers for same socket 1936 and type Read
Etienne Combrisson
@EtienneCmb
Hi @stfnrpplngr , I've never seen this error. Can you show me your numpy version? import numpy as np; print(np.__version__)
Stefan Repplinger
@stfnrpplngr
np.__version__
Out[2]: '1.16.3'
Ian Charest
@iancharest
this bug comes from numpy 1.16.3. A temporary solution is to downgrade your numpy version to 1.16.2. if you are using pip:
pip install numpy==1.16.2
Etienne Combrisson
@EtienneCmb
@iancharest @stfnrpplngr this is good to know, but probably a better solution would be to fix it inside visbrain. I've to check if this allow_pickle=True fix this issue and when this input parameter was introduced. Thx @iancharest
Ian Charest
@iancharest
@EtienneCmb indeed updating your numpy loads with allow_pickle=True would solve this, and prevent this bug in the future.
Hi every one, why the sc.preview gets no output when every line of http://visbrain.org/auto_examples/objects/plot_roi_object.html#sphx-glr-auto-examples-objects-plot-roi-object-py runs without error?
also when I change the mpl argument of preview(). I get an error: got an unexpected keyword argument 'mpl'. But 'mpl' is a changeable argument as shown in the documents.
Etienne Combrisson
@EtienneCmb
@willanxywc what's the ouput of your terminal?
Blau Grana
@granul_jabes_twitter
Hi,
I am trying to create an animation showing connectivity changes over time in the brain. So far I haven't found a way to iteratively update the values of connectivity objects and have it be displayed. How can I achieve this?
Etienne Combrisson
@EtienneCmb
Hi @granul_jabes_twitter , actually, I just realized that there's no easy way to do it. But here's an example of how to create a gif with a changing connectivity object :
import numpy as np
import imageio

from visbrain.objects import SceneObj, BrainObj, ConnectObj

n_sources = 10
n_pic = 10
xyz = np.random.uniform(-50, 50, (n_sources, 3))

writer = imageio.get_writer('animate_conn.gif')
for k in range(n_pic):
    # random connectivity strentgh
    conn = np.random.rand(n_sources, n_sources)
    # create the scene
    sc = SceneObj()
    b_obj = BrainObj('white')
    c_obj = ConnectObj('anim_conn', xyz, conn)
    sc.add_to_subplot(b_obj)
    sc.add_to_subplot(c_obj)
    # render the scene
    im = sc.render()
    writer.append_data(im)
writer.close()
Blau Grana
@granul_jabes_twitter
Thanks @EtienneCmb !
Dakota Kliamovich
@dkliamovich
Hi there! I'm trying to open the Brain module of visbrain using 'from visbrain.gui import Brain' followed by 'Brain().show()'. However, I keep getting the following error: ImportError: cannot import name 'imresize' from 'scipy.misc'. How might I be able to troubleshoot this?
Dakota Kliamovich
@dkliamovich
Nevermind - I found that this issue is resolved on the GitHub master branch, just not on the develop branch.
Etienne Combrisson
@EtienneCmb
Hello @dkliamovich , you're right I've to draft a new release
Lasse Madsen
@lassemadsen

Hi,

I’m using Visbrain for visualization of cortical surface plots, and generating images using the screenshot function in BrainObj (no GUI is needed). Everything is working fine when I run it on my local computer. However, I want to be able to run my scripts on a remote server, but when I try this, I get an error when trying to import BrainObj. I think this is related to PyQt and I get the error message:

"qt.qpa.xcb: could not connect to display :23.0
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb."

I there a way to run Visbrain in a headless mode?

Etienne Combrisson
@EtienneCmb

Hi @lassemadsen ,

For headless mode, you can get inspiration from the travis file used to run visbrain on a server especially this line

SteffanAJones
@SteffanAJones
Hello,
I'm not sure if this is the right place to ask, but are there any plans to add support for either .ndf or .h5 file formats to the Sleep module?
Raphael Vallat
@raphaelvallat
Hi @SteffanAJones! I've never seen sleep EEG data stored in .ndf or .h5 format. Which software do you use to export your data? And how do you typically load such data in Python? Thanks
SteffanAJones
@SteffanAJones
Hi Raphael, my intention was actually to use your software for analysis of single-channel ECoG from rodents, from the documentation it seemed that it would be suited to it
The data is stored in the ndf format with just time and voltage information and then converted to h5 for loading in python with custom modules
Etienne Combrisson
@EtienneCmb
@SteffanAJones about HDF5 support, it depends on what you mean. If it's adding to Sleep the ability to stream HDF5 segments without loading everything into the memory the answer is no, mainly because everything has been coded to have all of the data in the RAM. If your question is to load HDF5 files within Sleep the problem is that this kind of formats are hierarchical which means that the software doesn't know the entry name (like .mat or .npz). But Sleep is also compatible without NumPy arrays, which means that you can load your data using h5py and then send the array to Sleep.
(but I agree that HDF5 should be widely adopted :D )
tmuntianu
@tmuntianu

hello!
I'm having a little issue with the ROI recoloring, specifically when defining my own ROI
I'm loading in what are essentially nifti masks, and creating appropriate labels, index, roi_to_color maps, but when I call select_roi(roi_to_color=my_colors) and preview(), I get extremely dark colors, and it looks like the interior of the ROI is being painted (see these links https://ibb.co/PwxyXdC, https://ibb.co/XCXSWxD, https://ibb.co/GcyCtdF)
Incidentally, it does not matter if I allow the Brain GUI to select colors for me, the painting is similarly dark
I've tried the exact same approach with the default Brodmann areas ROI, and the painting works perfectly

any ideas what I might need to change to make the colors visible?

Etienne Combrisson
@EtienneCmb
hello @tmuntianu , yes, I know this issue, it's the computation of the normals of the mesh that are sometimes inverted but I've no idea why. May be you can try to manually invert the normals whit something like this :
# define the roi object
r_obj = RoiObj(...)
# select your roi's
r_obj.select_roi(...)
# invert normals
r_obj.mesh._normals *= -1
tmuntianu
@tmuntianu
thanks @EtienneCmb !
I'll give this a whirl
tmuntianu
@tmuntianu
inverting the normals didn't do the trick, but r_obj.mesh.inv_light = True did, thanks for pointing me in the right direction!
Gerard O'Leary
@InteGerard_gitlab
Hi all, any suggestions on how real-time streaming could be supported in Sleep or Signal? i.e. I have a device that's streaming data at a 1 KHz sample rate, and I want to update the UI in real time as new data is received... Thoughts?
Etienne Combrisson
@EtienneCmb
Hello @InteGerard_gitlab , I don't know if it's possible to do it. I would suggest to first make a pure Vispy example using simple lines and update line data in real time. You can start by looking at this example. Make it works with your data then this is where data are send to lines in Sleep.
babba7
@babba7
I have an issue in installing "visbrain". I hope you can help me. "ERROR: spyder 3.3.6 requires pyqtwebengine<5.13; python_version >= "3", which is not installed." and "ERROR: spyder 3.3.6 has requirement pyqt5<5.13; python_version >= "3", but you'll have pyqt5 5.13.2 which is incompatible." I tried to install PyQtWebEngine, but same issue.
How can I change the parameters of spectral analysis in "lspopt" but I could not. Could you please help me with this issue. Thanks
Etienne Combrisson
@EtienneCmb
Hello @babba7 some parameters for lspopt should be accessible from the GUI ?