Skip to content

Commit 887ba12

Browse files
committed
Added citation of BIDS and also boosted "our" supported BIDS version from elderly 1.0.1 to 1.4.1
1 parent ab58494 commit 887ba12

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

heudiconv/bids.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ class BIDSError(Exception):
4444
pass
4545

4646

47+
BIDS_VERSION = "1.4.1"
48+
49+
4750
def populate_bids_templates(path, defaults={}):
4851
"""Premake BIDS text files with templates"""
4952

@@ -53,7 +56,7 @@ def populate_bids_templates(path, defaults={}):
5356
save_json(descriptor,
5457
OrderedDict([
5558
('Name', "TODO: name of the dataset"),
56-
('BIDSVersion', "1.0.1"),
59+
('BIDSVersion', BIDS_VERSION),
5760
('License', defaults.get('License',
5861
"TODO: choose a license, e.g. PDDL "
5962
"(http://opendatacommons.org/licenses/pddl/)")),

heudiconv/convert.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import sys
88
import re
99

10+
from .due import due, Doi
11+
1012
from .utils import (
1113
read_config,
1214
load_json,
@@ -27,7 +29,8 @@
2729
save_scans_key,
2830
tuneup_bids_json_files,
2931
add_participant_record,
30-
BIDSError
32+
BIDSError,
33+
BIDS_VERSION,
3134
)
3235
from .dicoms import (
3336
group_dicoms_into_seqinfos,
@@ -410,6 +413,20 @@ def convert(items, converter, scaninfo_suffix, custom_callable, with_prov,
410413
prov_files = []
411414
tempdirs = TempDirs()
412415

416+
if bids_options is not None:
417+
due.cite(
418+
# doi matches the BIDS_VERSION
419+
Doi("10.5281/zenodo.4085321"),
420+
description="Brain Imaging Data Structure (BIDS) Specification",
421+
path="bids",
422+
version=BIDS_VERSION,
423+
tags=["implementation"])
424+
due.cite(
425+
Doi("10.1038/sdata.2016.44"),
426+
description="Brain Imaging Data Structure (BIDS), Original paper",
427+
path="bids",
428+
tags=["documentation"])
429+
413430
for item_idx, item in enumerate(items):
414431

415432
prefix, outtypes, item_dicoms = item[:3]

0 commit comments

Comments
 (0)