Skip to content

Commit

Permalink
latest plugin updates
Browse files Browse the repository at this point in the history
  • Loading branch information
dungscout96 committed Jul 25, 2024
1 parent 11c59e4 commit 704eea5
Show file tree
Hide file tree
Showing 395 changed files with 523 additions and 415 deletions.
18 changes: 10 additions & 8 deletions code/plugins/reformat_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ def reformat_plugin_dir(plugin_input_dir, plugin_name, order, plugin_type='wiki'
if os.path.exists(os.path.join(plugin_input_dir, 'images')):
shutil.copytree(os.path.join(plugin_input_dir, 'images'), os.path.join(plugin_output_dir, 'images'), dirs_exist_ok=True)
# copy all .jpg and .png files from input to output dir
for root, dirs, files in os.walk(plugin_input_dir):
for file in files:
if file.endswith('.jpg') or file.endswith('.png'):
shutil.copyfile(os.path.join(root, file), os.path.join(plugin_output_dir, file))
for file in os.listdir(plugin_input_dir):
if file.endswith('.jpg') or file.endswith('.png'):
shutil.copyfile(os.path.join(plugin_input_dir, file), os.path.join(plugin_output_dir, file))

# if plugin is 'imat', copy the Docs directory recursively to the output directory
if plugin_name == 'imat':
Expand Down Expand Up @@ -59,11 +58,14 @@ def reformat_plugin_dir(plugin_input_dir, plugin_name, order, plugin_type='wiki'
if plugin_type == 'wiki':
wiki_plugin_input_dir = plugin_input_dir + '.wiki'

# copy image directory from input to output dir
if os.path.exists(os.path.join(wiki_plugin_input_dir, 'images')):
shutil.copytree(os.path.join(wiki_plugin_input_dir, 'images'), os.path.join(plugin_output_dir, 'images'), dirs_exist_ok=True)
# copy all .jpg and .png files from wiki input to output dir
for root, dirs, files in os.walk(wiki_plugin_input_dir):
for file in files:
if file.endswith('.jpg') or file.endswith('.png'):
shutil.copyfile(os.path.join(root, file), os.path.join(plugin_output_dir, file))
for file in os.listdir(wiki_plugin_input_dir):
if file.endswith('.jpg') or file.endswith('.png'):
shutil.copyfile(os.path.join(wiki_plugin_input_dir, file), os.path.join(plugin_output_dir, file))


for root, dirs, files in os.walk(wiki_plugin_input_dir):
for file in files:
Expand Down
4 changes: 2 additions & 2 deletions code/plugins/update_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def update_repo(repo, order, plugin_type='readme'):
# if 'github' not in current directory, create it
if not os.path.exists('github'):
os.makedirs('github')
wiki_plugins = ['SIFT', 'get_chanlocs', 'NFT', 'PACT', 'nsgportal', 'clean_rawdata', 'amica']
readme_plugins = ['ARfitStudio', 'roiconnect', 'EEG-BIDS', 'trimOutlier', 'groupSIFT', 'nwbio', 'ICLabel', 'dipfit', 'eegstats', 'PowPowCAT', 'PACTools', 'zapline-plus', 'fMRIb', 'relica', 'std_dipoleDensity', 'imat', 'viewprops', 'cleanline','NIMA', 'firfilt']
wiki_plugins = ['SIFT', 'get_chanlocs', 'NFT', 'EEG-BIDS', 'nsgportal', 'clean_rawdata', 'amica']
readme_plugins = ['ARfitStudio', 'roiconnect', 'trimOutlier', 'PACT', 'groupSIFT', 'nwbio', 'ICLabel', 'dipfit', 'eegstats', 'PowPowCAT', 'PACTools', 'zapline-plus', 'fMRIb', 'relica', 'std_dipoleDensity', 'imat', 'viewprops', 'cleanline','NIMA', 'firfilt']
ordering = ['ICLabel', 'dipfit', 'EEG-BIDS', 'roiconnect', 'amica', 'cleanline', 'clean_rawdata', 'SIFT', 'zapline-plus', 'eegstats', 'trimOutlier', 'fMRIb', 'imat', 'nwbio', 'NIMA', 'PACT', 'NFT', 'PACTools', 'ARfitStudio', 'PowPowCAT', 'relica', 'std_dipoleDensity', 'viewprops', 'firfilt', 'groupSIFT', 'get_chanlocs', 'nsgportal']

if len(sys.argv) == 1:
Expand Down
Binary file removed plugins/ARfitStudio/Onchannels.png
Binary file not shown.
Binary file removed plugins/ARfitStudio/Onics.png
Binary file not shown.
Binary file removed plugins/ARfitStudio/Screenshot1_interpolatespike.png
Binary file not shown.
Binary file not shown.
Binary file removed plugins/ARfitStudio/Screenshot3_interpolatespike.png
Binary file not shown.
8 changes: 4 additions & 4 deletions plugins/ARfitStudio/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ title: ARfitStudio
long_title: ARfitStudio
parent: Plugins
has_children: true
nav_order: 7
nav_order: 8
---
To view the plugin source code, please visit the plugin's [GitHub repository](https://github.com/sccn/ARfitStudio).

What is ARfitStudio
What is ARfitStudio?
-------------------

First of all, ARfit is a collection of Matlab modules developed by Tapio
Expand Down Expand Up @@ -36,7 +36,7 @@ should compile the mex file.
<http://www.mathworks.com/matlabcentral/fileexchange/174-arfit>
<http://www.mathworks.com/matlabcentral/fileexchange/29854-multiple-colon/content/mcolonFolder/mcolon.m>

Why ARfitStudio
Why ARfitStudio?
---------------

If there are spike artifacts with high amplitude, we cannot filter the
Expand Down Expand Up @@ -138,4 +138,4 @@ T. Schneider and A. Neumaier, 2001: Algorithm 808: ARfit – A Matlab
package for the estimation of parameters and eigenmodes of multivariate
autoregressive models. ACM Trans. Math. Softw., 27, 58-65.

Authors: Makoto Miyakoshi and Tim Mullen. SCCN, INC, UCSD
Authors: Makoto Miyakoshi and Tim Mullen. SCCN, INC, UCSD
Binary file added plugins/EEG-BIDS/BIDS_doc1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 63 additions & 0 deletions plugins/EEG-BIDS/EEG‐BIDS-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
layout: default
title: EEG‐BIDS-docs
long_title: EEG‐BIDS-docs
parent: EEG-BIDS
grand_parent: Plugins
---
# Documentation and tutorial videos

<img width="1680" alt="BIDS_doc1play" src="https://github.com/sccn/bids-matlab-tools/assets/1872705/643cc06a-90b5-4697-b1f8-7769dc937bfb">

[link to video](https://www.youtube.com/watch?v=EClpeP7WREw)

# Import datasets from BIDS to EEGLAB study

The EEGLAB menu to import a BIDS dataset into an EEGLAB study is fully functional. Screen capture is shown below.

![pop_importbids.m interface](pop_importbids.png)

Raw EEG data file often has events. However, BIDS also define events in dedicated event files. Sometimes the BIDS event files contain more information than the raw EEG data file. In that case, users may choose to overwrite raw EEG data events with the event information contained in the BIDS event files.

Similarly, raw EEG data files often define channel labels. However, BIDS also defines channel labels and channel locations in dedicated event files. By pressing the second checkbox, users may choose to use the channel label and location information contained in the BIDS channel definition files.

Finally, users may select an output folder for storing their EEGLAB STUDY. If a folder is not selected, EEGLAB will store STUDY files ''in place'' which means in the BIDS folder structure - resulting in the BIDS folder becoming non-BIDS compliant and failing to pass BIDS validation because of the additional EEGLAB files.

# Export datasets to BIDS from the graphic interface

After installing the bids-matlab-tools plugin, the BIDS menu should appear in the EEGLAB File menu item as shown below.

![](eeglab_menu_bids.png)

We will go through the menus one by one. First the task menu. This is where you enter all the information about the task and amplifier information.

![](bids_task.png)

Once you are done entering task information, you can select the participant menu. There are as many rows as subjects. For each subject, you can specify age, gender, group, etc... Only the participant_id column is mandatory and other columns are optional.

![](participant.png)

Note that it is also possible to define custom columns. To do this, you can click on the "import column(s)" push button. Upon doing so, you are prompted to select a text or Excel file. Note that the first row must contain column names. After selecting the file, the following interface pops up.

![](import_column.png)

You must indicate which column contains participant ID. You can also select columns for the pre-defined BIDS participant information, such as age, gender, etc... Finally, it is possible to select columns which will be added to the BIDS participant file, in this case "ethnicity" and "income".

Lastly, we fill out information about events. The GUI displays default BIDS event fields to which you can associate the corresponding EEGLAB event field in your data. *onset*, *value*, and *sample* are mapped to their corresponding EEGLAB field by default. *duration* and *HED* will also be automatically mapped if their corresponding EEGLAB field (*duration* and *usertags* respectively) exist. Custom fields can be added via the "Add BIDS field" button. Fields can also be removed via the "Remove BIDS field" button. Note that any BIDS field not mapped to EEGLAB event field will not be saved for later export.
![](pop_eventinfo.png)

# Export datasets to BIDS from the command line

Exporting a collection of datasets to BIDS can also conveniently be done from the command line. A documented example script [bids_export_example.m](https://github.com/sccn/bids-matlab-tools/blob/master/bids_export_example.m) and [bids_export_example2.m](https://github.com/sccn/bids-matlab-tools/blob/master/bids_export_example2.m) (more recent) are provided. You may modify these scripts for your own purpose. The help message of the function [bids_export.m](https://github.com/sccn/bids-matlab-tools/blob/master/bids_export.m) also contains information on how to export data in BIDS format.

Note for exporting:
* Several tasks may be included in a single BIDS container. In this case, the name of the main task can be "mixed tasks" and multiple EEG datasets for different tasks can be contained in a single subject/eeg/ folder.
* Channel electrodes should not be exported by default if they are template electrode positions. This is because BIDS is about raw data. Electrode positions based on templates (averages) should therefore not be included.

# EEG and eye-tracking alignment

In the testing folder, use the **test_smi.m** function to look at EEG and eye-tracking synchronization. The plot below shows the original eye-tracking data (along with the events plotted as black vertical traces) and on top the joint EEG and eye-tracking data (only the eye-tracking data is shown for comparison). The alignment is near perfect despite the different sampling rates.

![Screen Shot 2023-12-12 at 5 37 25 PM](https://github.com/sccn/bids-matlab-tools/assets/1872705/f2d9f851-b6d9-4e7c-9360-1d7e6880e6b3)

See the function [bids_export_example5_eye.m](https://github.com/sccn/bids-matlab-tools/blob/master/bids_export_eye_tracking_example5.m) for how to export joint EEG and eye-tracking data.
Binary file added plugins/EEG-BIDS/bids_task.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plugins/EEG-BIDS/eeglab_menu_bids.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plugins/EEG-BIDS/import_column.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion plugins/EEG-BIDS/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: EEG-BIDS
long_title: EEG-BIDS
parent: Plugins
has_children: true
nav_order: 9
nav_order: 4
---
To view the plugin source code, please visit the plugin's [GitHub repository](https://github.com/sccn/EEG-BIDS).

Expand Down Expand Up @@ -64,15 +64,19 @@ EEG-BIDS allows importing BIDS datasets into EEGLAB. This is the type of informa

Make sure you clone with submodules

```
git clone --recurse-submodules https://github.com/sccn/EEG-BIDS
```

# Use with EEGLAB

Simply place the code in the EEGLAB plugin folder, and EEGLAB will automatically detect it. See documentation at [https://github.com/sccn/EEG-BIDS/wiki](https://github.com/sccn/EEG-BIDS/wiki).

# zip command to release plugin

```
zip -r EEG-BIDS8.0.zip EEG-BIDS/* -x /EEG-BIDS/testing/additionaltests/* /EEG-BIDS/testing/ds004117/* /EEG-BIDS/testing/hbn_eye_tracking_data/* /EEG-BIDS/testing/data/*
```

# Version history

Expand Down
Binary file added plugins/EEG-BIDS/participant.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plugins/EEG-BIDS/pop_eventinfo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plugins/EEG-BIDS/pop_importbids.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 22 additions & 23 deletions plugins/ICLabel/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: ICLabel
long_title: ICLabel
parent: Plugins
has_children: true
nav_order: 13
nav_order: 14
---
To view the plugin source code, please visit the plugin's [GitHub repository](https://github.com/sccn/ICLabel).

Expand All @@ -19,28 +19,6 @@ If you plan to install the plugin through GitHub rather than the EEGLAB plugin m

git clone --recursive https://github.com/lucapton/ICLabel.git

## Version history
Pending - new message if signal processing toolbox is absent (we judged a new release was not necessary for such a small change)

1.6 - fix issue with electrode orientation introduced in version 1.5 one month prior

1.5 - minor tweaks and better stability (see commit history)

1.4 - adding 'average' to the list of possible reference for EEGLAB compatibility

1.3 - make sure the classification probabilities are identical when processing multiple datasets with the same ICA decompositions

1.2.6 - fix issue in pop_iclabel.m for Matlab prior to 2016, fix rare path issue and issue with autocorrelation length

1.2.5 - fix issue when pressing cancel in pop_iclabel.m

1.2.4 - Forgot to include some dependencies in 1.2.3, adding them back and fix issue to view properties

1.2.3 - Fix bug for single dataset

1.2.2 - Fix STUDY calling format and add new function eeg_icalabelstat


## Usage
### Graphical Usage
![menu](ICLabel_menu.png)
Expand Down Expand Up @@ -102,3 +80,24 @@ data = read_eeglabdata( EEG, 'header', hdr );
event = read_eeglabevent( EEG, 'header', hdr );
cd(curPath);
```

## Version history
Pending - new message if signal processing toolbox is absent (we judged a new release was not necessary for such a small change)

1.6 - fix issue with electrode orientation introduced in version 1.5 one month prior

1.5 - minor tweaks and better stability (see commit history)

1.4 - adding 'average' to the list of possible reference for EEGLAB compatibility

1.3 - make sure the classification probabilities are identical when processing multiple datasets with the same ICA decompositions

1.2.6 - fix issue in pop_iclabel.m for Matlab prior to 2016, fix rare path issue and issue with autocorrelation length

1.2.5 - fix issue when pressing cancel in pop_iclabel.m

1.2.4 - Forgot to include some dependencies in 1.2.3, adding them back and fix issue to view properties

1.2.3 - Fix bug for single dataset

1.2.2 - Fix STUDY calling format and add new function eeg_icalabelstat
Binary file added plugins/NFT/400px-NFT_from_MRI_segmentation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plugins/NFT/NFM_Toolboox_UsersManual19x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plugins/NFT/NFM_Toolboox_UsersManual23x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plugins/NFT/NFT_WMpointselection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plugins/NFT/NFT_cerebellarlowpoint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plugins/NFT/NFT_coregistration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plugins/NFT/NFT_eyelobes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plugins/NFT/NFT_eyeselection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plugins/NFT/NFT_forward_ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plugins/NFT/NFT_meshgeneration_ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plugins/NFT/NFT_segmentation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plugins/NFT/NFT_sourcespacegen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plugins/NFT/NFT_ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plugins/NFT/NFT_warping_ui.png
Binary file added plugins/NFT/NFTsmall.jpg
Binary file added plugins/NFT/Wiki_figure.png
Binary file removed plugins/NIMA/Alphacomparison.png
Diff not rendered.
Binary file removed plugins/NIMA/Blob_from2to7mm.png
Diff not rendered.
Binary file removed plugins/NIMA/Dipfitcomparison.png
Diff not rendered.
Binary file removed plugins/NIMA/Nimafigure01.png
Diff not rendered.
Binary file removed plugins/NIMA/P159_separatealpha.png
Diff not rendered.
Binary file removed plugins/NIMA/Voxels_from2to7mm.png
Diff not rendered.
Binary file removed plugins/NIMA/Voxels_fwhm8to28mm.png
Diff not rendered.
Binary file removed plugins/PACT/1310421662_filesave.png
Diff not rendered.
Binary file removed plugins/PACT/1310422055_1_folder_empty.png
Diff not rendered.
Binary file removed plugins/PACT/1339561905_player_play.png
Diff not rendered.
Binary file removed plugins/PACT/1339562143_player_pause.png
Diff not rendered.
Binary file removed plugins/PACT/1339562177_player_fwd.png
Diff not rendered.
Binary file removed plugins/PACT/1339562202_player_rew.png
Diff not rendered.
Binary file removed plugins/PACT/1339562341_player_record.png
Diff not rendered.
Binary file removed plugins/PACT/1339562483_Player_Fordward.png
Diff not rendered.
Binary file removed plugins/PACT/1339562483_Player_Fordward1.png
Diff not rendered.
Binary file removed plugins/PACT/1339562575_control-center2.png
Diff not rendered.
Binary file removed plugins/PACT/32px-Dialog-apply.svg.png
Diff not rendered.
Binary file removed plugins/PACT/32px-Gnome-audio-volume-high.svg.png
Diff not rendered.
Binary file removed plugins/PACT/32px-Gnome-colors-alacarte.svg.png
Diff not rendered.
Binary file removed plugins/PACT/32px-Gnome-document-open.svg.png
Diff not rendered.
Binary file removed plugins/PACT/32px-Gnome-document-save.svg.png
Diff not rendered.
Binary file removed plugins/PACT/32px-Gnome-edit-clear.svg.png
Diff not rendered.
Binary file removed plugins/PACT/32px-Gnome-edit-cut.svg.png
Diff not rendered.
Binary file removed plugins/PACT/32px-Gnome-insert-object.svg.png
Diff not rendered.
Binary file removed plugins/PACT/32px-Gnome-media-eject.svg.png
Diff not rendered.
Binary file removed plugins/PACT/32px-Gnome-media-floppy.svg.png
Diff not rendered.
Binary file removed plugins/PACT/32px-Gnome-media-playback-pause.svg.png
Diff not rendered.
Binary file removed plugins/PACT/32px-Gnome-media-playback-start.svg.png
Diff not rendered.
Binary file removed plugins/PACT/32px-Gnome-media-record.svg.png
Diff not rendered.
Binary file removed plugins/PACT/32px-Gnome-media-seek-backward.svg.png
Diff not rendered.
Binary file removed plugins/PACT/32px-Gnome-media-seek-forward.svg.png
Diff not rendered.
Binary file removed plugins/PACT/32px-Gnome-preferences-other.svg.png
Diff not rendered.
Diff not rendered.
Binary file removed plugins/PACT/32px-Gnome-preferences-system.svg.png
Diff not rendered.
Binary file removed plugins/PACT/add.png
Diff not rendered.
Binary file removed plugins/PACT/atlasOff.png
Diff not rendered.
Binary file removed plugins/PACT/atlasOn.png
Diff not rendered.
Binary file removed plugins/PACT/connectLine.png
Diff not rendered.
Binary file removed plugins/PACT/cortexOff.png
Diff not rendered.
Binary file removed plugins/PACT/cortexOn.png
Diff not rendered.
Binary file removed plugins/PACT/createEvent.png
Diff not rendered.
Binary file removed plugins/PACT/deleteLine.png
Diff not rendered.
Binary file removed plugins/PACT/erpImage.png
Diff not rendered.
Binary file removed plugins/PACT/eventEditor.png
Diff not rendered.
Binary file added plugins/PACT/images/Demo01.jpg
Binary file added plugins/PACT/images/Demo02.jpg
Binary file added plugins/PACT/images/Demo03.jpg
Binary file added plugins/PACT/images/Demo04.jpg
Binary file added plugins/PACT/images/Demo05.jpg
Binary file added plugins/PACT/images/Demo06.jpg
Binary file added plugins/PACT/images/PACT05Hz.jpg
Binary file added plugins/PACT/images/PACT05Hz.png
Binary file added plugins/PACT/images/PACT15Hz.jpg
Binary file added plugins/PACT/images/PACT15Hz.png
Binary file added plugins/PACT/images/PactUpdate1crop.jpg
Binary file added plugins/PACT/images/PactUpdate1crop.png
Binary file added plugins/PACT/images/PactUpdate2.jpg
Binary file added plugins/PACT/images/PactUpdate2.png
Binary file added plugins/PACT/images/PactUpdate3.jpg
Binary file added plugins/PACT/images/PactUpdate3.png
Loading

0 comments on commit 704eea5

Please sign in to comment.