Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MRIBuilder.jl
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
Michiel Cottaar
MRIBuilder.jl
Commits
820ff0b3
Verified
Commit
820ff0b3
authored
1 year ago
by
Michiel Cottaar
Browse files
Options
Downloads
Patches
Plain Diff
Update to_concrete_block interface
parent
eae86e55
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/gradients/pulsed_gradients.jl
+2
-2
2 additions, 2 deletions
src/gradients/pulsed_gradients.jl
src/pulses/constant_pulses.jl
+2
-2
2 additions, 2 deletions
src/pulses/constant_pulses.jl
src/pulses/sinc_pulses.jl
+2
-2
2 additions, 2 deletions
src/pulses/sinc_pulses.jl
with
6 additions
and
6 deletions
src/gradients/pulsed_gradients.jl
+
2
−
2
View file @
820ff0b3
...
@@ -116,7 +116,7 @@ end
...
@@ -116,7 +116,7 @@ end
properties
(
::
Type
{
<:
PulsedGradient
})
=
[
qval
,
δ
,
gradient_strength
,
duration
,
rise_time
,
flat_time
,
slew_rate
]
properties
(
::
Type
{
<:
PulsedGradient
})
=
[
qval
,
δ
,
gradient_strength
,
duration
,
rise_time
,
flat_time
,
slew_rate
]
function
to_concrete_block
(
builder
::
SequenceBuilder
,
block
::
PulsedGradient
)
function
to_concrete_block
(
block
::
PulsedGradient
)
if
block
.
orientation
==
:
bvec
if
block
.
orientation
==
:
bvec
rotate
=
true
rotate
=
true
qvec
=
[
value
(
qval
(
block
)),
0.
,
0.
]
qvec
=
[
value
(
qval
(
block
)),
0.
,
0.
]
...
@@ -132,7 +132,7 @@ function to_concrete_block(builder::SequenceBuilder, block::PulsedGradient)
...
@@ -132,7 +132,7 @@ function to_concrete_block(builder::SequenceBuilder, block::PulsedGradient)
t_start
=
value
(
start_time
(
block
))
t_start
=
value
(
start_time
(
block
))
t_rise
=
value
(
rise_time
(
block
))
t_rise
=
value
(
rise_time
(
block
))
t_d
=
value
(
δ
(
block
))
t_d
=
value
(
δ
(
block
))
return
ConcreteBlock
(
builder
,
t_start
+
t_d
+
t_rise
,
gradients
=
[
return
ConcreteBlock
(
t_start
+
t_d
+
t_rise
,
gradients
=
[
(
t_start
,
zeros
(
3
)),
(
t_start
,
zeros
(
3
)),
(
t_start
+
t_rise
,
qvec
),
(
t_start
+
t_rise
,
qvec
),
(
t_start
+
t_d
,
qvec
),
(
t_start
+
t_d
,
qvec
),
...
...
This diff is collapsed.
Click to expand it.
src/pulses/constant_pulses.jl
+
2
−
2
View file @
820ff0b3
...
@@ -49,10 +49,10 @@ bandwidth(pulse::ConstantPulse) = 3.79098854 / duration(pulse)
...
@@ -49,10 +49,10 @@ bandwidth(pulse::ConstantPulse) = 3.79098854 / duration(pulse)
properties
(
::
Type
{
<:
ConstantPulse
})
=
[
amplitude
,
duration
,
phase
,
frequency
,
flip_angle
,
bandwidth
]
properties
(
::
Type
{
<:
ConstantPulse
})
=
[
amplitude
,
duration
,
phase
,
frequency
,
flip_angle
,
bandwidth
]
function
to_concrete_block
(
builder
::
SequenceBuilder
,
block
::
ConstantPulse
)
function
to_concrete_block
(
block
::
ConstantPulse
)
d
=
value
(
duration
(
block
))
d
=
value
(
duration
(
block
))
final_phase
=
value
(
phase
(
block
))
+
d
*
value
(
frequency
(
block
))
*
360
final_phase
=
value
(
phase
(
block
))
+
d
*
value
(
frequency
(
block
))
*
360
return
ConcreteBlock
(
builder
,
value
(
duration
(
block
)),
pulse
=
[
return
ConcreteBlock
(
value
(
duration
(
block
)),
pulse
=
[
([
0.
,
d
]),
([
0.
,
d
]),
value
.
([
amplitude
(
block
),
amplitude
(
block
)]),
value
.
([
amplitude
(
block
),
amplitude
(
block
)]),
value
.
([
phase
(
block
),
final_phase
])
value
.
([
phase
(
block
),
final_phase
])
...
...
This diff is collapsed.
Click to expand it.
src/pulses/sinc_pulses.jl
+
2
−
2
View file @
820ff0b3
...
@@ -100,13 +100,13 @@ lobe_duration(pulse::SincPulse) = pulse.lobe_duration
...
@@ -100,13 +100,13 @@ lobe_duration(pulse::SincPulse) = pulse.lobe_duration
bandwidth
(
pulse
::
SincPulse
)
=
1
/
lobe_duration
(
pulse
)
bandwidth
(
pulse
::
SincPulse
)
=
1
/
lobe_duration
(
pulse
)
properties
(
::
Type
{
<:
SincPulse
})
=
[
amplitude
,
N_left
,
N_right
,
duration
,
phase
,
frequency
,
flip_angle
,
lobe_duration
,
bandwidth
]
properties
(
::
Type
{
<:
SincPulse
})
=
[
amplitude
,
N_left
,
N_right
,
duration
,
phase
,
frequency
,
flip_angle
,
lobe_duration
,
bandwidth
]
function
to_concrete_block
(
builder
::
SequenceBuilder
,
block
::
SincPulse
)
function
to_concrete_block
(
block
::
SincPulse
)
normed_times
=
-
value
(
N_left
(
block
))
:
0.1
:
value
(
N_right
(
block
))
+
1e-5
normed_times
=
-
value
(
N_left
(
block
))
:
0.1
:
value
(
N_right
(
block
))
+
1e-5
times
=
((
normed_times
.+
value
(
N_left
(
block
)))
.*
value
(
lobe_duration
(
block
)))
times
=
((
normed_times
.+
value
(
N_left
(
block
)))
.*
value
(
lobe_duration
(
block
)))
amplitudes
=
value
(
amplitude
(
block
))
.*
(
normalised_function
.
(
normed_times
;
apodise
=
block
.
apodise
))
amplitudes
=
value
(
amplitude
(
block
))
.*
(
normalised_function
.
(
normed_times
;
apodise
=
block
.
apodise
))
phases
=
(
value
(
frequency
(
block
))
.*
value
(
lobe_duration
(
block
)))
.*
normed_times
*
360
phases
=
(
value
(
frequency
(
block
))
.*
value
(
lobe_duration
(
block
)))
.*
normed_times
*
360
return
ConcreteBlock
(
return
ConcreteBlock
(
builder
,
value
(
duration
(
block
));
value
(
duration
(
block
));
pulse_amplitude
=
Shape
(
times
,
amplitudes
),
pulse_amplitude
=
Shape
(
times
,
amplitudes
),
pulse_phase
=
Shape
(
times
,
phases
),
pulse_phase
=
Shape
(
times
,
phases
),
)
)
...
...
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