Display sensors

Hi

Some times I did not see the arrow besides the display sensors(>) why?
if I want to know what is the code for display sensors in BST how it possible? I tried to search on it in run process but not exist

image

Some times I did not see the arrow besides the display sensors(>) why?

Because there is only one type of sensors in the file?
(you can check this with a right-click > Edit channel file)

if I want to know what is the code for display sensors in BST how it possible?

In general, if you want to know which callback function is called when clicking on button, you can simply search the Brainstorm code for the text or tooltip of the button. You can search "Display sensors" with the "Find files" window in Matlab (ctrl+shift+F), and look for the calls in tree_callbacks.m (it handles the popup menus of the database explorer).

Most of the functions for displaying data are named view_...m. For the channel files, it is view_channels.m or view_channels_3d.m.
https://neuroimage.usc.edu/brainstorm/Tutorials/Scripting#Reference:_Display_functions

Examples in the script tutorial_introduction.m:

YES

Hi Francois,
Yes I have one type Meg
how can I visualize it in this case?
I want to see the 4 integration point of each sensors with it normal,
because in the example of vectorview we can see them (gradiometer in green and magnotometers in yellow as I remember) with the normal vector

The menus "Vectorview306 coils (MAG)" and "Vectorview306 coils (ALL)" are available only when the name of the channel file includes the tag "vectorview306" (I mean the file path, not the comment displayed in the database explorer). See the corresponding code:
https://github.com/brainstorm-tools/brainstorm3/blob/master/toolbox/tree/tree_callbacks.m#L826
https://github.com/brainstorm-tools/brainstorm3/blob/master/toolbox/core/bst_get.m#L1356

If you imported .fif files, the channel file should include this tag.
If you want to see where this happens: Put a breakpoint in channel_detect_device.m at line 32, and then link your .fif file to the database.

I am imported the the .fif but I edited the channel, I removed all the Grad I kept the MAG

so I donot have the . fif any more,
I just have the edited channel like:
image

If you have only one type of sensor left, Brainstorm will not identify this as an Elekta dataset anymore.

In Brainstorm, if you want to exclude some sensors, mark them as bad instead of removing them from the data.


OK thank you
so how can I mark all the MEG GRAD as bad channel?

https://neuroimage.usc.edu/brainstorm/Tutorials/BadChannels

To script this you can also use the process: Import > Channel file > Set bad channels.

image
it is not activated

You need to select your data files in the Process1 box....

Something like that?
image

But I still see that GRAD in the display sensors?

The idea is I want to display the sensor (just meg not grad) with normals direction as we see when we plot the vecterview all

if we choose vecterview (MEG) the image not ploting also the normal like before
image

so what should I do?

Unfortunately we did not code any additional configuration options for these displays.
If this is not sufficient for you, you can either:

  1. Edit the code of figure_3d.m/PlotCoils, and for instance comment out the part that displays the gradiometers: https://github.com/brainstorm-tools/brainstorm3/blob/master/toolbox/gui/figure_3d.m#L4106
  2. Remove the graphical objects that you don't want, with the MATLAB GUI (right-click on figure > Figure > Plot edit toolbar) or from the command line (use findobj(gcf,...), try to find the objects you don't want and remove them with "delete")

Can you please let me know which lines excatly I can comment,

Commenting all the block 4108-4141 would prevent the creation of all the gradiometers objects.
You if want to go off-road, don't be afraid of experimenting yourself.

Is it possible to select one sensor and move it a little bit up/down right/left? and save the new coordinates

Not with MEG, it doesn't make sense.
You can edit the channel file the way you want for testing purposes.
https://neuroimage.usc.edu/brainstorm/Tutorials/ChannelFile#Edit_the_channel_file