Skip to content

Commit 357f003

Browse files
committed
v2023.1.12 add support for Flywheel DICOM download tarballs in top-level BIDS directory. Rename README.md to README for validation. Add tarballs to bidsignore
1 parent 7a98cb2 commit 357f003

File tree

7 files changed

+9
-8
lines changed

7 files changed

+9
-8
lines changed

bidskit/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def main():
117117
'Recon': args.recon
118118
}
119119

120-
# Read version from setup.py
120+
# Read installed version number
121121
ver = pkg_resources.get_distribution('bidskit').version
122122

123123
if args.version:

bidskit/bidstree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def __init__(self, dataset_dir, overwrite=False):
6161
print('Creating file templates required for BIDS compliance')
6262

6363
# Copy BIDS-compliant JSON templates to BIDS directory root
64-
self.copy_template('README.md', 'README.md')
64+
self.copy_template('README', 'README')
6565
self.copy_template('CHANGES', 'CHANGES')
6666
self.copy_template('dataset_description.json', 'dataset_description.json')
6767
self.copy_template('participants.json', 'participants.json')

bidskit/io.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,11 @@ def parse_dcm2niix_fname(fname):
175175
# Filename format: <PatientName>--<SeriesDescription>--s<SeriesNo>--e<EchoNo>[_ph].<ext>
176176
info['SubjName'] = vals[0]
177177
info['SerDesc'] = vals[1]
178-
info['SerNo'] = np.int(vals[2].replace('s', ''))
178+
info['SerNo'] = int(vals[2].replace('s', ''))
179179

180180
# Check for phase image suffix after echo number (eg "e2_ph")
181181
bits = vals[3].split('_', 1)
182-
info['EchoNo'] = np.int(bits[0].replace('e', ''))
182+
info['EchoNo'] = int(bits[0].replace('e', ''))
183183

184184
# Record any suffix after the echo number key (typically "ph" if anything)
185185
if len(bits) > 1:

bidskit/json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def acqtime_mins(json_file):
4242
if 'AcquisitionTime' in info:
4343
t1 = dt.datetime.strptime(info['AcquisitionTime'], '%H:%M:%S.%f0')
4444
t0 = dt.datetime(1900, 1, 1)
45-
t_mins = np.float((t1 - t0).total_seconds() / 60.0)
45+
t_mins = float((t1 - t0).total_seconds() / 60.0)
4646
else:
4747
print(f'* WARNING: AcquisitionTime not found in {json_file} (deidentified?)')
4848
print(f'* WARNING: Automatic fieldmap binding will not work correctly')

bidskit/templates/bidsignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
exclude/
22
derivatives/
33
work/
4-
incoming/
4+
incoming/
5+
*.tar

docs/Flywheel.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ folder and build the template BIDS files and folders (Phase 1)
4242
$ bidskit --flywheel <other command line arguments>
4343
```
4444
3. Edit `code/Protocol_Translator.json` manually or use the `--auto` option to autofill the translator file
45-
4. Run bidskit again (Phase 2) to complete the curation
45+
4. Run bidskit again (Phase 2) without the `--flywheel` option to complete the curation
4646
```
47-
$ bidskit --flywheel <other command line arguments>
47+
$ bidskit <other command line arguments>
4848
```
4949
5. Delete the original Flywheel tarball

0 commit comments

Comments
 (0)