This python ZOS-API interactive extension creates a ray file based on batch ray tracing in a sequential system. This allows import of image-space ray data from a sequential model into NS mode and/or Speos, including black-boxed lens systems.
For a user selected field coordinate, rays are randomly selected in the pupil and traced to the image plane. The image space ray data (intercept at a specified dummy surface) are saved as a ray file in both Zemax and Speos formats into the ...\Zemax\Objects\Sources\Source Files\ directory.
Note that is merely intended as an example. The implementation this tool should be adapted and validated based on individual cases.