Skip to content

Commit cd336b5

Browse files
sappelhoffagramfort
authored andcommitted
[MRG] split_naming='bids' changes from _part-%d to _split-%d (#7794)
* _part- -> _split- for split_naming='bids' * add whatsnew * DOC: minor link fix * Update doc/changes/latest.inc Co-authored-by: Alexandre Gramfort <[email protected]>
1 parent 903f443 commit cd336b5

File tree

5 files changed

+17
-6
lines changed

5 files changed

+17
-6
lines changed

doc/changes/0.20.inc

+11
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@
77
- "Bug" for bug fixes
88
- "API" for backward-incompatible changes
99

10+
.. _changes_0_20_4:
11+
12+
Version 0.20.4
13+
--------------
14+
15+
Bug
16+
~~~
17+
18+
- BIDS conformity: When saving FIF files to disk and the files are split into parts, the ``split_naming='bids'`` parameter now uses a "_split-%d" naming instead of the previous "_part-%d", by `Stefan Appelhoff`_
19+
20+
1021
.. _changes_0_20_4:
1122

1223
Version 0.20.4

mne/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# Dev branch marker is: 'X.Y.devN' where N is an integer.
1717
#
1818

19-
__version__ = '0.20.4'
19+
__version__ = '0.20.5'
2020

2121
# have to import verbose first since it's needed by many things
2222
from .utils import (set_log_level, set_log_file, verbose, set_config,

mne/io/fiff/tests/test_raw_fiff.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@ def test_split_files(tmpdir):
366366
split_fname = tmpdir.join('split_raw_meg.fif')
367367
# intended filenames
368368
split_fname_elekta_part2 = tmpdir.join('split_raw_meg-1.fif')
369-
split_fname_bids_part1 = tmpdir.join('split_raw_part-01_meg.fif')
370-
split_fname_bids_part2 = tmpdir.join('split_raw_part-02_meg.fif')
369+
split_fname_bids_part1 = tmpdir.join('split_raw_split-01_meg.fif')
370+
split_fname_bids_part2 = tmpdir.join('split_raw_split-02_meg.fif')
371371
raw_1.set_annotations(Annotations([2.], [5.5], 'test'))
372372
raw_1.save(split_fname, buffer_size_sec=1.0, split_size='10MB')
373373

mne/io/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,6 @@ def _construct_bids_filename(base, ext, part_idx):
305305
idx = deconstructed_base.index(mod)
306306
modality = deconstructed_base.pop(idx)
307307
base = '_'.join(deconstructed_base)
308-
use_fname = '%s_part-%02d_%s%s' % (base, part_idx, modality, ext)
308+
use_fname = '{}_split-{:02}_{}{}'.format(base, part_idx, modality, ext)
309309

310310
return use_fname

tutorials/io/plot_20_reading_eeg_data.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
* key-value pairs marked as ``key=value``
3636
3737
A documentation for core BrainVision file format is provided by Brain Products.
38-
You can view the specification
39-
`here <https://docs.google.com/viewer?url=https://raw.githubusercontent.com/sappelhoff/brainvision-validator/master/doc/BrainVisionCoreFileFormat.pdf>`_
38+
You can view the specification hosted on the
39+
`Brain Products website <https://www.brainproducts.com/productdetails.php?id=21&tab=5>`_
4040
4141
BrainVision EEG files can be read in using :func:`mne.io.read_raw_brainvision`
4242
with the .vhdr header file as an input.

0 commit comments

Comments
 (0)