Releases: DCC-Lab/RayTracing
Releases · DCC-Lab/RayTracing
1.3.11
1.3.10 Minor bug fixes
Display improvements, convenience functions
What's Changed
- Small convenenience functions: ToConjugate(), ToFocus(matrix), Lens().focusToFocus()
- Fix various display properties by @JLBegin in #437
- Fix bug in GaussianBeam where wavelength wasn't converted to nm for printing by @mroddewig in #443
- Better compound element figure by @dccote in #445
- Version checking: We timestamp even when we fail: no need to keep checking by @dccote in #448
- Preferences, better version check and convenience functions by @dccote in #450
New Contributors
- @mroddewig made their first contribution in #443
Full Changelog: 1.3.7...1.3.9
Aperture NA: limiting the acceptance angle
Simple addition: aperture now has an optional parameter NA which can act as a limiting NA for the rays. Therefore, you can for instance use an aperture with a finite diameter and finite NA to simulate an optical fibre.
More examples and documentation improvements, and small bug fixes
Thanks for the feedback, a few improvements and a few bug fixes:
- Final small changes to examples. Use
python -m raytracing
to see all examples orpython -m raytracing -l
to list all examples. - Bug fix for the display of some lenses with very small radii of curvature.
- There is an expert mode to limit the warning. Define the environment variable RAYTRACING_EXPERT=1 to minimize the warnings.
- The package will quickly check (if possible) on pypi to see if there is a newer version of
raytracing
and will let you know how to upgrade. It will only check every once a day.
Better examples, documentation fixes and small bug fixes
imageSize
was modified to address confusion: in optical design, the object is always the field of view, and the image size is naturally the magnifation x FOV. However, although in real systems the FOV is always finite, it is not the case in small systems with infinite diameters, often used to get started with calculations. This led to confusion, because imageSize was infinite with no Field Stop is present (at least two finite diameter elements). So now, imageSize will offer to use the finiteobjectHeight
ofImagingPath
for the calculation if the FOV is infinite. It is a new parameterimageSize(useObject=False)
that defaults to the same behaviour as before.- Documentation has been improved significantly: better figures (up to date), syntax coloring on graphs
- Example code is now distributed with the module and is accessible with
import raytracing.examples
- And all the goodies of 1.3.4
1.3.4 Chromatic aberrations and Zemax files
Important new features, mostly related to compound lenses (i.e. Doublets from vendors for instance).
Material
has afindByName
method that can help find a material by name orfindByIndex
to find a material with the appropriate index within a certain tolerance. Documentation explains how you can include your own materials and they will be included in the search.- All achromats now also include a new function called
showChromaticAberrations
. If you write:you get the graph of the focal shift or you can get the values directly. They reproduce the Thorlabs graphs perfectly.from raytracing import * thorlabs.AC254_100_A().showChromaticAberrations() wavelengths, shifts = thorlabs.AC254_100_A().focalShifts()
- A new class called
ZMXReader
to read a ZMX file and get the lens from it. it has been tested with files from Thorlabs and Edmund, and they match the implemented classes. It can return aMatrixGroup
that you can use as a element in anImagingPath
for instance. Some work will be done soon to integrate this knowledge better, validate lenses, etc... - The ZMXReader can actually list the lens "prescription" in text so you can see what it is without necessariy using
raytracing
. - Any
Material
class derived by the user is included in thefindBy
functions, therefore the ZMXReader will make use of your material to build the lens. If a material is missing, you can add it to your script and it will be considered. See "README Adding New Materials"
1.3.3 Better documentation, parallel computing bug fixed
* Readthedocs will now show the inherited functions for all classes, simplifying getting started for new users.
traceManyThroughInParallel
now falls back to single process if there is any error. It appears the multiplrocessing package can become flaky on some platforms. To avoid problems, we simply use the slower version when needed.- Better fanAngles by default for images, although they will be deprecated in 1.4.x (use
ObjectRays
instead).
1.3.2 Code improvement for programmers
- Many functions now return named tuples for simpler management by programmers, while maintaining compatibility.
- Small bug in display was not using fanNumber.
1.3.1 Small bug fixes since publication
Since the publication, small bugs have been fixed. Thanks to all for feedback.