{"id":13736677,"url":"https://github.com/quartiq/rayopt","last_synced_at":"2025-09-14T05:32:48.613Z","repository":{"id":19861430,"uuid":"23124734","full_name":"quartiq/rayopt","owner":"quartiq","description":"Python optics and lens design, raytracing","archived":false,"fork":false,"pushed_at":"2023-08-15T20:17:45.000Z","size":3135,"stargazers_count":278,"open_issues_count":13,"forks_count":51,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-04-03T02:48:22.216Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quartiq.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2014-08-19T20:27:34.000Z","updated_at":"2025-03-31T21:04:59.000Z","dependencies_parsed_at":"2023-10-01T17:55:59.594Z","dependency_job_id":null,"html_url":"https://github.com/quartiq/rayopt","commit_stats":{"total_commits":521,"total_committers":5,"mean_commits":104.2,"dds":0.5412667946257197,"last_synced_commit":"a51f1dbd7c11bb79157e23624951c44443e02070"},"previous_names":["jordens/rayopt"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quartiq%2Frayopt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quartiq%2Frayopt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quartiq%2Frayopt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quartiq%2Frayopt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quartiq","download_url":"https://codeload.github.com/quartiq/rayopt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411224,"owners_count":20934653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T03:01:26.350Z","updated_at":"2025-04-07T11:04:54.422Z","avatar_url":"https://github.com/quartiq.png","language":"Python","funding_links":[],"categories":["simulation","Equipement and Tools"],"sub_categories":["Software for Optical Design"],"readme":"RayOpt\n========\n\n.. image:: https://travis-ci.org/quartiq/rayopt.svg\n    :target: https://travis-ci.org/quartiq/rayopt\n\n.. image:: https://ci.appveyor.com/api/projects/status/6e97f8o94v7r5bpb/branch/master?svg=true\n    :target: https://ci.appveyor.com/project/jordens/rayopt\n\n.. image:: https://codecov.io/github/jordens/rayopt/coverage.svg?branch=master\n    :target: https://codecov.io/github/jordens/rayopt?branch=master\n\n.. image:: https://anaconda.org/jordens/rayopt/badges/installer/conda.svg\n    :target: https://anaconda.org/jordens/rayopt\n\n.. image:: https://img.shields.io/pypi/l/rayopt.svg\n    :target: https://pypi.python.org/pypi/rayopt\n\n\nIntroduction\n------------\n\nOptics design (lenses, cavities, gaussian optics, lasers).\nGeometric, paraxial, and gaussian ray tracing.\n\n\nInstallation\n------------\n\nInstall like any usual Python package using `pip`, `easy_install`, or plain\n`setup.py`. Anaconda packages from three operating systems and three current\nPython versions are available through `Anaconda\n\u003chttps://anaconda.org/jordens/rayopt\u003e`_. Install with::\n\n  conda install -c https://conda.anaconda.org/jordens/channel/ci rayopt\n\nThe distribution already contains all materials from http://refractiveindex.info/.\n\nMore materials\n--------------\n\nMore materials and lenses catalogs can be obtained from the freely available\nversions of Oslo and Zemax, copied to `catalog/` and then parsed using\n`rayopt/library.py`.\n\nZemax\n.....\n\nMore materials and lenses catalogs can be obtained from the freely available\nversions of Oslo and Zemax, copied to `catalog/` and then parsed using\n`rayopt/library.py` (see there for details on where the files are expected)\n\nGet `Zemax optics studio \u003chttps://my.zemax.com/en-US/OpticStudio-downloads/\u003e`_.\nYou can either install the software or unpack it with\n`innoextract \u003chttps://constexpr.org/innoextract/\u003e`_. Depending on your chosen\nmethod the paths have to be adapted: ::\n\n    $ python -m rayopt.library \\\n    Users/$USER/My\\ Documents/Zemax/Glasscat \\\n    Users/$USER/My\\ Documents/Zemax/Stockcat\n\n\nOSLO\n.....\n\nFor OSLO, download and install OSLO.::\n\n    get and install http://www.lambdares.com/images/OSLO/OSLO662_EDU_Installer.exe\n    $ python -m rayopt.library \\\n    Users/Public/Documents/OSLO66\\ EDU/bin/lmo \\\n    Users/Public/Documents/OSLO66\\ EDU/bin/glc\n\n\nExamples\n--------\n\nUsage examples are at in their `own repository\n\u003chttps://github.com/quartiq/rayopt-notebooks\u003e`_ as `IPython\nNotebooks\n\u003chttps://nbviewer.org/github/quartiq/rayopt-notebooks/tree/master/\u003e`_,\nspecifically also the `Tutorial\n\u003chttps://nbviewer.org/github/quartiq/rayopt-notebooks/tree/master/tutorial.ipynb\u003e`_.\n\nNotes\n-----\n\nDistance\n........\n\nThe choice of prescription specification is a little different from most other\nlens design and ray tracing programs. RayOpt associates with an element\n(surface):\n\n* `distance` (or directional `offset`, measured in the global, unrotated coordinate\n  system) of the element's apex relative to the previous element's apex.\n* orientation (x-y-z Euler `angles` in the rotating frame) with respect to\n  the directional offset\n* element properties (type of element, `curvature`, aspheric and conic coefficients,\n  focal length of an ideal element)\n* optionally, the `material` after the element (behind the surface)\n\nRay data are given at (ray intercepts) or just after (direction cosines,\nparaxial slopes) the respective element unless stated otherwise (e.g. incidence\nangles).\n\nThe choice of associating the \"distance to\" and not the \"thickness after\"\nwith a surface has several advantages: shifts, offsets, tolerances can be implemented\nin a more straight forward manner, ray propagation becomes more natural and\nefficient (transfer, intercept, refraction), ray data at the surfaces' apex planes does\nnot need to be tracked. The \"thickness after\" does not have much meaning in\nray trace data as it can only be used later when tracing toward the next element and its\ndirection is typically ill defined. Compared to most other programs the\ndistance data is the thickness data shifted by one element towards the object.\n\nObject and Image\n................\n\nObject and image are located at the first (index 0) and last (index -1)\nsurface respectively. This naturally allows tracking their positions,\nmaterial and shape data and supports curved objects and images naturally.\nFurther data like pupils data are maintained in the two\n`Conjugate` s of the `System`.\n\nTherefore, a minimal system of a single lens consists of fours surfaces: object,\nthe two lens surfaces (one of which can be the aperture stop) and the image\nsurface. The `offset` data of the first (object) surface does play a role in\nray tracing but it can be useful as it locates the global coordinate system's\norigin. The `material` of the last (image) surface is used as it can cause\nincident rays to be evanescent at the image surface. This can also be compared\nto other programs where the thickness of the image surface is never relevant or\nthe material in object space and the position of the lens has to be tracked\nsomewhere else depending on the implementation.\n\nLiterature\n----------\n\n* Warren J. Smith: Modern Optical Engineering, McGraw-Hill 2000: concise\n  and methods derivation from paraxial all the way to arbitrary ray tracing,\n  with terminology explained and examples given\n* Michael Bass (ed): Mandbook of Optics I and II, OSA/McGraw-Hill 1995:\n  physical foundations, broad on optics, comprehensive on theory, some info on\n  numerics, some example designs\n* Daniel Malacara: Handbook of Optical Design, Marcel Dekker Inc. 1994:\n  Introduction, Aberations, Examples, more info on terminology, especially in\n  ray tracing programs and codes\n* Daniel Malacara: Geometrical and Instrumental Optics, Academic Press Inc. 1988:\n  less info about algorithms and numerical methds, more examples and use cases,\n  speciality lens designs\n* Robert R. Shannon: The Art and Science of Optical Design, Cambridge\n  University Press 1997: many examples with Oslo and Zemax, not very thorough\n  on numerical methods and foundations, good for material comparison with own\n  codes.\n* Michael J. Kidger: Intermediate Optical Design, SPIE Press 2004:\n  info on optimization techniques and algorithms, higher order aberrations,\n  lots of example designs\n* Milton Laikin: Lens Design, CRC Press 2007: little bit of basic theory, lots\n  of basic and paradigmatic example designs\n* Oslo Optics `manual \u003chttps://www.lambdares.com/wp-content/uploads/support/oslo/oslo_edu/oslo-user-guide.pdf\u003e`_ and `reference \u003chttps://www.lambdares.com/wp-content/uploads/support/oslo/oslo_edu/oslo-optics-reference.pdf\u003e`_\n* Zemax\n  `manual \u003chttps://neurophysics.ucsd.edu/Manuals/Zemax/ZemaxManual.pdf\u003e`_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquartiq%2Frayopt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquartiq%2Frayopt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquartiq%2Frayopt/lists"}