Skip to content

Commit cf1bf98

Browse files
committed
recfactored stimulus to other
1 parent 62e4264 commit cf1bf98

File tree

11 files changed

+71
-71
lines changed

11 files changed

+71
-71
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ The package requires the recorded XDF data to be organized in a specific directo
4141

4242

4343
- The `projects` root location is the root directory where all the eeg raw recordings (say `.xdf` files) are stored e.g. `projects/sub-A/ses-001/eeg/sub-A_ses-001_task-foo.xdf`.
44-
- The (optional) `project_stimulus` root location is the directory where the experiments (e.g `.py`, `.oxexp`) and behavioral files (e.g. eye-tracking recordings, labnotebook, participant forms, etc ) are stored.
44+
- The (optional) `project_other` root location is the directory where the experiments (e.g `.py`, `.oxexp`) and behavioral files (e.g. eye-tracking recordings, labnotebook, participant forms, etc ) are stored.
4545
- The `bids` root location is the directory where the converted BIDS data is stored, along with source data and code files which we want to version control using `Datalad`.
4646

4747
> [!IMPORTANT]
4848
> Please follow the BIDS data organization guidelines for storing the neuroimaging data for running this package. The BIDS conversion guidelines are based on the recommended directory/files structure. You only can change the location of the root directories according to your preference. You must also strictly follow the naming convention for the project and subject subdirectories.
4949
50-
Here you will find the recommended directory structure for storing the project data (recorded, stimulus and converted data) in the [data_organization](docs/data_organization.md) file.
50+
Here you will find the recommended directory structure for storing the project data (recorded, other and converted data) in the [data_organization](docs/data_organization.md) file.
5151

5252

5353
### **Step 4: Generate the configuration files**

docs/data_organization.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
# How the data is organized
22

3-
In this project, we are using a sample xdf file along with the corresponding stimulus files to demonstrate how the data inside the `projectname` folder is organized. This data should be organized in a specific way:
3+
In this project, we are using a sample xdf file along with the corresponding other files to demonstrate how the data inside the `projectname` folder is organized. This data should be organized in a specific way:
44

55
### Recommended Project Organization Structure
66

77
For convenience, we have provided a recommended project organization structure for the root directories to organize the data better.
88

99

1010
> [!IMPORTANT]
11-
> The recommended directory structure is not self generated. The user needs to create the directories and store the recorded and stimulus data in them before running the conversion.
11+
> The recommended directory structure is not self generated. The user needs to create the directories and store the recorded and others data in them before running the conversion.
1212
1313
The dataset (both recorded and converted) is stored in the parent `data` directory. The `data` directory has three subdirectories under which the entire project is stored. The recommended directory structure is as follows:
1414
```
1515
data
1616
├── bids # Converted BIDS data
1717
├── projectname1
1818
├── projectname2
19-
├── project_stimulus # Experimental/Behavioral files
19+
├── project_other # Experimental/Behavioral files
2020
├── projectname1
2121
├── projectname2
2222
├── projects
@@ -26,7 +26,7 @@ data
2626
2727
```
2828

29-
Here `./data/projects/`, `./data/project_stimulus/`, `./data/bids/` are the root project directories. Each of this root directories will have a project name directory inside it and each project directory will have a subdirectory for each subject.
29+
Here `./data/projects/`, `./data/project_other/`, `./data/bids/` are the root project directories. Each of this root directories will have a project name directory inside it and each project directory will have a subdirectory for each subject.
3030

3131

3232
## Projects Folder
@@ -52,7 +52,7 @@ Filename Convention for the raw data files :
5252
- **tasklabel** - `duration, mscoco, ...`
5353
- **runlabel** - `001, 002, 003, ...` (need to be an integer)
5454

55-
## Project Stimulus Folder
55+
## Project Other Folder
5656

5757
This folder contains the experimental and behavioral files which we also store in the dataverse. The folder structure is should as follows:
5858

@@ -66,15 +66,15 @@ This folder contains the experimental and behavioral files which we also store i
6666
└── behavioral_files((lab notebook, CSV, EDF file, etc))
6767

6868
- **projectname** - any descriptive name for the project
69-
- **experiment** - contains the experimental files for the project. Eg: showStimulus.m, showStimulus.py
69+
- **experiment** - contains the experimental files for the project. Eg: showOther.m, showOther.py
7070
- **data** - contains the behavioral files for the corresponding subject. Eg: experimentalParameters.csv, eyetrackingdata.edf, results.tsv.
7171

7272

7373
You can get the filename convention for the data files [here](https://bids-standard.github.io/bids-starter-kit/folders_and_files/files.html#modalities).
7474

7575
## BIDS Folder
7676

77-
This folder contains the converted BIDS data files and other files we want to version control using `Datalad`. Since we are storing the entire dataset in the dataverse, we also store the raw xdf files and the associated stimulus/behavioral files in the dataverse. The folder structure is as follows:
77+
This folder contains the converted BIDS data files and other files we want to version control using `Datalad`. Since we are storing the entire dataset in the dataverse, we also store the raw xdf files and the associated other/behavioral files in the dataverse. The folder structure is as follows:
7878
```
7979
└── bids
8080
└──projectname/
@@ -90,7 +90,7 @@ This folder contains the converted BIDS data files and other files we want to ve
9090
├── sub-001_ses-001_task-Duration_run-001_eeg.eeg
9191
.........
9292
└── beh
93-
└──behavioral files
93+
└──behavioral files (other files)
9494
└── misc
9595
└── experimental files (This needs to stored in zip format)
9696
└── sourcedata

docs/developers_documentation.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
LSLAutoBIDS is a Python tool series designed to automate the following tasks sequentially:
77
- Convert recorded XDF files to BIDS format
8-
- Integrate the EEG data with non-EEG data (e.g., behavioral, stimulus) for the complete dataset
8+
- Integrate the EEG data with non-EEG data (e.g., behavioral, other) for the complete dataset
99
- Datalad integration for version control for the integrated dataset
1010
- Upload the dataset to Dataverse
1111
- Provide a command-line interface for cloning, configuring, and running the conversion process
@@ -17,7 +17,7 @@ LSLAutoBIDS is a Python tool series designed to automate the following tasks seq
1717
- DataLad integration for version control
1818
- Dataverse integration for data sharing
1919
- Configurable project management
20-
- Support for stimulus and behavioral data in addition to EEG data
20+
- Support for behavioral data (non eeg files) in addition to EEG data
2121
- Comprehensive logging and validation for BIDS compliance
2222

2323

@@ -87,7 +87,7 @@ The configuration system manages dataversse and project-specific settings using
8787
#### 1. Dataverse and Project Root Configuration (`gen_dv_config.py`)
8888

8989
This module generates a global configuration file for Dataverse and project root directories. This is a one-time setup per system. This file is stored in `~/.config/lslautobids/autobids_config.yaml` and contains:
90-
- Paths for BIDS, projects, and stimulus directories : This allows users to specify where their eeg data, stimulus data, and converted BIDS data are stored on their system. This paths should be relative to the home/users directory of your system and string format.
90+
- Paths for BIDS, projects, and project_other directories : This allows users to specify where their eeg data, behavioral data, and converted BIDS data are stored on their system. This paths should be relative to the home/users directory of your system and string format.
9191

9292
- Dataverse connection details: Base URL, API key, and parent dataverse name for uploading datasets. Base URL is the URL of the dataverse server (e.g. https://darus.uni-stuttgart.de), API key is your personal API token for authentication (found in your dataverse account settings), and parent dataverse name is the name of the dataverse under which datasets will be created (this can be found in the URL when you are in the dataverses page just after 'dataverse/'). For example, if the URL is `https://darus.uni-stuttgart.de/dataverse/simtech_pn7_computational_cognitive_science`, then the parent dataverse name is `simtech_pn7_computational_cognitive_science`.
9393

@@ -192,15 +192,15 @@ The pipeline is designed to ensure:
192192

193193
2. EEG recordings are converted to BIDS format using MNE and validated against the BIDS standard.
194194

195-
3. Behavioral and experimental metadata (also called stimulus files in general) are included and checked against project expectations.
195+
3. Behavioral and experimental metadata (also called other files in general in context on this project) are included and checked against project expectations.
196196

197197
4. Project metadata is populated (dataset_description.json). This is required as a part of BIDS standard.
198198

199199
5. The dataset is registered in Dataverse and optionally pushed/uploaded automatically.
200200

201201
#### 1. Entry Point (`bids_process_and_upload()`)
202202

203-
- Reads project configuration (<project_name>_config.toml) to check if a stimulus computer was used. (stimulusFilesUsed: true)
203+
- Reads project configuration (<project_name>_config.toml) to check if a other computer (non eeg files) was used. (otherFilesUsed: true)
204204

205205
- Iterates over each processed file and extracts identifiers. For example, for a file named `sub-001_ses-001_task-Default_run-001_eeg.xdf`, it extracts:
206206

@@ -264,7 +264,7 @@ This function handles the core conversion of a XDF files to BIDS format and cons
264264
- 0: BIDS Conversion done but validation failure
265265

266266
#### 3. Copy Source Files (`copy_source_files_to_bids()`)
267-
This function ensures that the original source files (EEG and stimulus/behavioral files) are also a part our dataset. These files can't be directly converted to BIDS format but we give the user the option to include them in the BIDS directory structure in a pseudo-BIDS format for completeness.
267+
This function ensures that the original source files (EEG and other/behavioral files) are also a part our dataset. These files can't be directly converted to BIDS format but we give the user the option to include them in the BIDS directory structure in a pseudo-BIDS format for completeness.
268268

269269
- Copies the .xdf into the following structure:
270270
`<BIDS_ROOT>/sourcedata/sub-XXX/ses-YYY/sub-XXX_ses-YYY_task-Name_run-ZZZ_eeg.xdf`
@@ -273,13 +273,13 @@ This function ensures that the original source files (EEG and stimulus/behaviora
273273

274274
- If a file already exists, logs a message and skips copying.
275275

276-
If stimulusFilesUsed=True in project config file:
276+
If otherFilesUsed=True in project config file:
277277

278278
1. Behavioral files are copied via `_copy_behavioral_files()`.
279279

280-
- Validates required files against TOML config (`StimulusFilesInfo`). In this config we add the the extensions of the expected stimulus files. For example, in our testproject we use EyeList 1000 Plus eye tracker which generates .edf and .csv files. So we add these extensions as required stimulus files. We also have mandatory labnotebook and participant info files in .tsv format.
280+
- Validates required files against TOML config (`OtherFilesInfo`). In this config we add the the extensions of the expected other files. For example, in our testproject we use EyeList 1000 Plus eye tracker which generates .edf and .csv files. So we add these extensions as required other files. We also have mandatory labnotebook and participant info files in .tsv format.
281281
- Renames files to include sub-XXX_ses-YYY_ prefix if missing.
282-
- Deletes the other files in the stimulus directory that are not listed in `StimulusFilesInfo` in the project config file. It doesn"t delete from the source directory, only from out BIDS dataset.
282+
- Deletes the other files in the project_other directory that are not listed in `OtherFilesInfo` in the project config file. It doesn"t delete from the source directory, only from out BIDS dataset.
283283

284284
2. Experimental files are copied via `_copy_experiment_files().`
285285

@@ -288,7 +288,7 @@ If stimulusFilesUsed=True in project config file:
288288
- Compresses into experiment.tar.gz.
289289
- Removes the uncompressed folder.
290290

291-
There is a flag in the `lslautobids run` command called `--redo_stim_pc` which when specified, forces overwriting of existing stimulus and experiment files in the BIDS dataset. This is useful if there are updates or corrections to the stimulus/behavioral data that need to be reflected in the BIDS dataset.
291+
There is a flag in the `lslautobids run` command called `--redo_other_pc` which when specified, forces overwriting of existing other and experiment files in the BIDS dataset. This is useful if there are updates or corrections to the other/behavioral data that need to be reflected in the BIDS dataset.
292292

293293
#### 4. Create Raw XDF (`create_raw_xdf()`)
294294
This function reads the XDF file and creates an MNE Raw object. It performs the following steps:
@@ -427,5 +427,5 @@ To run the tests, navigate to the `tests/` directory and execute:
427427
These tests ensure that each component functions as expected and that the overall pipeline works seamlessly. This tests will also be triggered automatically on each push or PR to the main repository using GitHub Actions.
428428

429429
## Miscellianeous Points
430-
- To the current date, only EEG data is supported for BIDS conversion. Support for other modalities like Eye-tracking, etc,. in the BIDS format is not yet supported. Hence, LSLAutoBIDS relies on semi-BIDS data structures for those data and use user-definable regular expressions to match expected data-files. A future planned feature is to provide users more flexibility, especially in naming / sorting non-standard files. Currently, the user can only specify the expected file extensions for stimulus/behavioral data and is automatically renamed to include sub-XXX_ses-YYY_ prefix if missing and also copied to pseudo-BIDS folder structure like `<BIDS_ROOT>/sourcedata/sub-XXX/ses-YYY/`, `<BIDS_ROOT>/misc/experiment.tar.gz` etc,.
430+
- To the current date, only EEG data is supported for BIDS conversion. Support for other modalities like Eye-tracking, etc,. in the BIDS format is not yet supported. Hence, LSLAutoBIDS relies on semi-BIDS data structures for those data and use user-definable regular expressions to match expected data-files. A future planned feature is to provide users more flexibility, especially in naming / sorting non-standard files. Currently, the user can only specify the expected file extensions for other/behavioral data and is automatically renamed to include sub-XXX_ses-YYY_ prefix if missing and also copied to pseudo-BIDS folder structure like `<BIDS_ROOT>/sourcedata/sub-XXX/ses-YYY/`, `<BIDS_ROOT>/misc/experiment.tar.gz` etc,.
431431

docs/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ __5. Who controls the data upload process?__
2626
- There is a user prompt asking the experimenter if they want to upload the subject recording immediately when we run the `lslautobids run` command. We can also use the `--yes` flag of the `lslautobids run` command to force yes user input for all the user prompts throughout the run.
2727

2828
__6. Can you upload a subset of files ?__
29-
- Yes, we have configurations in the project_config.toml file where the experimenter can specify to exclude certain subjects, certain tasks, and only exclude private stimulus files.
29+
- Yes, we have configurations in the project_config.toml file where the experimenter can specify to exclude certain subjects, certain tasks, and only exclude private project_other files.
3030

3131
__7. Can you upload to any other portals apart from Dataverse?__
3232
- It is not yet implemented as a choice but rather hard coded, but as long as a dataverse sibling is supported, many portals could be used (dataverse, openneuro, aws,...). Currently, on Dataverse as a sibling is supported by our tool.

0 commit comments

Comments
 (0)