Skip to content

Commit

Permalink
[patch] #8 DTI will have default motadality as 'dwi' on BIDS helper s…
Browse files Browse the repository at this point in the history
…heet.

Correct bvec to have 3 rows instead of 3 columns
  • Loading branch information
dvm-shlee committed Jun 4, 2020
1 parent 996168c commit 1d756a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion brkraw/lib/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ def _get_temp_info(self, visu_pars):
@staticmethod
def _get_bdata(method):
bval = get_value(method, 'PVM_DwEffBval')
bvec = get_value(method, 'PVM_DwGradVec')
bvec = get_value(method, 'PVM_DwGradVec').T # to have three rows instead of three columns
bmat = get_value(method, 'PVM_DwBMat')
return bval, bvec, bmat

Expand Down
2 changes: 2 additions & 0 deletions brkraw/scripts/brkraw.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ def main():
item['Start'] = s
item['End'] = e
df = df.append(item, ignore_index=True)
elif datatype == 'dwi':
item['modality'] = 'dwi'
else:
df = df.append(item, ignore_index=True)
df.to_excel(output, index=None)
Expand Down

3 comments on commit 1d756a7

@eugenegkim
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dvm-shlee you forgot to add df = df.append(item, ignore_index=True) after line 308 in the elif statement

@dvm-shlee
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eugenegkim Oh thank you for pointing out! I will fix it soon!

@dvm-shlee
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eugenegkim It is updated on my last commit, please update using the nightly build version via Github.

Please sign in to comment.