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
99ee9e21
Verified
Commit
99ee9e21
authored
1 year ago
by
Michiel Cottaar
Browse files
Options
Downloads
Patches
Plain Diff
Add scale to RF pulses
parent
35ea7df3
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/pulses/constant_pulses.jl
+5
-2
5 additions, 2 deletions
src/pulses/constant_pulses.jl
src/pulses/instant_pulses.jl
+4
-2
4 additions, 2 deletions
src/pulses/instant_pulses.jl
src/pulses/sinc_pulses.jl
+4
-2
4 additions, 2 deletions
src/pulses/sinc_pulses.jl
with
13 additions
and
6 deletions
src/pulses/constant_pulses.jl
+
5
−
2
View file @
99ee9e21
...
@@ -23,14 +23,17 @@ struct ConstantPulse <: RFPulseBlock
...
@@ -23,14 +23,17 @@ struct ConstantPulse <: RFPulseBlock
duration
::
VariableType
duration
::
VariableType
phase
::
VariableType
phase
::
VariableType
frequency
::
VariableType
frequency
::
VariableType
scale
::
Union
{
Nothing
,
Symbol
}
end
end
@global_model_constructor
ConstantPulse
@global_model_constructor
ConstantPulse
function
ConstantPulse
(
model
::
Model
;
amplitude
=
nothing
,
duration
=
nothing
,
phase
=
nothing
,
frequency
=
nothing
,
kwargs
...
)
function
ConstantPulse
(
model
::
Model
;
amplitude
=
nothing
,
duration
=
nothing
,
phase
=
nothing
,
frequency
=
nothing
,
scale
=
nothing
,
kwargs
...
)
res
=
ConstantPulse
(
res
=
ConstantPulse
(
model
,
model
,
[
get_free_variable
(
model
,
value
)
for
value
in
(
amplitude
,
duration
,
phase
,
frequency
)]
...
[
get_free_variable
(
model
,
value
)
for
value
in
(
amplitude
,
duration
,
phase
,
frequency
)]
...
,
scale
)
)
@constraint
model
res
.
amplitude
>=
0
@constraint
model
res
.
amplitude
>=
0
set_simple_constraints!
(
model
,
res
,
kwargs
)
set_simple_constraints!
(
model
,
res
,
kwargs
)
...
...
This diff is collapsed.
Click to expand it.
src/pulses/instant_pulses.jl
+
4
−
2
View file @
99ee9e21
...
@@ -9,15 +9,17 @@ struct InstantRFPulseBlock <: RFPulseBlock
...
@@ -9,15 +9,17 @@ struct InstantRFPulseBlock <: RFPulseBlock
model
::
Model
model
::
Model
flip_angle
::
VariableType
flip_angle
::
VariableType
phase
::
VariableType
phase
::
VariableType
scale
::
Union
{
Nothing
,
Symbol
}
end
end
@global_model_constructor
InstantRFPulseBlock
@global_model_constructor
InstantRFPulseBlock
function
InstantRFPulseBlock
(
model
::
Model
;
flip_angle
=
nothing
,
phase
=
nothing
)
function
InstantRFPulseBlock
(
model
::
Model
;
flip_angle
=
nothing
,
phase
=
nothing
,
scale
=
nothing
)
res
=
InstantRFPulseBlock
(
res
=
InstantRFPulseBlock
(
model
,
model
,
get_free_variable
(
model
,
flip_angle
),
get_free_variable
(
model
,
flip_angle
),
get_free_variable
(
model
,
phase
)
get_free_variable
(
model
,
phase
),
scale
)
)
@constraint
model
res
.
flip_angle
>=
0
@constraint
model
res
.
flip_angle
>=
0
return
res
return
res
...
...
This diff is collapsed.
Click to expand it.
src/pulses/sinc_pulses.jl
+
4
−
2
View file @
99ee9e21
...
@@ -39,13 +39,14 @@ struct SincPulse <: RFPulseBlock
...
@@ -39,13 +39,14 @@ struct SincPulse <: RFPulseBlock
phase
::
VariableType
phase
::
VariableType
frequency
::
VariableType
frequency
::
VariableType
lobe_duration
::
VariableType
lobe_duration
::
VariableType
scale
::
Union
{
Nothing
,
Symbol
}
end
end
@global_model_constructor
SincPulse
@global_model_constructor
SincPulse
function
SincPulse
(
model
::
Model
;
function
SincPulse
(
model
::
Model
;
symmetric
=
true
,
max_Nlobes
=
nothing
,
apodise
=
true
,
N_lobes
=
nothing
,
N_left
=
nothing
,
N_right
=
nothing
,
symmetric
=
true
,
max_Nlobes
=
nothing
,
apodise
=
true
,
N_lobes
=
nothing
,
N_left
=
nothing
,
N_right
=
nothing
,
amplitude
=
nothing
,
phase
=
nothing
,
frequency
=
nothing
,
lobe_duration
=
nothing
,
kwargs
...
amplitude
=
nothing
,
phase
=
nothing
,
frequency
=
nothing
,
lobe_duration
=
nothing
,
scale
=
nothing
,
kwargs
...
)
)
if
symmetric
if
symmetric
N_lobes
=
get_free_variable
(
model
,
N_lobes
)
N_lobes
=
get_free_variable
(
model
,
N_lobes
)
...
@@ -63,7 +64,8 @@ function SincPulse(model::Model;
...
@@ -63,7 +64,8 @@ function SincPulse(model::Model;
nlobe_integral_params
(
max_Nlobes
,
apodise
),
nlobe_integral_params
(
max_Nlobes
,
apodise
),
N_left_var
,
N_left_var
,
N_right_var
,
N_right_var
,
[
get_free_variable
(
model
,
value
)
for
value
in
(
amplitude
,
phase
,
frequency
,
lobe_duration
)]
...
[
get_free_variable
(
model
,
value
)
for
value
in
(
amplitude
,
phase
,
frequency
,
lobe_duration
)]
...
,
scale
)
)
@constraint
model
res
.
amplitude
>=
0
@constraint
model
res
.
amplitude
>=
0
@constraint
model
res
.
N_left
>=
1
@constraint
model
res
.
N_left
>=
1
...
...
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