Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michiel Cottaar
fsl_mrs
Commits
6f254386
Commit
6f254386
authored
Jun 04, 2020
by
Saad Jbabdi
Browse files
Detects echo time in FID sidecar file
parent
ec1ae277
Changes
2
Hide whitespace changes
Inline
Side-by-side
fsl_mrs/scripts/fsl_mrs
View file @
6f254386
...
...
@@ -295,6 +295,8 @@ def main():
# Echo time
if
args
.
TE
is
not
None
:
echotime
=
args
.
TE
*
1E-3
elif
'TE'
in
dataheader
:
echotime
=
dataheader
[
'TE'
]
elif
'meta'
in
basisheader
:
if
'TE'
in
basisheader
[
'meta'
]:
echotime
=
basisheader
[
'meta'
][
'TE'
]
...
...
@@ -306,6 +308,8 @@ def main():
echotime
=
None
# Internal and Water quantification if requested
if
(
mrs
.
H2O
is
None
)
or
(
echotime
is
None
):
if
echotime
is
None
:
warnings
.
warn
(
'H2O file provided but could not determine TE: no absolute quantification will be performed.'
,
UserWarning
)
res
.
calculateConcScaling
(
mrs
,
referenceMetab
=
args
.
internal_ref
)
elif
args
.
tissue_frac
is
None
:
res
.
calculateConcScaling
(
mrs
,
...
...
fsl_mrs/utils/mrs_io/fsl_io.py
View file @
6f254386
...
...
@@ -43,7 +43,9 @@ def readNIFTI(datafile,squeezeSVS=True):
'json'
:
jsonParams
,
'centralFrequency'
:
jsonParams
[
'ImagingFrequency'
],
'dwelltime'
:
jsonParams
[
'Dwelltime'
],
'bandwidth'
:
1
/
jsonParams
[
'Dwelltime'
]}
'bandwidth'
:
1
/
jsonParams
[
'Dwelltime'
]}
if
"EchoTime"
in
jsonParams
:
header
[
'TE'
]
=
jsonParams
[
'EchoTime'
]
# If there is only one FID (SVS) and squeezeSVS is true then
# remove singleton dimensions
...
...
@@ -212,4 +214,4 @@ def readAndGenFSLBasis(file,readoutShift,bandwidth,points):
'dwelltime'
:
1
/
bandwidth
,
'fwhm'
:
lw
}
return
FID
,
metabo
,
header
\ No newline at end of file
return
FID
,
metabo
,
header
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment