edmundsj / rcwa

Rigorous Coupled Wave Analysis for the calculation of Photonic Crystal R/T spectra
MIT License
97 stars 30 forks source link

0 degree incidence angle results in singular matrix error #69

Open hag174 opened 4 months ago

hag174 commented 4 months ago

Plane wave illumination with theta = 0 and phi = 0 degrees angle incidence angle results in singular matrix error. The work arround is to enter for theta a very small angle.

hag174 commented 4 months ago

I think this problem can be solved by using np.linalg.pinv() instead of np.linalg.inv().