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
84500286
Verified
Commit
84500286
authored
1 year ago
by
Michiel Cottaar
Browse files
Options
Downloads
Patches
Plain Diff
Fix calling of variable on encapsulated pulse/readout
parent
46c18e60
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/variables.jl
+4
-2
4 additions, 2 deletions
src/variables.jl
with
4 additions
and
2 deletions
src/variables.jl
+
4
−
2
View file @
84500286
...
...
@@ -216,6 +216,8 @@ for (target_name, all_vars) in all_variables_symbols
if
variable_func
in
[
:
qval_square
,
:
qval
]
continue
end
get_func
=
Symbol
(
"get_"
*
string
(
target_name
))
use_get_func
=
target_name
in
(
:
pulse
,
:
readout
,
:
gradient
)
@eval
function
Variables.$variable_func
(
bb
::
AbstractBlock
)
try
if
Variables
.$
variable_func
in
keys
(
alternative_variables
)
...
...
@@ -237,8 +239,8 @@ for (target_name, all_vars) in all_variables_symbols
end
throw
(
VariableNotAvailable
(
typeof
(
bb
),
Variables
.$
variable_func
))
catch
e
if
e
isa
VariableNotAvailable
&&
hasmethod
(
get_
$
(
target_name
)
,
Tuple
(
typeof
(
bb
)))
&&
$
(
target_name
)
in
(
:
pulse
,
:
readout
)
return
Variables
.$
variable_func
(
get_
$
(
target_name
)
(
bb
))
if
$
use_get_func
&&
e
isa
VariableNotAvailable
&&
hasmethod
(
$
get_func
,
Tuple
(
typeof
(
bb
)))
return
Variables
.$
variable_func
(
$
get_func
(
bb
))
end
rethrow
()
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