GithubHelp home page GithubHelp logo

ansys / optical-automation Goto Github PK

View Code? Open in Web Editor NEW
28.0 10.0 10.0 80.91 MB

Optical Automation Framework

Home Page: https://ansys-internal.github.io/optical-automation/

License: MIT License

Python 100.00%
lumerical zemax speos

optical-automation's Introduction

Optical Automation Library

Overview

The Optical Automation library gathers functionalities and tools for Ansys Speos, Zemax, and Lumerical automations and interoperations.

For Speos, this library allows you to create workflows combining different preprocessing and postprocessing modules.

Installation

To install the Optical Automation library, run this code in the Windows command prompt:

curl https://github.com/ansys/optical-automation/archive/refs/heads/main.zip -LJ  --output main.zip
tar -xf main.zip
move optical-automation-main\ansys_optical_automation "%AppData%\SpaceClaim\Published Scripts"

Documentation

You can read API documentation here: Ansys Optical Automation.

Examples

Examples on how to use the created modules you can find under application

Contribution

Contributions to this library are welcome. To learn how to contribute, see the Contribute document.

License

The Optical Automation library is licensed under the MIT license.

The full license can be found in the root directory of the optical-automation repository.

optical-automation's People

Contributors

akaszynski avatar beliaev-maksim avatar dependabot[bot] avatar emmanueltramoy avatar gmoysan avatar maxjprey avatar mcheng2022 avatar pfominftw avatar pipkat avatar pluatansys avatar sandauriol avatar ssklaven avatar stefanthoene avatar tlr89 avatar yuanfirstborn avatar zachderocher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

optical-automation's Issues

Pre or Post-Release Clean-up

Good work! I appreciate that you've added unit tests on a dedicated VM. CI/CD workflow looks solid.

I'd like to see the following implemented either before or after release:

  • #40
  • #39
  • @PipKat, could you please review this?
  • Consider using the ansys.automation.optical package namespace. IronPython (I'm assuming you're using the Ansys 2.7) does not support namespace packages
  • Consider deploying to pypi. This will make installation much easier to install with pip. IronPython only package
  • Consider codecov

COMError when trying to export a template

Hi, this is my first attempt at using your API to automate some analysis of SPEOS results.

I used your template code at: https://github.com/ansys/optical-automation/blob/main/ansys_optical_automation/application/export_measures.py

Upon selecting the location of the xmp file I want to work with, the script fails (line 34).

Please help me understand what I'm doing incorrectly to help me get started with what looks like a very useful API!

Thank you in advance!

Below is the error traceback:

In [9]: %run template.py
---------------------------------------------------------------------------
COMError                                  Traceback (most recent call last)
File ~\Documents\CREO_work\scripts\automation\template.py:40
     36     path_export = getfilename("*.txt", True)
     37     xmp.export_template_measures(path_xml, path_export)
---> 40 main()

File ~\Documents\CREO_work\scripts\automation\template.py:34, in main()
     32 xmp = DpfXmpViewer()
     33 path_xmp = getfilename("*.xmp")
---> 34 xmp.open_file(path_xmp)
     35 path_xml = getfilename("*.xml")
     36 path_export = getfilename("*.txt", True)

File ~\AppData\Roaming\SpaceClaim\Published Scripts\ansys_optical_automation\post_process\dpf_xmp_viewer.py:361, in DpfXmpViewer.open_file(self, str_path)
    359     self.source_list = []
    360     if self.dpf_instance.MapType == 2 or self.dpf_instance.MapType == 3:
--> 361         self.__get_source_list()
    362 else:
    363     raise ImportError("Opening the file failed.")

File ~\AppData\Roaming\SpaceClaim\Published Scripts\ansys_optical_automation\post_process\dpf_xmp_viewer.py:575, in DpfXmpViewer.__get_source_list(self)
    573 for layer in range(total_sources):
    574     name = automation.VARIANT()
--> 575     self.dpf_instance.ExtendedGetSourceName(layer, pointer(name))
    576     self.source_list.append(name.value[0])
    577 return self.source_list

File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\comtypes\client\dynamic.py:111, in _Dispatch.__getattr__(self, name)
    109 dispid = self._ids.get(name)
    110 if not dispid:
--> 111     dispid = self._comobj.GetIDsOfNames(name)[0]
    112     self._ids[name] = dispid
    114 if name in self._methods:

File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\comtypes\automation.py:725, in IDispatch.GetIDsOfNames(self, *names, **kw)
    723 arr = (c_wchar_p * len(names))(*names)
    724 ids = (DISPID * len(names))()
--> 725 self.__com_GetIDsOfNames(riid_null, arr, len(names), lcid, ids)
    726 return ids[:]

COMError: (-2147352570, 'Unknown name.', (None, None, None, 0, None))

enhance the windshield distortion workflow

๐Ÿ“ Description of the feature

simplify the workflow when creating rayfile

๐Ÿ’ก Steps for implementing the feature

No response

๐Ÿ”— Useful links and references

No response

unittest_02 error

unittest 02 produces error after adding more tests to the test_geometry_01.scdoc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.