Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fdt
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
Container Registry
Model registry
Operate
Environments
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
fdt
Commits
20165ae8
Commit
20165ae8
authored
15 years ago
by
Saad Jbabdi
Browse files
Options
Downloads
Patches
Plain Diff
back to copying input. this time it's called bvecs_unrotated
parent
30584c97
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
rotate_bvecs
+13
-13
13 additions, 13 deletions
rotate_bvecs
with
13 additions
and
13 deletions
rotate_bvecs
+
13
−
13
View file @
20165ae8
...
@@ -3,8 +3,7 @@
...
@@ -3,8 +3,7 @@
if
[
"
$2
"
==
""
]
;
then
if
[
"
$2
"
==
""
]
;
then
echo
""
echo
""
echo
"Usage: rotate_bvecs <ecclogfile> <bvecs>"
echo
"Usage: rotate_bvecs <ecclogfile> <bvecs>"
echo
"used to update bvecs based on eddy correction"
echo
"will save bvecs file into <bvecs>_unrotated and create new bvecs file called <bvecs>"
echo
"will create a new bvecs file called <bvecs>_rot"
echo
""
echo
""
exit
1
exit
1
fi
fi
...
@@ -12,21 +11,22 @@ fi
...
@@ -12,21 +11,22 @@ fi
ecclog
=
$1
ecclog
=
$1
bvecs
=
$2
bvecs
=
$2
if
[
-f
${
bvecs
}
_rot
]
;
then
if
[
-f
${
bvecs
}
_
un
rot
ated
]
;
then
echo
""
echo
""
echo
"Error: Found that
${
bvecs
}
_rot already exists"
echo
"Error: Found that
${
bvecs
}
_
un
rot
ated
already exists"
echo
"This probably means that you have run this script before."
echo
"This probably means that you have run this script before.
Be aware that this also means
${
bvecs
}
have already been rotated!
"
echo
"
To get
this program to run, please remove the file
${
bvecs
}
_rot"
echo
"
If you want to force
this program to run, please remove the file
${
bvecs
}
_
un
rot
ated
"
echo
""
echo
""
exit
1
exit
1
fi
fi
/bin/cp
${
bvecs
}
${
bvecs
}
_unrotated
#/bin/rm -f ${bvecs}
# this only works if the bvecs are in lines...
# this only works if the bvecs are in lines...
Xs
=
$(
cat
${
bvecs
}
|
head
-1
|
tail
-1
)
Xs
=
$(
cat
${
bvecs
}
_unrotated
|
head
-1
|
tail
-1
)
Ys
=
$(
cat
${
bvecs
}
|
head
-2
|
tail
-1
)
Ys
=
$(
cat
${
bvecs
}
_unrotated
|
head
-2
|
tail
-1
)
Zs
=
$(
cat
${
bvecs
}
|
head
-3
|
tail
-1
)
Zs
=
$(
cat
${
bvecs
}
_unrotated
|
head
-3
|
tail
-1
)
rnd
=
${
$}
rnd
=
${
$}
cat
${
ecclog
}
| while read line; do
cat
${
ecclog
}
| while read line; do
...
@@ -96,7 +96,7 @@ for matfile in /tmp/grot${rnd}_*.mat;do
...
@@ -96,7 +96,7 @@ for matfile in /tmp/grot${rnd}_*.mat;do
i=
$(
echo
"
$i
+ 1"
| bc
)
;
i=
$(
echo
"
$i
+ 1"
| bc
)
;
done
done
echo
"
$rXs
"
>
${
bvecs
}
_rot
;
echo
"
$rXs
"
>
${
bvecs
}
;
echo
"
$rYs
"
>>
${
bvecs
}
_rot
;
echo
"
$rYs
"
>>
${
bvecs
}
;
echo
"
$rZs
"
>>
${
bvecs
}
_rot
;
echo
"
$rZs
"
>>
${
bvecs
}
;
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