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
2e33c5c7
Unverified
Commit
2e33c5c7
authored
10 months ago
by
Michiel Cottaar
Browse files
Options
Downloads
Patches
Plain Diff
Import get_* functions
parent
6562f92c
No related branches found
No related tags found
1 merge request
!2
Define variables through new @defvar macro
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/parts/trapezoids.jl
+5
-4
5 additions, 4 deletions
src/parts/trapezoids.jl
with
5 additions
and
4 deletions
src/parts/trapezoids.jl
+
5
−
4
View file @
2e33c5c7
...
...
@@ -6,7 +6,7 @@ module Trapezoids
import
JuMP
:
@constraint
import
StaticArrays
:
SVector
import
LinearAlgebra
:
norm
import
...
Variables
:
variables
,
@defvar
,
scanner_constraints!
,
get_free_variable
,
set_simple_constraints!
,
gradient_orientation
,
VariableType
import
...
Variables
:
variables
,
@defvar
,
scanner_constraints!
,
get_free_variable
,
set_simple_constraints!
,
gradient_orientation
,
VariableType
,
get_gradient
,
get_pulse
,
get_readout
import
...
BuildSequences
:
global_model
import
...
Components
:
ChangingGradient
,
ConstantGradient
,
RFPulseComponent
,
ADC
import
...
Containers
:
BaseBuildingBlock
...
...
@@ -106,18 +106,19 @@ gradient_orientation(pg::Trapezoid{1}) = pg.orientation
get_group
(
pg
::
Trapezoid
)
=
pg
.
group
get_group
(
pg
::
BaseTrapezoid
)
=
get_group
(
get_gradient
(
pg
))
@defvar
begin
@defvar
gradient
begin
rise_time
(
pg
::
Trapezoid
)
=
pg
.
rise_time
flat_time
(
pg
::
Trapezoid
)
=
pg
.
flat_time
slew_rate
(
g
::
Trapezoid
)
=
g
.
slew_rate
end
@defvar
begin
@defvar
gradient
begin
gradient_strength
(
g
::
Trapezoid
)
=
slew_rate
(
g
)
.*
rise_time
(
g
)
δ
(
g
::
Trapezoid
)
=
rise_time
(
g
)
+
flat_time
(
g
)
duration
(
g
::
BaseTrapezoid
)
=
2
*
rise_time
(
g
)
+
flat_time
(
g
)
end
@defvar
duration
(
g
::
BaseTrapezoid
)
=
2
*
rise_time
(
g
)
+
flat_time
(
g
)
@defvar
qval
(
g
::
BaseTrapezoid
,
::
Nothing
,
::
Nothing
)
=
variables
.
δ
(
g
)
.*
gradient_strength
(
g
)
.*
2
π
adjustable
(
::
BaseTrapezoid
)
=
:
gradient
...
...
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