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
2e7fd09d
Verified
Commit
2e7fd09d
authored
11 months ago
by
Michiel Cottaar
Browse files
Options
Downloads
Patches
Plain Diff
Normalise continuous and instantaneous components independently
parent
47cb1bfd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plot.jl
+31
-11
31 additions, 11 deletions
src/plot.jl
with
31 additions
and
11 deletions
src/plot.jl
+
31
−
11
View file @
2e7fd09d
...
...
@@ -56,11 +56,24 @@ end
Returns the minimum and maximum amplitude for a [`SinglePlotLine`](@ref)
"""
range_line
(
spl
::
SinglePlotLine
)
=
(
min
(
minimum
(
spl
.
amplitudes
;
init
=
0.
),
minimum
(
spl
.
event_amplitudes
;
init
=
0.
)),
max
(
maximum
(
spl
.
amplitudes
;
init
=
0.
),
maximum
(
spl
.
event_amplitudes
;
init
=
0.
)),
minimum
(
spl
.
amplitudes
;
init
=
0.
),
maximum
(
spl
.
amplitudes
;
init
=
0.
),
)
normalise
(
spl
::
SinglePlotLine
,
value
)
=
iszero
(
value
)
?
spl
:
SinglePlotLine
(
spl
.
times
,
spl
.
amplitudes
./
value
,
spl
.
event_times
,
spl
.
event_amplitudes
./
value
)
"""
range_event(single_plot_line)
Returns the minimum and maximum amplitude for the events in [`SinglePlotLine`](@ref)
"""
range_event
(
spl
::
SinglePlotLine
)
=
(
minimum
(
spl
.
event_amplitudes
;
init
=
0.
),
maximum
(
spl
.
event_amplitudes
;
init
=
0.
),
)
normalise
(
spl
::
SinglePlotLine
,
line_value
,
event_value
)
=
SinglePlotLine
(
spl
.
times
,
iszero
(
line_value
)
?
spl
.
amplitudes
:
(
spl
.
amplitudes
./
line_value
),
spl
.
event_times
,
iszero
(
event_value
)
?
spl
.
event_amplitudes
:
(
spl
.
event_amplitudes
./
event_value
)
)
"""
SequenceDiagram(; RFx, RFy, Gx, Gy, Gz, ADC)
...
...
@@ -170,20 +183,27 @@ function SequenceDiagram(seq::BaseSequence)
end
function
normalise
(
sd
::
SequenceDiagram
)
rf_norm
=
max
(
abs
.
(
range_line
(
sd
.
RFx
))
...
,
abs
.
(
range_line
(
sd
.
RFy
))
...
)
grad_norm
=
max
(
rf_line_norm
=
max
(
abs
.
(
range_line
(
sd
.
RFx
))
...
,
abs
.
(
range_line
(
sd
.
RFy
))
...
)
rf_event_norm
=
max
(
abs
.
(
range_event
(
sd
.
RFx
))
...
,
abs
.
(
range_event
(
sd
.
RFy
))
...
)
grad_line_norm
=
max
(
abs
.
(
range_line
(
sd
.
G
))
...
,
abs
.
(
range_line
(
sd
.
Gx
))
...
,
abs
.
(
range_line
(
sd
.
Gy
))
...
,
abs
.
(
range_line
(
sd
.
Gz
))
...
,
)
grad_event_norm
=
max
(
abs
.
(
range_event
(
sd
.
G
))
...
,
abs
.
(
range_event
(
sd
.
Gx
))
...
,
abs
.
(
range_event
(
sd
.
Gy
))
...
,
abs
.
(
range_event
(
sd
.
Gz
))
...
,
)
SequenceDiagram
(
normalise
(
sd
.
RFx
,
rf_norm
),
normalise
(
sd
.
RFy
,
rf_norm
),
normalise
(
sd
.
G
,
grad_norm
),
normalise
(
sd
.
Gx
,
grad_norm
),
normalise
(
sd
.
Gy
,
grad_norm
),
normalise
(
sd
.
Gz
,
grad_norm
),
normalise
(
sd
.
RFx
,
rf_
line_norm
,
rf_event_
norm
),
normalise
(
sd
.
RFy
,
rf_
line_norm
,
rf_event_
norm
),
normalise
(
sd
.
G
,
grad_
line_norm
,
grad_event_
norm
),
normalise
(
sd
.
Gx
,
grad_
line_norm
,
grad_event_
norm
),
normalise
(
sd
.
Gy
,
grad_
line_norm
,
grad_event_
norm
),
normalise
(
sd
.
Gz
,
grad_
line_norm
,
grad_event_
norm
),
sd
.
ADC
)
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