Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelzwiers committed Jul 6, 2023
1 parent e00fd27 commit c73539b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion bidscoin/bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,9 @@ def load_bidsmap(yamlfile: Path, folder: Path=Path(), plugins:Union[tuple,list]=
run['datasource'] = DataSource(run['provenance'], bidsmap['Options']['plugins'], dataformat, datatype, subprefix, sesprefix)

# Add missing bids entities
suffix = run['datasource'].dynamicvalue(run['bids'].get('suffix'), True, True)
suffix = run['bids'].get('suffix')
if run['datasource'].is_datasource():
suffix = run['datasource'].dynamicvalue(suffix, True, True)
for typegroup in datatyperules.get(datatype, {}): # E.g. typegroup = 'nonparametric'
if suffix in datatyperules[datatype][typegroup]['suffixes']: # run_found = True
for entity in datatyperules[datatype][typegroup]['entities']:
Expand Down
5 changes: 2 additions & 3 deletions bidscoin/plugins/pet2bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ def is_sourcefile(file: Path) -> str:
# if len(intersection) > 3:
# return 'PETXLS'

if bids.is_dicomfile(file):
if 'pt' == bids.get_dicomfield('Modality', file).lower():
return 'DICOM'
if bids.is_dicomfile(file) and bids.get_dicomfield('Modality', file) == 'PT':
return 'DICOM'

return ''

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ all = ['bidscoin[spec2nii2bids, deface, pet2bids]'] # + phys

[project.urls]
documentation = 'https://bidscoin.readthedocs.io'
homepage = 'https://github.com/Donders-Institute/bidscoin'
repository = 'https://github.com/Donders-Institute/bidscoin'

[project.scripts]
Expand Down

0 comments on commit c73539b

Please sign in to comment.