Skip to content
Snippets Groups Projects
Verified Commit 7bc5fb6d authored by Michiel Cottaar's avatar Michiel Cottaar
Browse files

Only constraint amplitude/lobe_duration if they are not already numbers

parent abfa227e
No related branches found
No related tags found
No related merge requests found
......@@ -49,8 +49,12 @@ function SincPulse(;
[get_free_variable(value) for value in (amplitude, phase, frequency, lobe_duration)]...,
group
)
@constraint global_model() res.amplitude >= 0
@constraint global_model() res.lobe_duration >= 0
if !(res.amplitude isa Number)
@constraint global_model() res.amplitude >= 0
end
if !(res.lobe_duration isa Number)
@constraint global_model() res.lobe_duration >= 0
end
set_simple_constraints!(res, kwargs)
return res
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment