Solution Review: Setting Up an Optical System
Solution review to the tasks in setting up an optical system.
We'll cover the following...
Solution 1 #
Press + to interact
import numpy as npC1 = np.array([[1, -1],[1, 0]])C2 = np.array([[1, 1],[1, 0]])C3 = np.array([[1, -1],[1, 1]])C4 = np.array([[1, 0],[0, 1]])C5 = np.array([[0, 1],[1, 1]])C6 = np.array([[1, 0],[0, 1]])arrs = [C1, C2, C3, C4, C5, C6]system = np.array([[1, 0],[0, 1]]) # unit martrixfor i in range(len(arrs)):system = np.dot(system, arrs[i])print(system)
Explanation
-
In lines 3 - 8, we have defined the matrices ...