ansys_optical_automation.zemax_process package#
Submodules#
ansys_optical_automation.zemax_process.base module#
- class ansys_optical_automation.zemax_process.base.BaseZOS(path=None)[source]#
Bases:
object
Basic Class structure to start Zemax Opticstudio
Methods
close_file
(save)close open file Parameters ---------- save : bool defines if to save already open file
gets the license status type
open_file
(file_path, save_if_needed)function to open a file
reshape
(data, x, y[, transpose])Converts a System.Double[,] to a 2D list for plotting or post processing
gets the full path for the current user's samples directory by default: in the "My DocumentsZemaxSamplesfolder"
transpose
(data)Transposes a 2D list (Python3.x or greater).
ConnectionException
InitializationException
LicenseException
SystemNotPresentException
- close_file(save)[source]#
close open file Parameters ———- save : bool defines if to save already open file
- Returns
- None
- example_constants()[source]#
gets the license status type
- Returns
- the license type
- It can be premium, professional, standard or invalid.
- open_file(file_path, save_if_needed)[source]#
function to open a file
- Parameters
- file_pathstr
String to the zemax zos file
- save_if_neededboolean
distinguish if to save already opened file before open a new one
- Returns
- reshape(data, x, y, transpose=False)[source]#
Converts a System.Double[,] to a 2D list for plotting or post processing
- Parameters
- dataSystem.Double[,] data directly from ZOS-API
- xx width of new 2D list [use var.GetLength(0) for dimension]
- yy width of new 2D list [use var.GetLength(1) for dimension]
- transposetransposes data; needed for some multi-dimensional line series data
- Returns
- res2D list; can be directly used with Matplotlib or converted to
a numpy array using numpy.asarray(res)