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
2295feac
Verified
Commit
2295feac
authored
1 year ago
by
Michiel Cottaar
Browse files
Options
Downloads
Patches
Plain Diff
Do not print _scaling field
parent
4db94c0a
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
src/gradients/pulsed_gradients.jl
+3
-3
3 additions, 3 deletions
src/gradients/pulsed_gradients.jl
with
3 additions
and
3 deletions
src/gradients/pulsed_gradients.jl
+
3
−
3
View file @
2295feac
...
...
@@ -43,7 +43,7 @@ mutable struct PulsedGradient <: ContainerBlock
flat
::
ConstantGradientBlock
fall
::
ChangingGradientBlock
slew_rate_vec
::
SVector
{
3
,
VariableType
}
scaling
::
Union
{
Nothing
,
VariableType
}
_
scaling
::
Union
{
Nothing
,
VariableType
}
end
@global_model_constructor
PulsedGradient
...
...
@@ -99,9 +99,9 @@ end
rise_time
(
pg
::
PulsedGradient
)
=
duration
(
pg
.
rise
)
flat_time
(
pg
::
PulsedGradient
)
=
duration
(
pg
.
flat
)
gradient_strength_vec
(
g
::
PulsedGradient
)
=
rise_time
(
g
)
*
slew_rate_vec
(
g
)
gradient_strength
(
g
::
PulsedGradient
)
=
isnothing
(
g
.
scaling
)
?
maximum
(
gradient_strength_vec
(
g
))
:
(
res
.
scaling
*
rise_time
(
g
))
gradient_strength
(
g
::
PulsedGradient
)
=
isnothing
(
g
.
_
scaling
)
?
maximum
(
gradient_strength_vec
(
g
))
:
(
res
.
_
scaling
*
rise_time
(
g
))
slew_rate_vec
(
g
::
PulsedGradient
)
=
g
.
slew_rate_vec
slew_rate
(
g
::
PulsedGradient
)
=
isnothing
(
g
.
scaling
)
?
maximum
(
abs
.
(
slew_rate_vec
(
g
)))
:
res
.
scaling
slew_rate
(
g
::
PulsedGradient
)
=
isnothing
(
g
.
_
scaling
)
?
maximum
(
abs
.
(
slew_rate_vec
(
g
)))
:
res
.
_
scaling
δ
(
g
::
PulsedGradient
)
=
rise_time
(
g
)
+
flat_time
(
g
)
duration
(
g
::
PulsedGradient
)
=
2
*
rise_time
(
g
)
+
flat_time
(
g
)
qvec
(
g
::
PulsedGradient
)
=
δ
(
g
)
.*
gradient_strength_vec
(
g
)
...
...
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