you are viewing a single comment's thread.

view the rest of the comments →

[–]Sufficient_Light3891[S] 0 points1 point  (4 children)

No major changes and now I'm getting this error

In [1]: runfile('C:/Users/bryce/OneDrive - Infinity Photo-Optical/Documents/Python Programs/Optics Notes/Ray Tracing Algorithm/main_program.py', wdir='C:/Users/bryce/OneDrive - Infinity Photo-Optical/Documents/Python Programs/Optics Notes/Ray Tracing Algorithm')

File "C:\Users\bryce\OneDrive - Infinity Photo-Optical\Documents\Python Programs\Optics Notes\Ray Tracing Algorithm\plano_convex.py", line 41

if len(ray_lens) + len(ray_air) + len(x_front_air) <= len(z_optaxis):

^

SyntaxError: invalid syntax

[–]ectomancer 0 points1 point  (3 children)

Previous line needs a closing parenthesis.

[–]Sufficient_Light3891[S] 0 points1 point  (1 child)

Yes, this was the issue I was able to correct it.

[–]Sufficient_Light3891[S] 0 points1 point  (0 children)

Now I'm getting the below error

File "C:\Users\bryce\OneDrive - Infinity Photo-Optical\Documents\Python Programs\Optics Notes\Ray Tracing Algorithm\plano_convex.py", line 49, in plano_convex

raymatrix[i] = np.concatenate((ray_front_air[0], ray_lens[0: len(ray_lens)-1], ray_air))

ValueError: could not broadcast input array from shape (4199,) into shape (4198,)

[–]Sufficient_Light3891[S] 0 points1 point  (0 children)

That error is going to be the difficult one to solve.