Allow units of parameters to reference the unit of the main value
via using '$' as special char. Change-Id: Idfbad84b76d2f5161cb6ecc21d63349f23cd47fa Reviewed-on: https://forge.frm2.tum.de/review/18188 Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de> Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
This commit is contained in:
parent
574a66c65b
commit
154a735908
@ -367,7 +367,10 @@ class Module(object):
|
||||
# to cache the current value + qualifiers...
|
||||
params = {}
|
||||
for k, v in list(self.parameters.items()):
|
||||
params[k] = v.copy()
|
||||
entry = v.copy()
|
||||
if '$' in entry.unit:
|
||||
entry.unit = entry.unit.replace('$', self.parameters['value'].unit)
|
||||
params[k] = entry
|
||||
# do not re-use self.parameters as this is the same for all instances
|
||||
self.parameters = params
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user