-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from VisLab/develop
Updating the READMEs and adding a LICENSE
- Loading branch information
Showing
8 changed files
with
105 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 HED Standard Working Group | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,49 @@ | ||
|
||
# HED-examples | ||
This repository contains user supporting code and documentation | ||
for using the Hierarchical Event Descriptor (HED) system for | ||
annotating, summarizing, and analyzing data. | ||
The repository is organized into three subdirectories: | ||
|
||
This repository contains a set of | ||
[HED-annotated](https://hed-specification.readthedocs.io/en/latest/index.html) | ||
datasets in [BIDS-compatible](https://bids.neuroimaging.io/) format. | ||
See [datasets/README.md](./datasets/README.md) for details. | ||
The [**datasets**](https://github.com/hed-standard/hed-examples/tree/main/datasets) | ||
subdirectory contains datasets for testing various aspects of HED. | ||
These datasets have stubs for actual imaging data in order to reduce their size. | ||
Most of these datasets have complete versions available on | ||
[**openNeuro**](https://openneuro.org/). | ||
See [**datasets/README.md**](./datasets/README.md) for details. | ||
|
||
The [**hedcode**](https://github.com/hed-standard/hed-examples/tree/main/hedcode) | ||
subdirectory contains MATLAB scripts, Python Jupyter Notebooks, | ||
and Python scripts with direct calls to HedTools. | ||
The repository also contains example code in python and matlab. | ||
See [hedcode/README.md](./hedcode/README.md) for details. | ||
These datasets can be useful for: | ||
See [**hedcode/README.md**](./hedcode/README.md) for details. | ||
The Python scripts and notebooks require the installation of | ||
`hedtools` whose [**installation**](./README.md#installation-of-hedtools) | ||
is described below. | ||
|
||
The repository also will host tutorials and instructional videos, | ||
which are in the process of being developed. | ||
The [**docs**](https://github.com/hed-standard/hed-examples/tree/main/docs) | ||
subdirectory contains the main documentation for this and other HED resources. | ||
The [**HED GitHub organization repository**](https://github.com/hed-standard/) | ||
gathers the HED supporting resources, all of which are open source. | ||
|
||
|
||
### Installation of hedtools | ||
|
||
The most of the Python-related resources in this repository | ||
require the installation of the HEDTools Python module, which can be | ||
installed using `pip` or directly from its GitHub repository as follows: | ||
|
||
To use `pip` to install `hedtools` from PyPI: | ||
|
||
``` | ||
pip install hedtools | ||
``` | ||
|
||
To install directly from the | ||
[GitHub](https://github.com/hed-standard/hed-python) repository: | ||
|
||
``` | ||
pip install git+https://github.com/hed-standard/hed-python/@master | ||
``` | ||
|
||
HEDTools require python 3.7 or greater. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,36 @@ | ||
## Jupyter notebooks to demo HED tagging | ||
### Jupyter notebooks to demo HED processing with BIDS | ||
|
||
These notebooks demonstrate the HED processing using the HED tools. | ||
The Jupyter notebooks in this directory are useful for annotating, | ||
validating, summarizing, and analyzing your BIDS datasets. | ||
|
||
**Table 1:** Useful Jupyter notebooks for processing BIDS datasets. | ||
|
||
### BIDS processing notebooks | ||
|
||
## Useful notebooks for processing BIDS datasets | ||
|
||
The Jupyter notebooks in this directory are useful for preparing your BIDS dataset. | ||
|
||
**Table 1:** Useful Jupyter notebooks for preparing BIDS datasets. | ||
|
||
|Script | Purpose | | ||
|Notebooks | Purpose | | ||
| ------------------------ | ---------------------------------- | | ||
| `bids_generate_sidecar` | Creates a JSON sidecar based on all the event files in a dataset. | | ||
| `bids_merge_sidecar` | Merges a spreadsheet version of a sidecar into a JSON sidecar. | | ||
| `bids_sidecar_to_spreadsheet` | Converts the HED portion of a JSON sidecar into a 4-column spreadsheet. | | ||
| `bids_validate_dataset` | Validates the HED annotations in a BIDS dataset. | | ||
| `bids_validate_dataset_with_libraries` | Demonstrates use of HED libraries in validation. | | ||
|
||
|
||
### Event file restructuring notebooks | ||
| [`bids_generate_sidecar`](https://github.com/hed-standard/hed-examples/blob/main/hedcode/jupyter_notebooks/bids_generate_sidecar.ipynb) | Creates a JSON sidecar based on all the event files in a dataset. | | ||
| [`bids_merge_sidecar`](https://github.com/hed-standard/hed-examples/blob/main/hedcode/jupyter_notebooks/bids_merge_sidecar.ipynb) | Merges a spreadsheet version of a sidecar into a JSON sidecar. | | ||
| [`bids_sidecar_to_spreadsheet`](https://github.com/hed-standard/hed-examples/blob/main/hedcode/jupyter_notebooks/bids_sidecar_to_spreadsheet.ipynb) | Converts the HED portion of a JSON sidecar into a 4-column spreadsheet. | | ||
| [`bids_summarize_events`](https://github.com/hed-standard/hed-examples/blob/main/hedcode/jupyter_notebooks/bids_summarize_events.ipynb) | Summarizes the contents of the event files, including value counts. | ||
| [`bids_validate_dataset`](https://github.com/hed-standard/hed-examples/blob/main/hedcode/jupyter_notebooks/bids_validate_dataset.ipynb) | Validates the HED annotations in a BIDS dataset. | | ||
| [`bids_validate_dataset_with_libraries`](https://github.com/hed-standard/hed-examples/blob/main/hedcode/jupyter_notebooks/bids_validate_dataset_with_libraries.ipynb) | Demonstrates use of HED libraries in validation. | | ||
|
||
**This section is out of date and will be updated soon.** | ||
The demo scripts use data in `../data/sternberg` and in the reduced | ||
attention shift dataset: | ||
These notebooks require HEDTOOLS, which can be installed using `pip` or directly. | ||
|
||
[https://github.com/hed-standard/hed-examples/data/eeg_ds0028932](https://github.com/hed-standard/hed-examples/data/eeg_ds0028932). | ||
To use `pip` to install `hedtools` from PyPI: | ||
|
||
The notebooks are designed to be executed in the following order: | ||
``` | ||
pip install hedtools | ||
``` | ||
|
||
1. `summarize_events.ipynb` gather all of the unique values in the columns of | ||
all of the events files in a BIDS dataset. | ||
To install directly from the | ||
[GitHub](https://github.com/hed-standard/hed-python) repository: | ||
|
||
2. `create_template.ipynb` gathers all of the unique combinations of values in | ||
a specified group of columns (the key columns) and creates a template file | ||
for you to specify the mapping between each unique key and values in target columns. | ||
This is the **event design** that must be filled in by the user. | ||
``` | ||
pip install git+https://github.com/hed-standard/hed-python/@master | ||
``` | ||
|
||
3. `remap_events.ipynb` creates new event files using the template from the previous | ||
step to remap columns. | ||
HEDTools require python 3.7 or greater. | ||
|
||
4. `tag_columns.ipynb` demonstrates how to create a list of the unique | ||
values in the specified columns in a flattened form so that they can be tagged. | ||
A related GitHub repository | ||
[**hed-curation**](https://github.com/hed-standard/hed-curation) | ||
is holds code related to curation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters