Created
May 10, 2021 14:25
-
-
Save Omnistic/eed68902207eed664f807a266c5750a0 to your computer and use it in GitHub Desktop.
ZOS-API: Batch raytrace template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from System import Enum, Int32, Double | |
# Open the BatchRayTrace tool | |
MyBatchRT = TheSystem.Tools.OpenBatchRayTrace() | |
# Add an unpolarized-raytrace | |
ToImageSurface = 3 | |
MaxRays = 1 | |
MyUnpolRT = MyBatchRT.CreateNormUnpol(MaxRays, ZOSAPI.Tools.RayTrace.RaysType.Real, ToImageSurface) | |
WaveNumber = Int32(0) | |
Hx = Double(0) | |
Hy = Double(0) | |
Px = Double(0) | |
Py = Double(0) | |
MyUnpolRT.AddRay(WaveNumber, Hx, Hy, Px, Py, Enum.Parse(ZOSAPI.Tools.RayTrace.OPDMode, "None")) | |
# Run the raytrace | |
MyBatchRT.RunAndWaitForCompletion() | |
# Close the BatchRayTrace tool | |
MyBatchRT.Close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment