bryancole / raypier_optics

A raytracing toolkit for optical design
Other
57 stars 8 forks source link

Modified #5

Closed bryancole closed 2 years ago

bryancole commented 2 years ago

Hi Jonas,

I did a bit of work on your ExtendedPolynomialFace class. I've made the polynomial coefficients a numpy array (well, a memory-view, in fact). I had tried putting this into the extpoly_t struct but apparently this isn't permitted by Cython, so the extpoly_t struct just holds the other parameters. Now the polynomial and it's derivatives can be evaluated using for-loops so it can handle any number of coefficients. I've also removed the scipy fsolve stuff. Looking at it more closely, Newton-Raphson iteration should work fine so I just copied over the loop from the aspheric surface. I didn't finish the eval_extpoly_grad function so nothing is tested. It builds without error, at least. Sorry, I'm out of time today. Comments welcome.

Bryan

bryancole commented 2 years ago

Yes. Sorry I didn't have time to finish the feature (as you say, the gradient is missing). I'm hoping to spend a day or two working on raypier over the holidays.

Best wishes for the New Year

Bryan

On Sun, 26 Dec 2021, 20:04 Jonas231, @.***> wrote:

@.**** approved this pull request.

This looks good. The gradient of the conic section is missing, right?

— Reply to this email directly, view it on GitHub https://github.com/bryancole/raypier_optics/pull/5#pullrequestreview-840109195, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABYLNR6AFKJSZYCYLR26YLUS5YN7ANCNFSM5I4J5MRQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>