bidsreader 0.1.0__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bidsreader-0.1.0 → bidsreader-0.2.0}/PKG-INFO +1 -1
- {bidsreader-0.1.0 → bidsreader-0.2.0}/bidsreader/__init__.py +2 -1
- bidsreader-0.2.0/bidsreader/public_helpers.py +17 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/bidsreader.egg-info/PKG-INFO +1 -1
- {bidsreader-0.1.0 → bidsreader-0.2.0}/bidsreader.egg-info/SOURCES.txt +1 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/pyproject.toml +1 -1
- {bidsreader-0.1.0 → bidsreader-0.2.0}/.github/workflows/publish.yml +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/.github/workflows/test.yml +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/.gitignore +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/LICENSE +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/README.md +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/bidsreader/_errorwrap.py +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/bidsreader/basereader.py +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/bidsreader/cmlbidsreader.py +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/bidsreader/convert.py +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/bidsreader/exc.py +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/bidsreader/filtering.py +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/bidsreader/helpers.py +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/bidsreader/units.py +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/bidsreader.egg-info/dependency_links.txt +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/bidsreader.egg-info/requires.txt +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/bidsreader.egg-info/top_level.txt +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/setup.cfg +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/tests/__init__.py +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/tests/conftest.py +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/tests/test_basereader.py +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/tests/test_cmlbidsreader.py +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/tests/test_convert.py +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/tests/test_errorwrap.py +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/tests/test_exc.py +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/tests/test_filtering.py +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/tests/test_helpers.py +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/tests/test_units.py +0 -0
- {bidsreader-0.1.0 → bidsreader-0.2.0}/tutorials/bidsreader_tutorial.ipynb +0 -0
|
@@ -8,8 +8,9 @@ from .filtering import (
|
|
|
8
8
|
)
|
|
9
9
|
from .convert import mne_epochs_to_ptsa, mne_raw_to_ptsa
|
|
10
10
|
from .units import detect_unit, get_scale_factor, convert_unit
|
|
11
|
+
from .public_helpers import get_data_index
|
|
11
12
|
from collections import namedtuple
|
|
12
13
|
|
|
13
|
-
__version__ = "0.
|
|
14
|
+
__version__ = "0.2.0"
|
|
14
15
|
version_info = namedtuple("VersionInfo", "major,minor,patch")(
|
|
15
16
|
*__version__.split('.'))
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# imports
|
|
2
|
+
import pandas as pd
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
import re
|
|
5
|
+
|
|
6
|
+
def get_data_index(root, task):
|
|
7
|
+
root = Path(root)
|
|
8
|
+
rows = []
|
|
9
|
+
|
|
10
|
+
pattern = re.compile(r"sub-(?P<sub>[^_]+)_ses-(?P<ses>[^_]+)_task-" + re.escape(task), re.IGNORECASE)
|
|
11
|
+
|
|
12
|
+
for f in root.rglob(f"*task-{task}*beh.tsv"):
|
|
13
|
+
m = pattern.search(f.name)
|
|
14
|
+
if m:
|
|
15
|
+
rows.append({"subject": m.group("sub"), "task": task, "session": m.group("ses")})
|
|
16
|
+
|
|
17
|
+
return pd.DataFrame(rows).drop_duplicates().sort_values(["subject", "session"]).reset_index(drop=True)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|