Minor changes and clarifications authored by joha2's avatar joha2
......@@ -13,7 +13,9 @@ Due to our last refactor the GUI functionality is broken at the moment.
For the underlying physical stuff, please read the fundamental manual. :-)
To reproduce some of the following screenshots you may just play around a bit
with the demo files in the ~~main~~ demos directory: `~/pyrate$ python demos/demo_optimize.py`.
with the demo files in the demos directory: `~/pyrate$ python demos/demo_optimize.py`.
## Create an Optical System
The way of defining an optical system is always the same:
......@@ -34,14 +36,14 @@ The way of defining an optical system is always the same:
* add element to optical system `system.addElement("element", element)`
* notice: all strings provided in the `add...` functions as first argument are used for sequence in the following
* define sequence of surfaces for sequential raytracing `seq = [("elem1name", [("surf1name", optionsdict1), ("surf2name", optionsdict2), ... ("surfnname", optionsdictn)]), ("elem2name", [ ... ])]`
* in the sequence it is also possible to reuse elements or surfaces, this is for example useful for defining a laser resonator or if an element is to be travelled more than once (like lenses in an interferometric setup)
* in the sequence it is also possible to reuse elements (not yet implemented in reverse direction) or surfaces, this is for example useful for defining a laser resonator or if an element is to be travelled more than once (like lenses in an interferometric setup)
* optionsdict is usually empty. There are two options possible:
* "is_mirror" (True, False) -> changes the refraction into a reflection
* "is_stop" (True, False) -> used to determine stop for ray aiming
Then raytrace via `raytrace` (or `Aimy` which is highly experimental and located in `pyrateoptics.aim`) and draw via `draw`. `raytrace` and `draw` are defined in `pyrateoptics.__init__.py`.
For setting up your own system, it is recommended to use one of the convenience functions (also defined in `pyrateoptics.__init__.py`) `build_simple_optical_system` or `build_rotational_symmetric_optical_system` for avoiding all the administrative overhead given above (see also the code snippets provided in README.md).
For setting up your own system, it is recommended to use one of the convenience functions (also defined in `pyrateoptics.__init__.py`) `build_simple_optical_system` or `build_rotationally_symmetric_optical_system` for avoiding all the administrative overhead given above (see also the code snippets provided in README.md).
It is further recommended to use an optical system setup by these functions
as a starting point and modify its properties afterwards directly.
```python
......
......