Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BIP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
BIP
Commits
ec6ca756
Commit
ec6ca756
authored
1 year ago
by
Fidel Alfaro Almagro
Browse files
Options
Downloads
Patches
Plain Diff
Scmall change in the acqparam generation function
parent
3b25d24e
No related branches found
No related tags found
No related merge requests found
Pipeline
#17724
passed
1 year ago
Stage: docker
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bip/pipelines/dMRI_fieldmap/fieldmap_pre_topup_fnc.py
+7
-9
7 additions, 9 deletions
bip/pipelines/dMRI_fieldmap/fieldmap_pre_topup_fnc.py
with
7 additions
and
9 deletions
bip/pipelines/dMRI_fieldmap/fieldmap_pre_topup_fnc.py
+
7
−
9
View file @
ec6ca756
...
...
@@ -94,14 +94,11 @@ def get_acqparams_row(phase_encode, im, im_json):
"""
Creates a row for the acqparams file from topup based
>>>
get_acqparams_row
(
"
j-
"
,
0.01
)
"
0 -1 0 0.01
\n
"
>>>
get_acqparams_row
(
"
i
"
)
"
1 0 0 0.05
\n
"
Args:
phase_encode: phase encode direction (string with two elements, first one should be i, j, or k, second one should be + or -)
im: image file to get the number of lines to calculate the readout time
phase_encode: phase encode direction (string with two elements, first
one should be i, j, or k, second one should be + or -)
im: image file to get the number of lines to calculate the
readout time
im_json: json file corresponding to the previous image
"""
...
...
@@ -115,11 +112,12 @@ def get_acqparams_row(phase_encode, im, im_json):
if
sign
in
dimensions
:
orient
,
sign
=
sign
,
orient
if
orient
not
in
dimensions
or
sign
not
in
'
+-
'
:
raise
ValueError
(
f
"
Unrecognised phase encode direction
{
phase_encode
}
; should by like i- or j+
"
)
raise
ValueError
(
'
Unrecognised phase encode direction
'
+
f
'
{
phase_encode
}
; should by like i- or j+
'
)
dimension
=
dimensions
.
index
(
orient
)
elements
[
dimension
]
=
'
1
'
if
sign
==
'
+
'
else
'
-1
'
else
:
raise
ValueError
(
f
"
Unrecognised phase encode direction
{
phase_encode
}
"
)
raise
ValueError
(
f
'
Unrecognised phase encode direction
{
phase_encode
}
'
)
imAP
=
nib
.
load
(
im
)
numlines
=
imAP
.
header
[
'
dim
'
][
dimension
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment