Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Feb 26 09:42
    BarryLiu97 commented #65
  • Feb 25 16:56
    cboulay commented #92
  • Feb 25 16:54
    cboulay commented #92
  • Feb 24 04:28
    BarryLiu97 edited #93
  • Feb 24 04:27
    BarryLiu97 edited #93
  • Feb 24 04:27
    BarryLiu97 edited #93
  • Feb 24 02:23
    BarryLiu97 opened #93
  • Feb 22 18:54
    EtienneCmb closed #91
  • Feb 22 18:52
    EtienneCmb closed #92
  • Feb 22 18:52
    EtienneCmb commented #92
  • Feb 22 05:21
    BarryLiu97 commented #92
  • Feb 21 12:34
    Teteros commented #81
  • Feb 21 12:31
    Teteros commented #81
  • Feb 21 05:59
    BarryLiu97 commented #92
  • Feb 21 05:57
    BarryLiu97 commented #92
  • Feb 21 05:56
    BarryLiu97 commented #92
  • Feb 21 05:55
    BarryLiu97 commented #92
  • Feb 21 05:55
    BarryLiu97 commented #92
  • Feb 21 05:55
    BarryLiu97 commented #92
  • Feb 20 12:45
    BarryLiu97 commented #92
SteffanAJones
@SteffanAJones
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 ?
iPsych
@iPsych
Hi, I have an issue when I set the background to White as below, the Translucent option make the brain almost invisible. above links (https://ibb.co/PwxyXdC, https://ibb.co/XCXSWxD, https://ibb.co/GcyCtdF)) seems correctly draw opaque brain on the white background. Is there any parameter I should modify? vb = Brain(brain_obj=b_obj, source_obj=s_obj, connect_obj=c_obj, bgcolor='white')
Etienne Combrisson
@EtienneCmb
Hi @iPsych , you can try to inverse the normals : BrainObj('Custom', vert=vert, faces=faces, invert_normals=True)
agpr141
@agpr141
Hi- I am getting a new error when trying to import visbrain that I have no module named 'PyQt5.sip' installed, even though I do.... this has only happened recently, never before! are you aware of any changes which might explain this?
iPsych
@iPsych
@EtienneCmb Hi, sorry for questioning in Issue tab : )

In vispy, text object is declared like below.

def __init__(self, text=None, color='black', bold=False,
             italic=False, face='OpenSans', font_size=12, pos=[0, 0, 0],
             rotation=0., anchor_x='center', anchor_y='center',
             method='cpu', font_manager=None):

I can see the bold, italic, and font_size in visbrain, but is there any connection to 'face' which might allow the font change in the canvas using system font?

iPsych
@iPsych
Via changing 'Visuals.Text' in the code, the font selection is possible! visuals.Text(self._text, pos=self._xyz, face='YoutFontName') ... face (not faces) is Vispy font property : )
Etienne Combrisson
@EtienneCmb
@iPsych nice, you can make a PR if you want to add this to visbrain.
TomBugnon
@TomBugnon
image.png
Hi @EtienneCmb @raphaelvallat, What would you think about removing the automatic "cleaning" of channel labels (below "# Clean channel names"), or making it optional?
See what it looks like when loading EEG along with LFP and EMG data (in which case I'd like the "EEG" string not to be stripped off ):
Cheers
TomBugnon
@TomBugnon
(wrong channel sorry)
Raphael Vallat
@raphaelvallat
Hi @TomBugnon ! Agree, this is actually a feature that I've been wanting to remove for quite some time. Please feel free to submit a PR! Thanks!
iPsych
@iPsych
@EtienneCmb Is it possible to use array in line_width of connect_obj? I looked into the Vispy code, but it seems tricky in Vispy level...
TomBugnon
@TomBugnon

Hi @TomBugnon ! Agree, this is actually a feature that I've been wanting to remove for quite some time. Please feel free to submit a PR! Thanks!

Thanks, I sent a PR

Does anyone have any idea if it would be possible to easily modify the io.write_image.write_fig_canvas function so as to be able to export canvas as SVG files? It would be convenient to make figures to be able to "screenshot" the GUI in vectorial format
iPsych
@iPsych
@EtienneCmb Is there any way to set the 'priority' of objects and texts in GUI? For example, sometimes the Marker is under the text and the other times, it's over the text.
Etienne Combrisson
@EtienneCmb
@iPsych , no, priority is driven by the order the object are added to the scene. I think this is controlled in visuals.py
Steven Prichard
@spprichard

Hi there. I am trying to use visbrain to read in .rec files. I import the following function
from visbrain.io.read_sleep import read_edf
I can't import this becuase of a QT error

qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.

I am running this code in a pyspark script, all I need to do is read the data, I don't need a GUI. Any suggestions?

Raphael Vallat
@raphaelvallat
hi @spprichard ! If all you need is to load the EDF file, I would recommend either using the MNE library (https://mne.tools/stable/generated/mne.io.read_raw_edf.html) or PyEDFLib library (https://pypi.org/project/pyEDFlib/) that do not require PyQt. Hope this helps!
Steven Prichard
@spprichard
I'll give those a shot. Thank you! @raphaelvallat
Anmol Gupta
@binarycache
Hi guys I am trying to do normal imports like from visbrain.objects import BrainObj but my jupyter lab kernal keeps on dying
any idea?
alirouzbayani1
@alirouzbayani1
Greetings. I am trying to install visbrain but I am presented with these errors: ERROR: spyder 4.0.1 requires pyqtwebengine<5.13; python_version >= "3", which is not installed.
ERROR: spyder 4.0.1 has requirement pyqt5<5.13; python_version >= "3", but you'll have pyqt5 5.14.2 which is incompatible.
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'C:\Users\Administrator\anaconda3\Lib\site-packages\PyQt5\QtCore.pyd'
Consider using the --user option or check the permissions. Could someone please advise ?
peterbuzas
@peterbuzas
Dear Visbrain Community, I am looking for a tool that would allow the viewing and browsing of concurrently recorded video and waveform data. An obvious application would be analysis of video-EEG. Is Visbrain suitable for that?
Raphael Vallat
@raphaelvallat
Hi @peterbuzas. Visbrain does not allow to simultaneously browse video data. There is, to my knowledge, no free software that allows you to do that. Thanks
Vivek Sharma
@ChaoticNeurons
Hi,
I have calculated PSD of source time series using python. I'm unable to plot it on the brain surface. How can I use visbrain to visualize PSD on the brain surface?
Raphael Vallat
@raphaelvallat
Hi @ChaoticNeurons please provide more details, e.g. your current code implementation. Thanks
Vivek Sharma
@ChaoticNeurons
Hi, @raphaelvallat I used MNE-python to compute source time series and extracted the time series to label. In my case I used Desikan-Killiyani atlas. I used the source time series to calculate PSD using a function in scipy. Now PSD I have, has dimension of 68*time points. Now when I try to plot this on brain template that I generated using freesurfer has different dimension or more vertices which does not match with the PSD and I couldnt plot it.
Raphael Vallat
@raphaelvallat
@ChaoticNeurons have you tried using MNE-Python built-in visualization tools? https://mne.tools/stable/auto_examples/index.html
Vivek Sharma
@ChaoticNeurons
@raphaelvallat yeah I have tried that, it gives the same error.
Basically what I want to know is if I have parcellated time series and in my case its desikan so it has 68 sources and associated time series. So, how one can plot it on the brain template.
jeschj01
@jeschj01
How do I get the vertices and faces (mesh) data from a brain object using a template like 'B1'? I prefer it stays in MNI space, but I can convert if need be. Thank you!
jeschj01
@jeschj01
Correction: I can't convert to MNI. visbrain.utils.convert_meshdata didn't seem to have any effect on the vertices/faces/norms data. The values appear to be the same
Benoit Tachet
@benoittachet
Hi all,
I'm currently giving a look to visbrain's examples to see how it works and if it may be useful to me in my work, but in the given examples, there are a few of them that I cannot execute correctly. Last in date is the objects example plot_volume_obj.py, where the wondow opens, the text is displayed, the files are correctly downloaded, but I don't have the meshes displayed on my window.
Would anyone have a solution for this please ? Thank you very much
stephanie khoury
@stephan01105307_twitter
hi,I would like to ask which spyder version works with visbrain?
刘政(Barry Liu)
@BarryLiu97
Do you guys know how to download files manually? I cannot use download_files for some connection error.
I have some sEEG data, if I want to show the electrodes in an MNI brain, I have already read the tutorials http://visbrain.org/auto_examples/gui_brain/04_connectivity.html#sphx-glr-auto-examples-gui-brain-04-connectivity-py and http://visbrain.org/auto_examples/objects/plot_connectivity_obj.html#sphx-glr-auto-examples-objects-plot-connectivity-obj-py, but if I want to the electrodes which are in the same group, how do I do it?
刘政(Barry Liu)
@BarryLiu97
I got the https address by debugging codes, is there any faster way?
evanr70
@evanr70

Hi, I have a sequence of activations which I'd like to display as an animation on a surface. I can set up the gui.Brain or use .screenshot fine, but I'm not sure how to animate my time series of surface activations. Here's my code, with the last three lines being roughly how I'd expect to be able to do this.

from nilearn.plotting.surf_plotting import _check_mesh
import numpy as np
import time

from visbrain.objects import BrainObj
from visbrain.gui import Brain

verts, faces = load_surf_mesh(_check_mesh("fsaverage5").pial_right)
verts *= 1000
activation = np.load("right-visual.npy")
frame = activation[500]

vmax = np.abs(activation).max()
vmin = -vmax

brain_object = BrainObj("fsaverage5", vertices=verts, faces=faces, translucent=False)

brain_object.add_activation(data=frame, clim=(vmin, vmax), cmap="coolwarm")

vb = Brain(brain_obj=brain_object)
vb.show()

for frame in activation:
    brain_object.add_activation(data=frame, clim=(vmin, vmax), cmap="coolwarm")
    brain_object.update()

I'd appreciate any help!