further wiki changes authored by jo's avatar jo
Welcome to the pyrate wiki !
## Introduction
Pyrate is a program for optical lens design.
Welcome to the pyrate wiki! This wiki is intended for posting status updates,
new ideas, some screenshots, and maybe some introductory documentation.
Pyrate is a program for scientific optical lens design. It is planned as a
scripting library which could be used to easily set up an initial optical design,
optimize the appropriate variables, review the results, and do some analysis.
We decided to use ![FreeCAD](https://freecadweb.org) as a graphical front end.
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 directory.
![Achromat](https://cloud.githubusercontent.com/assets/12564815/24765016/89a5d27c-1af6-11e7-9eb7-92d9687486c0.png)
......@@ -23,7 +36,6 @@ Comparison of real raytrace (blue) with parabasal raytrace (orange).
Equal sided prism with blue and red light being dispersed.
# Status of pyrate (according to email communication)
## Formulas
......@@ -43,85 +55,3 @@ If you use python2 you may use the following code snipped
to get
![equation](http://latex.codecogs.com/gif.latex?ds%5E2%20%3D%20-c%5E2%20dt%5E2%20%2B%20dx%5E2%20%2B%20dy%5E2%20%2B%20dz%5E2%5C%5C%20ds%5E2%20%3D%20%5Ceta_%7B%5Cmu%5Cnu%7D%20dx%5E%5Cmu%20dx%5E%5Cnu)
## Unittests
Due to the growing complexity of the program we have to write some unittests for every functionality.
Use the following external helper sites to assist improvement of the code
* [x] [Travis -- checks build and test passing of code](https://travis-ci.org/)
* [ ] [landscape -- checks code "health" via some metrics](https://landscape.io/)
* [x] [codecov -- checks how much of code is covered by unittests](https://codecov.io/)
Status: Travis CI, appveyor CI, Codecoverage available (Thanks @theinze!). Unit tests and smoke tests to be implemented.
Goal:
* Develop unittests
Distant goal:
* Every change in the internal structure has to pass the unittests
## Speichern und Laden von Objektiven
Status: pickles mag die optimierbaren Variablen nicht
Ziel:
* Lösung, die sowohl Optimierung als auch speichern ermöglicht und die Python-Design-Philosophie möglichst wenig verletzt, also wenig C++ Pointer Zeug enthält.
* Idealerweise nur mit mainstream-Paketen wie numpy; Diese werden mit sehr hoher Wahrscheinlichkeit in ein paar Jahren noch unterstützt und auf neue python-Versionen gehoben
## Asphären
Status: Bisher nur Kegelschnitte möglich
Ziel:
* Entwicklung eines iterativen Verfahrens zur Schnittpunkt-Berechnung von Geraden mit Asphären
* Implementierung einer Mutterklasse für Asphären
* Implementierung polynomielle Asphäre
Fernziel:
* Implementierung verschiedener Asphären- und Freiform-Beschreibungen
(Forbes mild & stark, polynomielle Freiform, Zernike sag, ... )
* Linearkombinationen? Grundform + Abweichung1 + ...
## Solves, Pickups, und Zwangsbedingungen
Status:
* Abstrakt implementiert (Pickup mit Funktion und External mit Funktion)
Ziel:
* Konzept zur Übergabe von Zwangsbedingungen an den Optimierer
* Bereitstellung häufiger solves als fertige Funktionen
Konkretisierung:
* Die aktuellen Pickus halten dann Vorgaben streng ein und koennen auch vom Optimierer verwendet werden
* Das fuehrt zu ggf. zu instabilen Meritfunktionen
* Besser Pickups weich als constraints mit Lagrange-Multiplikatoren implementieren
## User interface
These ideas should simplify the user-pyrate interaction. This means they should simplify the extraction of
data from the optical system, the feed back of data into the system, and maybe in a distant future simplify
the interaction with the FreeCAD interface. :-)
### ExaminationClass
* Gets data points from specific object (ExaminationClassAdaptor) and takes care of showing them in different ways
* Different ways implemented by inheritance (TextfileExamination, PlotExamination, TableExamination)
* Class may obtain inputs and feed it back into ExaminationClassAdaptor
### ExaminationClassAdaptor
* Interface class between certain class and ExaminationClass
* Implementes methods:
* getDataPoints()
* setDataPoints()
* Idea is to obtain data from or writing to a class without writing too much code into the class itself
* This class implements the format of proper input and output (usually numpy arrays)
* This class checks the proper input and output
* Therefore depending on the ExaminationClass adapted to it, we can produce file output of several quantities,
plots (e.g. spot diagrams), tables for in- and output
* Target classes maybe OpticalSystem, Surface, Material, all things the user should interfere with
* if the user cannot feed the data back into the target class: do not implement setDataPoints()
* if the user cannot aquire the data from the target class: do not implement getDataPoints()
* inherit all functional adaptors from abstract base class