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
e87316bc
Unverified
Commit
e87316bc
authored
9 months ago
by
Michiel Cottaar
Browse files
Options
Downloads
Patches
Plain Diff
Allow very slight extrapolation of gradient strength
parent
f9b58937
No related branches found
No related tags found
1 merge request
!3
Add InstantPulse and InstantGradient pulseq extension support
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sequence_io/pulseq.jl
+6
-0
6 additions, 0 deletions
src/sequence_io/pulseq.jl
with
6 additions
and
0 deletions
src/sequence_io/pulseq.jl
+
6
−
0
View file @
e87316bc
...
@@ -74,6 +74,7 @@ function BuildingBlock(pulseq::PulseqBlock; version, BlockDurationRaster, Radiof
...
@@ -74,6 +74,7 @@ function BuildingBlock(pulseq::PulseqBlock; version, BlockDurationRaster, Radiof
push!
(
times
,
0.
)
push!
(
times
,
0.
)
end
end
waveform
=
[(
t
,
_get_amplitude
.
(
grads
,
t
,
GradientRasterTime
))
for
t
in
times
]
waveform
=
[(
t
,
_get_amplitude
.
(
grads
,
t
,
GradientRasterTime
))
for
t
in
times
]
@show
waveform
return
BuildingBlock
(
waveform
,
events
)
return
BuildingBlock
(
waveform
,
events
)
end
end
...
@@ -106,6 +107,11 @@ end
...
@@ -106,6 +107,11 @@ end
function
_get_amplitude
(
grad
::
PulseqGradient
,
time
::
Number
,
raster
::
Number
)
function
_get_amplitude
(
grad
::
PulseqGradient
,
time
::
Number
,
raster
::
Number
)
amp
=
grad
.
amplitude
*
1e-3
amp
=
grad
.
amplitude
*
1e-3
edges
=
_control_times
(
grad
,
raster
)
edges
=
_control_times
(
grad
,
raster
)
if
time
≈
edges
[
1
]
return
grad
.
shape
.
samples
[
1
]
elseif
time
≈
edges
[
end
]
return
grad
.
shape
.
samples
[
end
]
end
return
amp
*
linear_interpolation
(
edges
,
grad
.
shape
.
samples
,
extrapolation_bc
=
0.
)(
time
)
return
amp
*
linear_interpolation
(
edges
,
grad
.
shape
.
samples
,
extrapolation_bc
=
0.
)(
time
)
end
end
...
...
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