Skip to content

Commit

Permalink
FIX recognise acq; this is a hot fix
Browse files Browse the repository at this point in the history
  • Loading branch information
htwangtw committed Dec 8, 2023
1 parent 5d5a16b commit ee6f80f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
13 changes: 13 additions & 0 deletions giga_auto_qc/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,16 @@ def test_parse_scan_information():
)
parsed = utils.parse_scan_information(metrics=metrics)
assert list(parsed.columns[:3]) == ["participant_id", "task", "run"]

# specifiers with different entities
bids_specifier_index = [
"sub-test_task-finger",
"sub-test_task-rest_acq-1_run-001",
"sub-test_task-rest_acq-2_run-001",
"sub-test_task-rest_run-002",
]
metrics = pd.DataFrame(
np.random.random((4, 4)), index=bids_specifier_index
)
parsed = utils.parse_scan_information(metrics=metrics)
assert list(parsed.columns[:4]) == ["participant_id", "task", "acq", "run"]
8 changes: 7 additions & 1 deletion giga_auto_qc/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
from pathlib import Path
import pandas as pd

BIDS_ENTITIES = {"sub": 0, "ses": 1, "task": 2, "run": 3}
BIDS_ENTITIES = {
"sub": 0,
"ses": 1,
"task": 2,
"acq": 3,
"run": 4,
}


def get_subject_lists(
Expand Down

0 comments on commit ee6f80f

Please sign in to comment.