question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

style of ABCD matrix

See original GitHub issue

Hi, Can we change the printing style of ABCD matrix?

It is good, but when I try to run doctest, it is confusing and most of the matrix prints will be failed. If you want to run it to see what I mean you can use the following code:


import doctest
import raytracing

doctest.testmod(m=raytracing.axicon,verbose=True)
doctest.testmod(m=raytracing.components,verbose=True)
doctest.testmod(m=raytracing.eo,verbose=True)
doctest.testmod(m=raytracing.figure,verbose=True)
doctest.testmod(m=raytracing.gaussianbeam,verbose=True)
doctest.testmod(m=raytracing.imagingpath,verbose=True)
doctest.testmod(m=raytracing.lasercavity,verbose=True)
doctest.testmod(m=raytracing.laserpath,verbose=True)
doctest.testmod(m=raytracing.materials,verbose=True)
doctest.testmod(m=raytracing.matrix,verbose=True)
doctest.testmod(m=raytracing.matrixgroup,verbose=True)
doctest.testmod(m=raytracing.ray,verbose=True)
doctest.testmod(m=raytracing.rays,verbose=True)
doctest.testmod(m=raytracing.specialtylenses,verbose=True)
doctest.testmod(m=raytracing.utils,verbose=True)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
ElaheParhamcommented, Jul 16, 2020

I agree that A=, B=, C=, D= is less confusing and more concise. But I could understand the purpose of having it as a matrix as well…

I can understand the purpose of having a matrix style too, but there are two problems for now. first is with backslashes in the docstring. and Second, having <blank> lines between the printed matrix and the printed focal length.

when I want to use doctest to test the examples they real output does not match with what I have put in the examples, so it raises some error.

0reactions
dccotecommented, Jul 17, 2020

Done #321

Read more comments on GitHub >

github_iconTop Results From Across the Web

ABCD matrix - RP Photonics
An ABCD matrix [1] is a 2-by-2 matrix associated with an optical element which can be used for describing the element's effect on...
Read more >
Ray transfer matrix analysis - Wikipedia
Ray transfer matrix analysis (also known as ABCD matrix analysis) is a mathematical form for performing ray tracing calculations in sufficiently simple ...
Read more >
Ray Transfer (ABCD) Matrix Analysis - RayLab
This technique uses the paraxial approximation, which means rays are assumed to be at a small angle and a small offset from the...
Read more >
Ray transfer matrix analysis
Ray transfer matrix analysis (also known as ABCD matrix analysis) is a type of ray tracing technique used in the design of some...
Read more >
Forms of the ABCD matrix depending on the angle θ.
It is shown that the four Wigner matrices can be combined into one matrix with four branches. This result is illustrated in terms...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found