Sterncat / opticspy

python optics module
MIT License
448 stars 126 forks source link

Different results from OpticsPy and CodeV #40

Closed DrPaprikaa closed 3 years ago

DrPaprikaa commented 3 years ago

Hi, I played with the examples and worked with the Double Gauss (example 2). I compared the outputs of opticspy and CodeV, with the same input values, here is the comparison :

OpticsPy different values than CodeV - Double gauss

The layouts are pretty much identical, but the RMS spot-diagram values are quite different, would you happen to know why ?

Kind regards, DrPaprikaa

Sterncat commented 3 years ago

Hi Dr. Paprikaa,

It may be caused by the distance difference between the last lens surface to the image plane. I think maybe there is a slight difference. CodeV may have a defocus on image plane, and opticspy doesn't.

Thanks! Xing

DrPaprikaa notifications@github.com 于2020年12月7日周一 下午2:19写道:

Hi, I played with the examples and worked with the Double Gauss (example 2). I compared the outputs of opticspy and CodeV, with the same input values, here is the comparison :

[image: OpticsPy different values than CodeV - Double gauss] https://user-images.githubusercontent.com/64958936/101411770-d2c73600-38e1-11eb-9edb-9ed620116794.png

The layouts are pretty much identical, but the RMS spot-diagram values are quite different, would you happen to know why ?

Kind regards, DrPaprikaa

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Sterncat/opticspy/issues/40, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUIRBKTJKFPB6ZKD2BMDO3STVIGXANCNFSM4URDBG7Q .

DrPaprikaa commented 3 years ago

Hi Sterncat,

Thank you for your quick answer. The lens data of Opticspy and CodeV are identical, there is no defocus on the image plane in CodeV, that's why I was wondering.

DrPaprikaa

Sterncat commented 3 years ago

Hi Dr.Paprikaa,

Maybe the image scale issue. When I do the plot, I think I use different scale for images on different field, but CodeV use same ones. If you take a look for the rms value, you can find they are different size plot. Also, the ray fan is different for opticspy and codev, that's the reason for different rms value.

Thanks! Xing

DrPaprikaa notifications@github.com 于2020年12月8日周二 上午2:32写道:

Hi Sterncat,

Thank you for your quick answer. The lens data of Opticspy and CodeV are identical, there is no defocus on the image plane in CodeV, that's why I was wondering.

DrPaprikaa

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Sterncat/opticspy/issues/40#issuecomment-740535216, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUIRBPCQWFITVGVRRZLOW3STX6EHANCNFSM4URDBG7Q .