Open quant opened 1 year ago
Can you add to your description what this fixes? It's been a minute and I don't recall it being necessary to normalize the reciprocal lattice vectors.
I made the description. I am sorry, I should have begun with it. For the test - it may better be placed into a separate user tests test file.
Not at all, thank you for contributing! I believe you're correct, I'll hunt down the primary source for this ASAP to confirm. How did you notice this error?
I found the issue exactly as the test shows: R
and T
in 1D setup were unexpectedly dependent on the unit of length used (nm vs um). After some debugging I located the inconsistency, fixed and tested it and now I (almost) trust the 1D path.
Still there is an insignificant issue with zero incident angle, and another minor issue with P_matrix()
when er
is a scalar, but I am not ready yet to file an issue and suggest a fix.
The fix normalizes reciprocal lattice vectors in
_k_matrix_1D
just like it is done in_k_matrix_2D
.Without normalization the 1D grating gives different results for different units of length, as the test shows