... | ... | @@ -43,10 +43,17 @@ components = [ |
|
|
|
|
|
tiltx_s2 = s.elements["stdelem"].surfaces["s2"].rootcoordinatesystem.tiltx
|
|
|
tiltx_s3 = s.elements["stdelem"].surfaces["s3"].rootcoordinatesystem.tiltx
|
|
|
tiltx_s3.changetype("pickup", function=(lambda x: -x), args=(tiltx_s2,))
|
|
|
tiltx_s3.changetype("pickup",
|
|
|
functionobject=(
|
|
|
FunctionObject("f = function=(lambda x: -x)", ["f"]),
|
|
|
"f"),
|
|
|
args=(tiltx_s2,))
|
|
|
s.rootcoordinatesystem.update()
|
|
|
# Setting tiltx of s3 as -tiltx of s2 via pickup and update coordinate systems afterwards.
|
|
|
|
|
|
# Notice that the FunctionObject needs two arguments: the source code and the list of functions
|
|
|
# to be read from dict, while functionobject keyword needs a tuple where the FunctionObject is
|
|
|
# refered together with the function used for the pickup. There you have the opportunity to define
|
|
|
# one FunctionObject for several pickups or other things were functions are needed (i.e. GRIN media).
|
|
|
|
|
|
pyrateoptics.listOptimizableVariables(s, maxcol=30)
|
|
|
# Lists optimizable variables (the identifiers are keys to a dict which collects them all).
|
... | ... | |