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
Hossein Rafipoor
fsl_mrs
Commits
3912634d
Commit
3912634d
authored
Aug 13, 2020
by
William Clarke
Browse files
Update jmrui text file reading.
parent
5cf9b23b
Changes
1
Hide whitespace changes
Inline
Side-by-side
fsl_mrs/utils/mrs_io/jmrui_io.py
View file @
3912634d
...
...
@@ -44,7 +44,10 @@ def readjMRUItxt(filename,unpack_header=True):
continue
if
recordData
:
data
.
append
(
list
(
map
(
float
,
line
.
split
())))
curr_data
=
line
.
split
()
if
len
(
curr_data
)
>
2
:
curr_data
=
curr_data
[:
2
]
data
.
append
(
list
(
map
(
float
,
curr_data
)))
# Reshape data
data
=
np
.
concatenate
([
np
.
array
(
i
)
for
i
in
data
])
...
...
@@ -53,7 +56,7 @@ def readjMRUItxt(filename,unpack_header=True):
# Clean up header
header
=
translateHeader
(
header
)
return
data
,
header
return
data
,
header
# Translate jMRUI header to mandatory fields
def
translateHeader
(
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